.episode-page {
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto;
    padding: 80px 0 100px;
}


/* =========================================================
   EPISODE
========================================================= */

.episode-hero {
    max-width: 840px;
    margin: 0 auto;
}

.episode-code,
.episode-section-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.65;
}

.episode-title {
    margin: 8px 0 10px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
}

.episode-meta {
    margin-bottom: 28px;
    opacity: 0.7;
}

.episode-description {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.9;
}


/* =========================================================
   EPISODE ART
========================================================= */

.episode-art {
    width: min(360px, 100%);
    margin: 18px auto 24px;
}

.episode-art img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}


/* =========================================================
   EPISODE AUDIO PLAYER
========================================================= */

.episode-player {
    margin-top: 30px;
}

.podcast-player {
    display: grid;
    grid-template-columns:
        40px
        auto
        minmax(120px, 1fr)
        auto
        40px
        100px;

    align-items: center;

    width: 100%;
    gap: 10px;
    padding: 12px 14px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.06),
            rgba(255, 255, 255, 0.025)
        );
}

.podcast-player-play,
.podcast-player-volume-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);
    color: white;

    cursor: pointer;
}

.podcast-player-play:hover,
.podcast-player-volume-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.podcast-player-play:active,
.podcast-player-volume-button:active {
    transform: scale(0.96);
}

.podcast-player-icon {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;

    /* Convert black SVG icons to white */
    filter: brightness(0) invert(1);
}

.podcast-player-time,
.podcast-player-duration {
    color: #cfd6df;
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.podcast-player-progress,
.podcast-player-volume {
    margin: 0;
    cursor: pointer;
    accent-color: #5da9ff;
}

.podcast-player-progress {
    width: 100%;
    min-width: 0;
}

.podcast-player-volume {
    width: 100px;
    min-width: 100px;
    height: 4px;
}

.podcast-player .episode-audio {
    display: none;
}


/* =========================================================
   EPISODE NAVIGATION
========================================================= */

.episode-navigation {
    display: flex;
    justify-content: space-between;
    gap: 30px;

    margin-top: 35px;
    padding-top: 25px;

    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.episode-nav-side {
    flex: 1;
}

.episode-nav-next {
    text-align: right;
}

.episode-nav-link {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;

    color: inherit;
    text-decoration: none;
}

.episode-nav-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.55;
}

.episode-nav-link strong {
    font-size: 1.15rem;
}


/* =========================================================
   LOCATIONS
========================================================= */

.episode-locations {
    margin-top: 90px;
}

.episode-section-heading {
    margin-bottom: 30px;
    text-align: center;
}

.episode-section-heading h2 {
    margin: 6px 0;
    font-size: 2.2rem;
}

.episode-section-heading p {
    margin: 0;
    opacity: 0.65;
}


/* =========================================================
   LOCATION CAROUSEL
========================================================= */

.location-carousel {
    position: relative;
}

.location-carousel-window {
    position: relative;
    overflow: hidden;

    min-height: 480px;
    border-radius: 14px;
}

.episode-location-slide {
    display: none;
}

.episode-location-slide.is-active {
    display: block;
}

.episode-location-image {
    position: relative;

    min-height: 480px;

    overflow: hidden;
    border-radius: 14px;

    background: rgba(0, 0, 0, 0.2);
}

.episode-location-image > img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.episode-location-placeholder {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 3rem;
    opacity: 0.15;
}

.episode-location-shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.45) 45%,
            rgba(0, 0, 0, 0.05) 100%
        );
}

.episode-location-content {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 40px;

    max-width: 600px;
}

.episode-location-type {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
}

.episode-location-content h3 {
    margin: 4px 0 10px;
    font-size: 2.5rem;
}

.episode-location-content p {
    line-height: 1.6;
    opacity: 0.85;
}

.episode-location-button {
    display: inline-block;

    margin-top: 10px;
    padding: 11px 18px;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;

    color: inherit;
    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.episode-location-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.75);
}


/* =========================================================
   CAROUSEL ARROWS
========================================================= */

.location-carousel-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;

    width: 46px;
    height: 46px;

    transform: translateY(-50%);

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.6);
    color: white;

    font-size: 2rem;
    line-height: 1;

    cursor: pointer;
}

.location-carousel-prev {
    left: 18px;
}

.location-carousel-next {
    right: 18px;
}


/* =========================================================
   CAROUSEL DOTS
========================================================= */

.location-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;

    margin-top: 18px;
}

.location-carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.25);

    cursor: pointer;
}

.location-carousel-dot.is-active {
    background: rgba(255, 255, 255, 0.9);
}


/* =========================================================
   FUTURE / UNRELEASED EPISODE
========================================================= */

.episode-future {
    max-width: 720px;
    margin: 80px auto;
    padding: 60px 40px;

    text-align: center;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;

    background: rgba(0, 0, 0, 0.12);
}

.episode-future h1 {
    margin: 10px 0 24px;

    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
}

.episode-future-lead {
    font-size: 1.25rem;
}

.episode-future p {
    line-height: 1.7;
    opacity: 0.85;
}

.episode-future-actions {
    margin-top: 35px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .episode-page {
        width: min(100% - 24px, 1000px);
        padding-top: 50px;
    }

    .episode-navigation {
        gap: 15px;
    }

    .episode-locations {
        margin-top: 60px;
    }

    .location-carousel-window,
    .episode-location-image {
        min-height: 400px;
    }

    .episode-location-content {
        left: 25px;
        right: 25px;
        bottom: 30px;
    }

    .episode-location-content h3 {
        font-size: 2rem;
    }

    /*
     * Keep the entire audio player on ONE line,
     * matching the podcast page.
     */
    .podcast-player {
        grid-template-columns:
            34px
            auto
            minmax(40px, 1fr)
            auto
            34px
            54px;

        gap: 6px;
        padding: 9px;
    }

    .podcast-player-play,
    .podcast-player-volume-button {
        width: 34px;
        min-width: 34px;
        height: 34px;
    }

    .podcast-player-icon {
        width: 17px;
        height: 17px;
    }

    .podcast-player-time,
    .podcast-player-duration {
        font-size: 0.7rem;
    }

    .podcast-player-volume {
        width: 54px;
        min-width: 54px;
    }

    .episode-art {
        width: min(320px, 100%);
    }
}

.episode-page {
    width: min(1000px, calc(100% - 40px));

    margin: 40px auto 80px;
    padding: 48px 34px 60px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;

    background:
        linear-gradient(
            180deg,
            rgba(18, 22, 30, 0.98),
            rgba(9, 12, 18, 0.98)
        );

    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.episode-hero {
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
}

.episode-title {
    margin: 8px auto 10px;
    text-align: center;

    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
}

.episode-description {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;

    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.9;
}

.episode-player {
    text-align: left;
}

.episode-navigation {
    text-align: left;
}

.episode-nav-next {
    text-align: right;
}

@media (max-width: 700px) {
    .episode-page {
        width: calc(100% - 16px);

        margin: 16px auto 40px;
        padding: 28px 14px 36px;

        border-radius: 22px;
    }
}


.episode-code {
    margin-bottom: 14px;

    text-align: center;

    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 800;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    opacity: 0.9;
}

.episode-section-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.65;
}