/* assets/css/videos.css | J Dodson LLC | Photo Luminara Studio
   Public Portfolio Videos page -- loaded only on videos.php (see
   includes/header.php). Reuses .page-heading/.page-subheading/.breadcrumbs
   (page.css/main.css) for typography, same as the other static pages, so
   this file only covers what's actually new: the video grid, the thumbnail
   hover/play treatment, and the lightbox popup player. */

.video-intro-text {
    font-size: 18px;
    color: var(--public-text);
    margin: 0 0 28px;
    max-width: 720px;
}

.video-category-section {
    margin-bottom: 56px;
}

.video-category-heading-link {
    color: inherit !important;
    text-decoration: none !important;
}

    .video-category-heading-link:hover {
        color: var(--color-accent) !important;
    }

.video-category-subtext {
    font-size: 16px;
    line-height: 1.6;
    color: var(--public-text-muted);
    margin: 0 0 20px;
    max-width: 720px;
}

/* ============================================
   VIDEO GRID
   ============================================ */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

.video-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    box-shadow: var(--shadow-2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

    .video-thumb:hover,
    .video-thumb:focus-visible {
        transform: translateY(-4px);
        box-shadow: var(--shadow-3);
        outline: none;
    }

    .video-thumb img {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        display: block;
    }

    /* Centered play glyph, darkened background behind it on hover so it
       always reads clearly regardless of the thumbnail's own colors. */
    .video-thumb-play {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.55);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        line-height: 1;
        transition: background 0.2s ease, transform 0.2s ease;
        pointer-events: none;
    }

        .video-thumb:hover .video-thumb-play,
        .video-thumb:focus-visible .video-thumb-play {
            background: var(--color-accent);
            transform: translate(-50%, -50%) scale(1.08);
        }

    .video-thumb-title {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 10px 12px 8px;
        background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 100%);
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* ============================================
   LIGHTBOX
   ============================================ */

.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

    .video-lightbox.is-open {
        display: flex;
    }

.video-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.video-lightbox-box {
    position: relative;
    z-index: 1;
    width: min(90vw, 1100px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .video-lightbox-box video {
        width: 100%;
        max-height: 80vh;
        border-radius: 10px;
        background: #000;
        box-shadow: var(--shadow-1);
    }

.video-lightbox-close {
    position: absolute;
    top: -44px;
    right: -6px;
    background: none;
    border: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

    .video-lightbox-close:hover {
        color: var(--color-accent-light);
    }

.video-lightbox-title {
    margin-top: 12px;
    color: var(--public-text-bright);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 700px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .video-lightbox-close {
        top: -40px;
        right: 0;
        font-size: 30px;
    }
}
