@charset "utf-8";
/* ==========================================================================
   Module: Video gallery
   YouTube video cards that play in a popup (components/site/video-gallery,
   js/video-gallery.js). Used on the activities and classes pages.
   ========================================================================== */

/* Video cards
   ----------------------------------------------------------------- */
.video-gallery {
    margin-bottom: 48px;
}

.video-gallery__title {
    font-size: 22px;
    text-align: center;
    margin-bottom: 24px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.video-card__btn {
    display: block;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    text-align: left;
    color: inherit;
}

.video-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: var(--blue-light);
}

.video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card__btn:hover .video-card__thumb img {
    transform: scale(1.04);
}

.video-card__btn:focus-visible .video-card__thumb {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

.video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.video-card__play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -6px;
    border-style: solid;
    border-width: 10px 0 10px 17px;
    border-color: transparent transparent transparent var(--blue);
}

.video-card__btn:hover .video-card__play {
    transform: scale(1.08);
}


.video-card__title {
    display: block;
    margin-top: 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
}

/* Video popup (native <dialog>) */
/* base.css sets dialog { display: block }, which would keep the popup
   visible when closed — hide it unless it is open. */
.video-modal:not([open]) {
    display: none;
}

.video-modal {
    width: min(960px, 92vw);
    max-width: none;
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
}

.video-modal::backdrop {
    background: rgba(10, 20, 45, 0.82);
}

.video-modal__inner {
    position: relative;
}

.video-modal__video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-sm);
}

iframe.video-modal__video {
    border: 0;
}

.video-modal__close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 40px;
}

.video-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .video-card__thumb img,
    .video-card__play {
        transition: none;
    }
}

/* ==========================================================================
   Responsive (max-width: 860px)
   ========================================================================== */
@media (max-width: 860px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Responsive (max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
