.dbs-cr-hero {
    justify-content: center !important;
}
/* .dbs-cr-hero-content {
    align-items: start !important;
} */
/* .dbs-cr-hero-content .dbs-cr-hero-text {
    text-align: left !important;
} */
.dbs-cr-hero-content-gap-40 h1 {
    margin-bottom: 0 !important;
}

/* After Hours episode grid */
.series-episodes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .series-episodes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .series-episodes-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.series-episode {
    display: flex;
    flex-direction: column;
}

/* Transcript expand/collapse */
.transcript-section {
    --transcript-collapsed-height: 360px;
}

@media (min-width: 640px) {
    .transcript-section {
        --transcript-collapsed-height: 420px;
    }
}

@media (min-width: 960px) {
    .transcript-section {
        --transcript-collapsed-height: 520px;
    }
}

.transcript-section .transcript-content.is-collapsed {
    max-height: var(--transcript-collapsed-height);
    overflow: hidden;
}

.transcript-toggle {
    margin-top: 16px;
    margin-bottom: 16px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.transcript-toggle:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Slider hero styles */
.dbs-cr-hero {
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.dbs-cr-hero-swiper {
    position: absolute;
    inset: 0;
}

.dbs-cr-hero-swiper .swiper-slide {
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100vw;
}

.dbs-cr-hero.static .dbs-cr-hero-content {
    max-width: unset !important;
}
.dbs-cr-hero-swiper .dbs-cr-hero-content {
    max-width: unset !important;
    color: #fff;
    position: relative;
    z-index: 2;
}

.dbs-cr-hero-swiper .dbs-cr-hero-title,
.dbs-cr-hero-swiper .dbs-cr-hero-text {
    color: #fff !important;
}

.custom-slider .swiper-slide:not(.swiper-slide-active) img {
    max-height: unset !important;
}

.board-of-director-swiper-full,
.stories-swiper-full,
.programs-swiper-full {
    /* padding: 28px 0; */
    overflow: hidden;
}

.board-of-director-section h2:hover,
.stories-section h2:hover,
.programs-section h2:hover {
    color: #cc0000;
}

/* 
 * Pre-initialize swiper slide widths to prevent layout shift before JS loads.
 * These match the Swiper breakpoint configuration.
 */
.board-of-director-swiper-full .swiper-wrapper,
.stories-swiper-full .swiper-wrapper,
.programs-swiper-full .swiper-wrapper {
    display: flex;
}

.board-of-director-swiper-full .swiper-slide,
.stories-swiper-full .swiper-slide,
.programs-swiper-full .swiper-slide {
    flex-shrink: 0;
    height: auto;
    /* Mobile: ~87% width (1.15 slides visible) */
    width: calc((100% - 16px) / 1.15);
    margin-right: 16px;
}

@media (min-width: 640px) {
    .board-of-director-swiper-full .swiper-slide,
    .stories-swiper-full .swiper-slide,
    .programs-swiper-full .swiper-slide {
        /* Tablet: ~45% width (2.2 slides visible) */
        width: calc((100% - 32px) / 2.2);
        margin-right: 16px;
    }
}

@media (min-width: 900px) {
    .board-of-director-swiper-full .swiper-slide,
    .stories-swiper-full .swiper-slide,
    .programs-swiper-full .swiper-slide {
        /* Desktop medium: ~31% width (3.2 slides visible) */
        width: calc((100% - 40px) / 3.2);
        margin-right: 20px;
    }
}

@media (min-width: 1200px) {
    .board-of-director-swiper-full .swiper-slide,
    .stories-swiper-full .swiper-slide,
    .programs-swiper-full .swiper-slide {
        /* Desktop large: ~22% width (4.5 slides visible) */
        width: calc((100% - 72px) / 4.5);
        margin-right: 24px;
    }
}

.board-of-director-section h4,
.programs-section h4,
.stories-section h4 {
    margin-bottom: 8px !important;
    margin-top: 10px;
}
/* Clamp h4 to 1 line and p to 3 lines inside all swiper slides */
.custom-slider .swiper-slide h4 {
    margin-bottom: 8px !important;
    margin-top: 10px;
}
.custom-slider .swiper-slide h4 a {
    display: -webkit-box !important;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: break-word;
}

.custom-slider .swiper-slide p {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: break-word;
    margin-bottom: 0 !important;
}

/* Video thumbnail style for BOD slides */
.video-thumb {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    background: #f0f0f0;
}

/* Reserve space before image loads to prevent layout shift */
.video-thumb::before {
    content: '';
    display: block;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-thumb img {
    position: absolute !important;
    top: 0;
    left: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    margin: 0 !important;
}
.video-thumb-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.video-thumb-number {
    position: absolute;
    left: 12px;
    top: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1 !important;
    padding: 6px 8px;
    border-radius: 2px;
    z-index: 3;
}

/* slightly reduce play size on small screens */
@media (max-width: 640px) {
    .video-thumb-play svg {
        width: 44px;
        height: 44px;
    }
    .video-thumb-number {
        left: 8px;
        top: 8px;
        font-size: 12px;
        padding: 4px 6px;
    }
}

/* YouTube overlay styles */
.youtube-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.youtube-player-wrap {
    width: 100vw;
    height: 100vh;
}
.youtube-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.youtube-close-btn {
    position: fixed;
    right: 18px;
    top: 18px;
    z-index: 100000;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: none;
    padding: 10px 12px;
    font-size: 20px;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
}
.youtube-close-btn:focus {
    outline: 2px solid #fff;
}

.single-ep-youtube-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.uk-navbar-nav li a {
    white-space: nowrap !important;
}
