/* YouTube videos / playlists */

.videos-hero {
    padding: 2.5rem 0 1.35rem;
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, rgba(20, 184, 166, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.55), transparent 100%),
        var(--bg-body, #0b1220);
    border-bottom: 1px solid var(--border-color);
}

.videos-hero .container {
    position: relative;
    z-index: 1;
}

.videos-hero h1,
.videos-hero .h2 {
    color: var(--text-primary, #f8fafc) !important;
    letter-spacing: -0.02em;
}

.videos-hero .lead,
.videos-hero p,
.videos-hero .text-secondary,
.videos-hero .videos-hero-lead {
    color: var(--text-secondary, #94a3b8) !important;
    opacity: 1 !important;
    max-width: 40rem;
}

.videos-hero .breadcrumb {
    --bs-breadcrumb-divider-color: color-mix(in srgb, var(--text-muted, #64748b) 80%, transparent);
    margin-bottom: 0.85rem !important;
}

.videos-hero .breadcrumb-item,
.videos-hero .breadcrumb-item.active {
    color: var(--text-muted, #94a3b8) !important;
}

.videos-hero .breadcrumb-item a {
    color: var(--primary-light, #67e8f9) !important;
    text-decoration: none;
    font-weight: 650;
}

.videos-hero .breadcrumb-item a:hover {
    color: #fff !important;
    text-decoration: underline;
}

.videos-hero .breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted, #64748b) !important;
}

.videos-hero--compact {
    padding: 1.5rem 0 1rem;
}

.videos-playlist-menu {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg-card, #111827) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.videos-playlist-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0;
    -webkit-overflow-scrolling: touch;
}

.videos-playlist-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card, #111827);
    color: var(--text-primary, #e2e8f0) !important;
    text-decoration: none !important;
    font-size: 0.88rem;
    font-weight: 650;
    white-space: nowrap;
}

.videos-playlist-chip:hover,
.videos-playlist-chip.is-active {
    border-color: color-mix(in srgb, var(--primary, #14b8a6) 55%, var(--border-color));
    background: color-mix(in srgb, var(--primary, #14b8a6) 16%, var(--bg-card, #111827));
    color: var(--text-primary, #f8fafc) !important;
}

.videos-playlist-chip .chip-count {
    font-size: 0.72rem;
    opacity: 0.8;
    color: var(--text-secondary, #94a3b8);
}

.videos-player-card {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-card);
}

.videos-player-card .youtube-embed-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.videos-player-card .youtube-embed-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.videos-player-meta {
    padding: 1.15rem 1.25rem 1.35rem;
}

.videos-side-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 560px;
    overflow: auto;
}

.videos-side-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.45rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    text-decoration: none !important;
    color: inherit !important;
}

.videos-side-item.has-num {
    grid-template-columns: auto 120px 1fr;
}

.videos-side-item img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 0.4rem;
    background: #111;
}

.videos-side-item strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.3;
}

.videos-side-item small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.videos-side-item.is-active,
.videos-side-item:hover {
    border-color: var(--primary, #6366f1);
}

.videos-side-num {
    width: 1.4rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

.videos-playlist-card {
    display: block;
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--bg-card);
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.videos-playlist-card:hover {
    border-color: var(--primary, #6366f1);
    transform: translateY(-2px);
}

.videos-playlist-card-body {
    padding: 1.15rem 1.2rem;
}

/* Homepage video band */
.home-video-band {
    padding-top: 2rem;
}

.home-video-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
}

.home-video-frame {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #000;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.home-video-frame .youtube-embed-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.home-video-frame .youtube-embed-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.home-video-copy h2 {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 750;
    margin: 0.5rem 0 0.75rem;
}

.home-video-copy > p {
    color: var(--text-secondary);
    margin: 0 0 1.15rem;
    line-height: 1.65;
}

.home-video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

[data-theme="light"] .videos-hero {
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, rgba(13, 148, 136, 0.1), transparent 55%),
        linear-gradient(180deg, rgba(241, 245, 249, 0.95), rgba(248, 250, 252, 0.6)),
        var(--bg-body, #f8fafc);
}

[data-theme="light"] .videos-hero h1,
[data-theme="light"] .videos-hero .h2 {
    color: var(--text-primary, #0f172a) !important;
}

[data-theme="light"] .videos-hero .lead,
[data-theme="light"] .videos-hero p,
[data-theme="light"] .videos-hero .text-secondary,
[data-theme="light"] .videos-hero .videos-hero-lead {
    color: var(--text-secondary, #475569) !important;
}

[data-theme="light"] .videos-hero .breadcrumb-item,
[data-theme="light"] .videos-hero .breadcrumb-item.active {
    color: #64748b !important;
}

[data-theme="light"] .videos-hero .breadcrumb-item a {
    color: #0f766e !important;
}

[data-theme="light"] .videos-hero .breadcrumb-item a:hover {
    color: #0f172a !important;
}

[data-theme="light"] .videos-playlist-chip {
    background: #fff;
    color: #0f172a !important;
}

[data-theme="light"] .videos-playlist-chip:hover,
[data-theme="light"] .videos-playlist-chip.is-active {
    color: #0f172a !important;
    background: rgba(13, 148, 136, 0.12);
}

@media (max-width: 991.98px) {
    .home-video-layout {
        grid-template-columns: 1fr;
    }
}
