/* ============================================================
   Student Voices Archive — style.css
   4-col grid, load more, popup
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.sva-wrapper {
    width: 100%;
}

/* ── Grid ────────────────────────────────────────────────── */
.sva-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ── Card ────────────────────────────────────────────────── */
.sva-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Hidden cards (shown by JS on load more) */
.sva-card--hidden {
    display: none;
}

/* ── Clip wrap 2:3 ───────────────────────────────────────── */
.sva-clip-wrap {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
    padding: 0;
    border: none;
    cursor: pointer;
    outline: none;
}

.sva-clip-wrap--no-link { cursor: default; }

.sva-clip-wrap img:not(.sva-play-img) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: none;
    transform: none;
}

/* ── Play button ─────────────────────────────────────────── */
.sva-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.sva-play-img {
    width: 72px !important;
    height: 72px !important;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,.45));
    transform: none !important;
    transition: none !important;
}

/* ── Card title ──────────────────────────────────────────── */
.sva-card__title {
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Load More ───────────────────────────────────────────── */
.sva-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.sva-loadmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 32px;
    border: 2px solid #EC6F03;
    border-radius: 999px;
    background: transparent;
    color: #EC6F03;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.sva-loadmore-btn:hover {
    background: #EC6F03;
    color: #fff;
}

.sva-loadmore-btn:disabled,
.sva-loadmore-btn[hidden] {
    display: none;
}

.sva-loadmore-count {
    font-weight: 400;
    opacity: .75;
    font-size: .85rem;
}

/* ── Popup ───────────────────────────────────────────────── */
.sva-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sva-popup[hidden] { display: none !important; }

.sva-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.sva-popup__container {
    position: relative;
    z-index: 1;
    width: min(380px, 92vw);
    animation: svaFadeIn .22s ease both;
}

@keyframes svaFadeIn {
    from { opacity:0; transform: scale(.94) translateY(10px); }
    to   { opacity:1; transform: scale(1)   translateY(0);    }
}

.sva-popup__close {
    position: absolute;
    top: -44px; right: -4px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: #000;
    border: 1.5px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}

.sva-popup__close:hover { background: #222; }
.sva-popup__close svg { width: 16px; height: 16px; }

.sva-popup__player {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
}

.sva-popup__player::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: svaSpin .7s linear infinite;
}

.sva-popup__player.is-loaded::before { display: none; }

@keyframes svaSpin {
    to { transform: translate(-50%,-50%) rotate(360deg); }
}

.sva-popup__player iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: none; display: block;
}

.sva-empty { color: #888; font-style: italic; }


/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 899px) and (min-width: 600px) {
    .sva-grid { grid-template-columns: repeat(2, 1fr); }
    .sva-play-img { width: 56px !important; height: 56px !important; }
}

@media (max-width: 599px) {
    .sva-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .sva-play-img { width: 48px !important; height: 48px !important; }
    .sva-popup__close { top: -40px; right: 0; }
    .sva-loadmore-btn { padding: 10px 24px; font-size: .9rem; }
}