/* ── Videos: featured player + grid ───────────────────────────────────────
   Reuses the theme tokens (tokens.css) and .welcome-card/.card-header from
   home.css. Thumbnails come from YouTube (hqdefault is 4:3 with letterbox
   bars, so object-fit: cover into a 16:9 box crops them out).
*/

.videos-banner-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.videos-banner-body {
    align-items: center;
    justify-content: space-between;
}

.videos-banner-intro {
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--mac-black);
}

.videos-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-family: var(--font-chrome);
    font-size: 11px;
    font-weight: bold;
    text-transform: var(--chrome-case);
    letter-spacing: 0.3px;
    color: var(--mac-black);
    background: var(--button-bg);
    border: 1px solid var(--line);
    border-top: var(--button-accent);
    border-radius: var(--radius-button);
    padding: 8px 14px;
    text-decoration: none;
    white-space: nowrap;
}

.videos-btn:hover {
    background: var(--select-bg);
    color: var(--select-text);
}

/* ── Thumbnails (shared by featured + grid) ───────────────────────────── */

.video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--mac-grey-6);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.video-card:hover .video-thumb img,
.video-featured:hover .video-thumb img {
    transform: scale(1.05);
}

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

.video-play::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px 24px;
    border-color: transparent transparent transparent var(--mac-white);
    filter: drop-shadow(2px 2px 0 var(--mac-black));
}

.video-card:hover .video-play,
.video-card:focus-visible .video-play,
.video-featured:hover .video-play,
.video-featured:focus-visible .video-play {
    opacity: 1;
}

.video-meta {
    font-size: 9.5px;
    color: var(--mac-grey-6);
}

.video-title {
    font-weight: bold;
    line-height: 1.3;
    color: var(--mac-black);
}

/* ── Featured (latest) video ──────────────────────────────────────────── */

.video-featured {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 14px;
    padding: 12px;
    color: inherit;
    text-decoration: none;
}

.video-featured-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.video-badge {
    align-self: flex-start;
    font-family: var(--font-chrome);
    font-size: 9px;
    font-weight: bold;
    text-transform: var(--chrome-case);
    color: var(--select-text);
    background: var(--badge-bg);
    border-radius: var(--radius-tag);
    padding: 2px 6px;
}

.video-featured .video-title {
    font-size: 13px;
}

.video-featured-desc {
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--mac-black);
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Grid ─────────────────────────────────────────────────────────────── */

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

.video-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.video-card .video-title {
    font-size: 10.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.videos-empty {
    padding: 12px;
}

@media (max-width: 600px) {
    .video-featured {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .videos-banner-body {
        flex-direction: column;
        align-items: flex-start;
    }
}
