/* ================================================
   Educational Video Center — Archive
   ================================================ */

/* Hero */
.evc-hero {
    padding-bottom: 40px;
}

.evc-hero__title {
    font-size: 48px;
    font-weight: 700;
    color: var(--h1-h6-color);
    line-height: 1.15;
    margin-bottom: 16px;
}

.evc-hero__divider {
    width: 60px;
    height: 3px;
    background: var(--brand-color);
    margin: 0 auto 20px;
}

.evc-hero__subtitle {
    font-size: 16px;
    color: var(--base-text-color);
    line-height: 1.6;
    margin: 0;
}

/* Section title */
.evc-section-title {
    font-size: var(--h2);
    font-weight: 700;
    color: var(--h1-h6-color);
    margin-bottom: 32px;
}

/* ---- Featured Videos ---- */
.evc-archive .evc-featured {
    background: transparent;
    padding-top: 40px;
    padding-bottom: 40px;
}

.evc-featured__inner {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 40px;
}

.evc-featured__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .evc-featured__grid {
        grid-template-columns: 1fr;
    }
}

/* Card (featured) */
.evc-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.evc-card__thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
    background: #1a2b3c;
}

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

.evc-card__thumb:hover img {
    transform: scale(1.03);
}

.evc-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #1a2b3c;
}

.evc-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.2s ease;
}

.evc-card__thumb:hover .evc-card__play {
    background: rgba(0, 0, 0, 0.45);
}

.evc-card__play svg {
    width: 52px;
    height: 52px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.evc-card__body {
    padding: 16px;
}

.evc-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--h1-h6-color);
    margin: 0 0 8px;
}

.evc-card__desc {
    font-size: 14px;
    color: var(--base-text-color);
    margin: 0;
    line-height: 1.5;
}

/* ---- Browse by Category ---- */
.evc-browse {
    padding-bottom: 60px;
}

.evc-cat-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid #e5e7eb;
}

.evc-cat-row:first-child {
    border-top: 1px solid #e5e7eb;
}

.evc-cat-row:last-child {
    border-bottom: none;
}

.evc-cat-row__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 0 0 220px;
    max-width: 220px;
}

.evc-cat-row__icon {
    width: 68px;
    height: 68px;
    object-fit: contain;
    flex-shrink: 0;
}

.evc-cat-row__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--h1-h6-color);
    margin: 0 0 6px;
}

.evc-cat-row__desc {
    font-size: 13px;
    color: var(--base-text-color);
    line-height: 1.5;
    margin: 0;
}

/* Track wrapper holds the scrollable row + arrow button */
.evc-cat-row__track-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.evc-cat-row__track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    flex: 1;
    min-width: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.evc-cat-row__track::-webkit-scrollbar {
    display: none;
}

/* Arrow spacer — always reserves 36px on the right */
.evc-cat-row__arrow-slot {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Arrow button */
.evc-cat-row__arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--h1-h6-color);
    transition: background 0.2s, border-color 0.2s;
}

.evc-cat-row__arrow:hover {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #fff;
}

.evc-cat-row__arrow svg {
    width: 18px;
    height: 18px;
}

/* Mini card (category row) */
.evc-mini-card {
    flex: 0 0 calc(25% - 9px);
    min-width: 0;
    scroll-snap-align: start;
}

.evc-mini-card__thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: none;
    padding: 0;
    cursor: pointer;
    background: #d1d5db;
    border-radius: 4px;
    margin-bottom: 8px;
}

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

.evc-mini-card__thumb:hover img {
    transform: scale(1.04);
}

.evc-mini-card__placeholder {
    width: 100%;
    height: 100%;
    background: #d1d5db;
}

.evc-mini-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease;
}

.evc-mini-card__thumb:hover .evc-mini-card__play {
    background: rgba(0, 0, 0, 0.4);
}

.evc-mini-card__play svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.evc-mini-card__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--h1-h6-color);
    margin: 0;
    line-height: 1.4;
}

/* Responsive: stack category rows on mobile */
@media (max-width: 768px) {
    .evc-featured__inner {
        padding: 24px 16px;
    }

    .evc-cat-row {
        flex-direction: column;
        gap: 16px;
    }

    .evc-cat-row__header {
        flex: none;
        max-width: 100%;
    }

    .evc-cat-row__track-wrap {
        width: 100%;
        align-items: center;
    }

    .evc-mini-card {
        flex: 0 0 calc((100% - 12px) / 2);
    }
}

@media (max-width: 480px) {
    .evc-hero__title {
        font-size: 36px;
    }

    .evc-mini-card {
        flex: 0 0 100%;
    }
}
