/**
 * Styles for blogs/home-template.php: the Insider category-card carousel + lightbox,
 * and "The Edit" teaser section (which reuses the shared post-grid component in
 * blog-shared.css, loaded before this file).
 */

.site-main.valentte-blog-home {
    padding: 40px 0 20px;
}

.valentte-blog-teaser-section {
    max-width: 1700px;
    margin: 0 auto 48px;
    padding: 0 40px;
}

.valentte-blog-teaser-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.valentte-blog-teaser-row.valentte-blog-teaser-row-wide {
    max-width: 1700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px;
}

.valentte-blog-teaser-heading {
    font-family: 'Ysabeau Office', 'Cormorant', serif;
    font-size: 32px;
    margin: 0;
}

.valentte-blog-view-more-btn {
    flex-shrink: 0;
    background: #1E1E1E;
    color: #FFFFFF;
    padding: 11px 26px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
}

.valentte-blog-view-more-btn:hover {
    background: #565656;
    color: #FFFFFF;
}

/* Playlist skeleton (reuses blog-playlist-block markup/JS, rendered inside the Insider lightbox).
   Kept on one scrollable line rather than wrapping, since the real Firework "row" widget it's
   standing in for is itself a horizontal, non-wrapping row of video thumbnails. */
.blog-playlist-skeleton {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.blog-playlist-skeleton::-webkit-scrollbar {
    display: none;
}

.blog-playlist-skeleton-item {
    flex: 0 0 auto;
    width: 240px;
    height: 400px;
    border-radius: 8px;
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 37%, #ececec 63%);
    background-size: 400% 100%;
    animation: valentte-blog-skeleton-loading 1.4s ease infinite;
}

@keyframes valentte-blog-skeleton-loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* Insider category card carousel. */
.valentte-insider-carousel {
    position: relative;
}

.valentte-insider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding: 4px 2px 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.valentte-insider-track::-webkit-scrollbar {
    display: none;
}

.valentte-insider-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 220px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}


.valentte-insider-card:focus {
    background: none;
}

button.valentte-insider-card:hover {
    color: inherit;
    background: none;
}

.valentte-insider-card-image {
    display: block;
    width: 100%;
    height: 280px;
    border-radius: 12px;
    background: #F0F0F0 center/cover no-repeat;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.valentte-insider-card:hover .valentte-insider-card-image {
    transform: translateY(-4px);
}

.valentte-insider-card-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Ysabeau Office', 'Cormorant', serif;
    font-size: 64px;
    color: #FFFFFF;
    background: #1E1E1E;
}

.valentte-insider-card-name {
    display: block;
    margin-top: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #565656;
}

/* Arrows overlay directly on the card images (rather than sitting beside the track, which
   used to eat ~50px of horizontal space per side and misalign the strip's edges with the
   Edit teaser's images below). top is a fixed value: the track's own 4px top padding plus
   half of the 280px card-image height, minus half the 36px button — i.e. vertically centered
   on the image band specifically, not the card's full height (image + name label). */
.valentte-insider-arrow {
    position: absolute;
    top: 126px;
    z-index: 2;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #E7E7E7;
    border-radius: 50%;
    background: #FFFFFF;
    color: #1E1E1E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    font-family: "Helvetica", "Arial", sans-serif;
}

.valentte-insider-arrow-prev {
    left: 8px;
}

.valentte-insider-arrow-next {
    right: 8px;
}

.valentte-insider-arrow:hover {
    background: #1E1E1E;
    color: #FFFFFF;
    border-color: #1E1E1E;
}

/* Insider lightbox. */
.valentte-insider-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 30, 30, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.valentte-insider-modal-overlay.is-open {
    display: flex;
}

.valentte-insider-modal {
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 960px;
    max-height: 88vh;
    overflow-y: hidden;
    overflow-x: hidden;
    padding: 40px;
}

.valentte-insider-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #E7E7E7;
    background: #FFFFFF;
    cursor: pointer;
    color: #1E1E1E;
    z-index: 1;
}

.valentte-insider-modal-close svg {
    width: 12px;
    height: 16px;
    fill: currentColor;
}

/* Firefox adds its own inner padding/border around a button's focus ring, independent of the reset above. */
.valentte-insider-modal-close::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.valentte-insider-modal-close:hover {
    background: #1E1E1E;
    color: #FFFFFF;
    border-color: #1E1E1E;
}

.valentte-insider-modal-header {
    /* Just the title now (the View More button moved below the playlist) — padding-right
       still reserves room so it doesn't sit under the absolutely-positioned close button. */
    padding-bottom: 20px;
    margin-bottom: 28px;
    padding-right: 28px;
    border-bottom: 1px solid #E7E7E7;
}

.valentte-insider-modal-title {
    font-family: 'Ysabeau Office', 'Cormorant', serif;
    font-size: 30px;
    margin: 0;
}

.valentte-insider-modal-body {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.valentte-insider-modal-body .blog-playlist-block + .blog-playlist-block {
    padding-top: 32px;
    border-top: 1px solid #E7E7E7;
}

.valentte-insider-modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

@media screen and (max-width: 600px) {
    .valentte-insider-card {
        width: 160px;
    }

    .valentte-insider-card-image {
        height: 210px;
    }

    .valentte-insider-arrow {
        /* Recomputed for the 210px mobile card-image height. */
        top: 91px;
    }

    .valentte-insider-modal {
        padding: 24px 20px;
    }

    .valentte-insider-modal-close {
        width: 30px;
        height: 30px;
        top: 12px;
        right: 12px;
    }

    .valentte-insider-modal-close svg {
        width: 10px;
        height: 13px;
    }

    .valentte-insider-modal-header {
        /* Same reservation as desktop, recomputed for the smaller close button and
           the modal's narrower 20px side padding at this breakpoint. */
        padding-right: 30px;
        padding-bottom: 16px;
        margin-bottom: 20px;
    }

    .valentte-insider-modal-title {
        font-size: 22px;
    }

    .valentte-insider-modal-footer {
        margin-top: 24px;
    }

    .valentte-insider-modal-viewmore {
        padding: 9px 18px;
        font-size: 12px;
    }
}

.valentte-blog-teaser-posts-wrap {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Page-specific spacing for the shared grid component (blog-shared.css). */
ul.blog_post_thumbnails_container {
    padding: 0 !important;
    margin: 0 auto;
    row-gap: 40px;
}

@media screen and (max-width: 600px) {
    .valentte-blog-teaser-heading {
        font-size: 24px;
    }

    .valentte-blog-view-more-btn {
        padding: 9px 18px;
        font-size: 12px;
    }

    .valentte-insider-card-name {
        font-size: 15px;
    }
}
