/* Universal Reset */
* {
    border: none;
    box-sizing: border-box;
}

/* HTML Scroll Behavior */
html {
    overflow-y: scroll;
}

/* Body Styles */
body {
    font-family: 'Margarine', sans-serif;
    line-height: 1.4;
    margin: 0;
    background: #f9fafc;
    color: #333;

    /* Flexbox layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

/* Site Header */
.site-header {
    background: white;
    border: 4px solid white;
    border-radius: 12px 12px 0 0;
    /*box-shadow: 0 4px 12px rgba(0,0,0,0.05);*/
    padding: 24px;
    width: 90%;
    max-width: 1200px;
    margin-top: 40px;
    box-sizing: border-box;

    /* Flexbox layout */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* allows vertical spacing */
    overflow: hidden;
}

/* Top Bar - Navigation/Logo Container */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 0 48px;
    margin-top: 24px;
}

/* Logo Text */
.logo {
    font-size: 1.4rem;
    font-weight: bold;
}

/* Navigation Links */
.nav a {
    margin-right: 20px;
    text-decoration: none;
    font-weight: 600;
    color: #000;
}

.nav a:last-child {
    margin-right: 0;
}

/* Title Block Container */
.title-block {
    /*border: 1px solid black;*/
    border-radius: 24px;
    margin: 3rem 48px 48px 48px;
    padding: 15% 7.5%;
    position: relative;
    overflow: hidden;
    z-index: 2; /* if this doesn't have a z-index, then .header-bg background img won't show */
}

/* Header Background Image */
.header-bg {
    /*border: 2px solid green;*/
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/img_ChatGPT_chair_fort.png') no-repeat right center;
    background-size: 600px 500px;
    border-radius: 24px;
    pointer-events: none;
    z-index: -1;
}

/* Site Title (H1) */
.site-title {
    margin: 0;
    font-size: 4rem;
    color: #000;
}

/* Byline/Subtitle */
.byline {
    margin: 8px 0 20px 0;
    font-size: 1.1rem;
    color: #000;
}

/* Call to Action Button */
.cta-button {
    display: inline-block;
    background: #ff8a00;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    width: fit-content;
}

/* Footer */
footer {
    margin-top: 2rem;
}

/* Utility Class */
.hidden {
    display: none;
}

/* --- Episode container & cards --- */

/* Main Episode Container */
.episode-container {
    background-color: white;
    width: 90%;
    max-width: 1200px;
    padding: 0;
    margin: 0;
}

/* Year Toggle Button */
.year-btn {
    border: none;
    background: none;
    color: #ff8a00;
    font-family: 'Margarine', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: left;
    width: 100%;
    padding-left: 1.5rem;
    cursor: pointer;
}

/* Individual Episode Card (Wrapper for episode list) */
.episode-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0.25rem 0;
    gap: 1rem;
}

/* Page Wrapper (Outer container for header/episodes) */
.page-wrapper {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 0 auto;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Episode Wrapper (Inner container) */
.episode-wrapper {
    width: 100%;
    padding: 0 48px; /* same as .top-bar padding */
    box-sizing: border-box;
    /*background-color: white; optional, matches header */
    /*border-radius: 0 0 12px 12px; if you want matching rounded corners */
    /*box-shadow: 0 4px 16px rgba(0,0,0,0.08);*/
}

/* Overriding Box Shadow/Margin for inner elements within .page-wrapper */
.site-header,
.episode-container {
    box-shadow: none !important;
    margin: 0; /* important so there's no gap inside the wrapper */
    width: 100%;
}

/* Individual Episode Row */
.episode {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

/* Episode Cover Art */
.cover {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Episode Content (Title, Desc, Meta) */
.content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    height: auto;
}

/* Episode Title (H2) */
h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    line-height: 1.3;
}

/* Episode Description */
.desc {
    color: #999;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Episode Metadata */
.meta.top, .meta.bottom {
    font-size: 0.85rem;
    color: #999;
}

/* Status Dot Container */
.status-container {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* Status Dot Indicator */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #007bff;
    transition: all 0.3s ease;
}

/* Episode Divider */
.episode-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 0.25rem 0;
}

/* Hide divider after the last episode */
.episode-card .episode:last-of-type + .episode-divider {
    display: none;
}

/*
.inner {
    width: 100%;
    max-width: 1200px;
    padding: 0 48px;
    margin: 0 auto;
}
*/

/* Full-screen overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none; /* show via JS */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Overlay content container */
#overlay-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    padding: 30px;

    /* side-by-side layout */
    display: flex;
    gap: 30px; /* spacing between art & info */
    align-items: center;
    overflow: auto;
}

/* Close button */
#close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 36px;
    cursor: pointer;
    color: #000;
}

/* Album art in overlay */
#overlay-art {
    max-width: 40vw;
    max-height: 70vh;
    border-radius: 10px;
    flex-shrink: 0; /* prevent shrinking */
    object-fit: cover;
}

/* Overlay Info & Controls Container */
#overlay-info {
    max-width: 40vw;
}

/* Episode number in overlay */
#overlay-info .episode-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Episode title in overlay */
#overlay-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Media Player Container */
#media-container {
    width: 100%;
    margin-top: 20px; /* Space above the player */
}

/* Audio & video player */
#media-container audio,
#media-container video {
    width: 100%;
    max-width: 100%;
    /*max-height: 60px;
    margin-top: 15px;*/
}

/* Add this to style.css for troubleshooting */
#overlay-audio, #overlay-video {
    display: none !important;
}

/*
.year-group.collapsed .episodes {
    display: none;
}
*/

/* --- Responsive Design --- */

@media (max-width: 700px) {
    /* ... (Edge-to-Edge and Wrapper Adjustments remain the same) ... */
    body {
        padding: 1rem 0;
    }
    .page-wrapper {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    .episode-wrapper {
        padding: 0;
        box-sizing: border-box;
    }
    .episode-card {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* --- Key Change for Vertical Alignment --- */
    .episode {
        flex-direction: row;
        gap: 1rem;
        /* 🎯 Centers the episode number/title (in .content) vertically with the cover image */
        align-items: center; 
    }

    /* --- Centering and Tightening --- */
    .meta.bottom {
        display: none;
    }

    .content {
        justify-content: center;
        text-align: left;
        height: auto;
    }

    .meta.top {
        margin: 0; 
        padding: 0;
    }

    /* TIGHTENING: Reduce the space above and below the title */
    h2 {
        font-size: 1rem;
        margin: 0; 
    }
    
    .desc {
        display: none;
    }
    
    /* ... (Other mobile rules remain the same) ... */
    h1 {
        font-size: 1.6rem;
    }
    .year-btn {
        font-size: 1rem;
    }
    .episode-divider {
        margin: 0.25rem 0;
    }
    .cover, .status-container {
        width: 50px;
        height: 50px;
    }
    .content {
        height: auto;
    }
}
/* Extra small screens */
@media (max-width: 400px) {
    /* ... (These styles remain the same) ... */
    h1 {
        font-size: 1.4rem;
    }
    .year-btn {
        font-size: 0.95rem;
    }
    h2 {
        font-size: 0.9rem;
    }
}





