/* ============================================================
   Student Voices Shortcode — style.css
   ============================================================ */

.sv-wrapper {
    width: 100%;
    --sv-gap:    20px;
    --sv-cols:   4;
    --sv-card-w: calc( (100% - var(--sv-gap) * (var(--sv-cols) - 1)) / var(--sv-cols) );
}

/* ── Track ───────────────────────────────────────────────── */
.sv-track {
    display: flex;
    gap: var(--sv-gap);
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

.sv-track::-webkit-scrollbar { display: none; }

/* ── Card ────────────────────────────────────────────────── */
.sv-card {
    flex: 0 0 var(--sv-card-w);
    width: var(--sv-card-w);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}

/* ── Clip wrap 2:3 ───────────────────────────────────────── */
.sv-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;
}

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

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

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

.sv-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 ──────────────────────────────────────────── */
.sv-card__title {
    font-size: 18px;
    font-weight: 600;
	color:#fff;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Dots ────────────────────────────────────────────────── */
.sv-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.sv-dots[hidden] { display: none !important; }

.sv-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s, transform .2s;
    flex-shrink: 0;
}

.sv-dot.is-active {
    background: #EC6F03;
    transform: scale(1.3);
}

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

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

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

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

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

.sv-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;
}

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

.sv-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);
}

.sv-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: svSpin .7s linear infinite;
}

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

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

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

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


/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 899px) and (min-width: 600px) {
    .sv-wrapper { --sv-cols: 2; }
    .sv-play-img { width: 56px !important; height: 56px !important; }
}

@media (max-width: 599px) {
    .sv-wrapper { --sv-cols: 1; --sv-gap: 0px; }
    .sv-card { flex: 0 0 100%; width: 100%; }
    .sv-play-img { width: 48px !important; height: 48px !important; }
    .sv-dots { margin-top: 14px; gap: 7px; }
    .sv-dot { width: 9px; height: 9px; }
    .sv-popup__close { top: -40px; right: 0; }
}