/*
Theme Name: Saturday Night Archive
*/

:root {
    --snl-black: #050505;
    --snl-dark: #121212;
    --snl-dark-grey: #121212;
    --snl-gold: #caab56;
    --snl-blue: #00467f;
    --text-white: #f5f5f5;
    --text-muted: #888;
}

body {
    background-color: var(--snl-black);
    color: var(--text-white);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- Layout Containers --- */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

.ep-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 40px 5%;
}

/* --- Headers & Titles --- */

.ep-header {
    padding: 80px 5% 40px;
    background: linear-gradient(rgba(0,0,0,0.8), var(--snl-black));
    border-bottom: 2px solid var(--snl-gold);
}

.ep-title {
    font-size: 4rem;
    margin: 10px 0;
    text-transform: uppercase;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: #333;
}


/* --- Meta & Links --- */

.ep-meta-top {
    color: var(--snl-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
}

/* Combined link logic for Meta and Stats */
.ep-meta-top a, 
.stat-value a {
    color: var(--snl-gold) !important;
    text-decoration: none !important;
}

.ep-meta-top a:hover, 
.stat-value a:hover {
    text-decoration: underline !important;
}

/* --- Profile Section --- */

.profile-header {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 80px;
    border-bottom: 1px solid #222;
    padding-bottom: 60px;
}

.profile-photo {
    width: 300px;
    height: 400px;
    background: #1a1a1a;
    border: 1px solid #333;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.profile-header:hover .profile-photo img {
    filter: grayscale(0%);
}

.profile-info h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    text-transform: uppercase;
    margin: 0;
    line-height: 0.9;
    color: var(--snl-gold);
}

h1#page-title {font-family: 'Bebas Neue', sans-serif;margin:35px 0 0 0;font-size: 5rem;text-transform: uppercase; color: var(--snl-gold);}

.profile-info p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 20px;
    max-width: 600px;
}

.profile-info a {
    color: var(--text-white);
    text-decoration: none;
}

.profile-info a:hover {
    text-decoration: underline;
}

.profile-info a:visited {
    color: #aaa !important;
}

/* --- Home Page --- */

      .hero {
            height: 60vh;
            background: linear-gradient(to bottom, transparent, var(--bg-color));
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }
        
    form {width: 60% !important;}        
.search-bar {
            width: 100% !important;
            padding: 20px;
            background: rgba(255,255,255,0.1);
            border: 2px solid var(--accent-gold);
            border-radius: 50px;
            color: white;
            font-size: 1.2rem;
            backdrop-filter: blur(10px);
            outline: none;
        }
   .category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            padding: 50px 5%;
        }
        .cat-card {
            background: var(--card-bg);
            padding: 30px;
            text-align: center;
            border-radius: 8px;
            transition: transform 0.3s ease;
            border: 1px solid #333;
            cursor: pointer;
        }
        .cat-card:hover {
            transform: translateY(-10px);
            border-color: var(--accent-gold);
        }     
        
        
        
/* --- Sidebar & Stats --- */

.ep-sidebar {
    background: var(--snl-dark-grey);
    padding: 30px;
    border-radius: 4px;
    height: fit-content;
    border-top: 4px solid var(--snl-blue);
}

.stat-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--snl-gold);
}

/* --- Sketch Cards --- */

.sketch-card {
    background: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border-left: 0 solid var(--snl-gold);
    transition: 0.3s;
}


/* Perfect Centering and Cropping */
.sketch-thumb {
    width: 200px;
    height: 170px; /* Matches your current height */
    overflow: hidden;
    display: block;
    flex-shrink: 0;
}

.sketch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This centers and crops automatically */
    transition: transform 0.3s ease;
}

.sketch-card:hover .sketch-thumb img {
    transform: scale(1.05); /* Subtle zoom effect on hover */
}

/* Lightbox / Popup Window Styles */
.video-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

.overlay-container {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    width: 90%;
    max-width: 900px;
    margin: auto;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.video-responsive iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.close-video {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
}


.sketch-card:hover {
    background: #222;
    border-left-width: 5px;
}


.sketch-info { padding: 20px; }


.sketch-tags {
    font-size: 0.7rem;
    background: var(--snl-blue);
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 5px;
    text-transform: uppercase;
}

.sketch-info a {color:#fff !important;text-decoration:none;}
.sketch-info a:hover {text-decoration:underline;display:block;}

/* --- Tables & Lists --- */

.appearance-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--snl-dark);
    border-radius: 4px;
    overflow: hidden;
}

.appearance-table th {
    text-align: left;
    padding: 18px 20px;
    background: #1a1a1a;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    border-bottom: 2px solid #222;
}

.appearance-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #222;
    font-size: 1rem;
}

.appearance-table tr:last-child td { border-bottom: none; }
.appearance-table tr:hover { background: #181818; }

.season-badge {
    background: var(--snl-gold);
    color: #000;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 900;
    font-size: 0.85rem;
    margin-right: 10px;
}

.episode-link {
    color: var(--text-white) !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.episode-link:hover { color: var(--snl-gold); }
.air-date { color: var(--text-muted); font-size: 0.9rem; }

   :root {
            --bg-color: #0a0a0a;
            --text-main: #ffffff;
            --accent-gold: #caab56;
        }
        body {
            background-color: var(--bg-color);
            color: var(--text-main);
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 40px 5%;
        }
        h2 { font-size: 3rem; text-transform: uppercase; color: var(--accent-gold); }
      
        .filter-nav {
            margin-bottom: 30px;
            color: #888;
        }
        .filter-nav span {
            margin-right: 20px;
            cursor: pointer;
            text-transform: uppercase;
            font-weight: bold;
        }
        
          .filter-nav a {
            margin-right: 20px;
            cursor: pointer;
            text-transform: uppercase;
            font-weight: bold;
            text-decoration:none;
        }
        
        .filter-nav a:visited {color:#888;}
        
        .filter-nav .active, a.active:visited {
            color: var(--accent-gold) !important;
            border-bottom: 2px solid var(--accent-gold);
        }
        
        .cast-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 30px;
        }
      .cast-item {
    display: block; /* Ensures the whole area is clickable */
    text-decoration: none; /* Removes underlines from the text */
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 2/3;
    background: #1a1a1a;
    border: 1px solid #333;
    transition: transform 0.3s ease; /* Optional: adds a little lift on hover */
}

.cast-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

/* Ensure the text colors don't change to default blue/purple link colors */
.cast-name, .cast-tenure {
    color: #fff !important; 
}
        .cast-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: grayscale(100%) contrast(1.1);
            transition: filter 0.4s ease;
        }
        .cast-item:hover .cast-img {
            filter: grayscale(0%);
        }
        .cast-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 20px;
            background: linear-gradient(transparent, rgba(0,0,0,0.9));
        }
        .cast-name {
            font-weight: bold;
            font-size: 1.4rem;
            margin: 0;
        }
        .cast-tenure {
            color: var(--accent-gold);
            font-size: 0.9rem;
        }
        
        .pagination {
    grid-column: 1 / -1; /* Spans across the full grid width */
    margin-top: 40px;
    text-align: center;
    padding: 20px;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #333;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.pagination .current {
    background-color: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

.pagination a:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.season-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 20px 0; /* Spacing above/below the nav */
        width: 100%;
        padding-top: 15px;
    }

    .season-navigation a {
        text-decoration: none;
        color: #888; /* Inconspicuous grey */
        font-family: sans-serif; /* Use your site's bold font here */
        font-weight: 900;
        font-size: 14px;
        letter-spacing: 1px;
        text-transform: uppercase;
        transition: color 0.2s ease;
    }

    .season-navigation a:hover {
        color: #fff; /* Brightens on hover */
    }

    /* Pushes 'Next' to the right even if 'Previous' is missing */
    .btn-next {
        margin-left: auto;
    }


/* --- Admin Buttons --- */

.edit-wp-button {
    position: fixed;
    bottom: 50px;
    right: 50px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.edit-wp-button a {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    font-family: sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 14px;
    background-color: #444;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.edit-wp-button a:hover {
    background-color: #111;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.edit-wp-button a:active {
    transform: translateY(0);
}


.sketch-people a {
    display: inline-block !important;
    white-space: nowrap !important;
}

/* --- Responsive Design / Mobile Styles --- */

@media (max-width: 1024px) {
    /* Switch to single column and use order to move sidebar up */
    .ep-container {
        display: flex;
        flex-direction: column;
        padding: 20px 5%;
    }
    
    .ep-sidebar {
        order: -1; /* This moves the sidebar to the very top of the flex container */
        margin-bottom: 30px;
        border-top: none;
        border-left: 4px solid var(--snl-blue);
        width: auto; /* Overrides the 350px width if necessary */
    }

    .ep-main {
        order: 1;
    }

    /* Keep the profile header centered for the "People" pages */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin-bottom: 40px;
        padding-bottom: 40px;
    }

    .profile-photo {
        width: 250px;
        height: 330px;
    }

    .profile-info h1 {
        font-size: 3.5rem;
    }
}



/* --- Sticky Header Base --- */
/* --- Fixed Header --- */
.site-header {
    position: fixed; /* Changed from sticky to fixed */
    top: 0;
    left: 0;         /* Ensures it starts at the very left edge */
    right: 0;        /* Ensures it stretches to the very right edge */
    width: 100%;
    z-index: 1000;
    background-color: #000 !important;
    border-bottom: 1px solid #222;
    padding: 15px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.site-logo a {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--snl-gold);
    text-decoration: none;
    letter-spacing: 2px;
}

.site-logo a:span {
    color: #fff !important;
}


.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.site-nav a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

.site-nav a:hover {
    color: var(--snl-gold);
}

/* --- Mobile Menu Logic --- */
.nav-toggle {
    display: none; /* Hide the checkbox */
}

.nav-toggle-label {
    display: none; /* Hide hamburger on desktop */
    cursor: pointer;
    padding: 10px;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--text-white);
    height: 2px;
    width: 25px;
    position: relative;
    transition: all 0.3s;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before { bottom: 8px; }
.nav-toggle-label span::after { top: 8px; }

/* --- Tablet/Mobile Adjustments --- */
@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--snl-dark-grey);
        width: 100%;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-in-out;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
        gap: 20px;
    }

    /* When checkbox is checked, show the menu */
    .nav-toggle:checked ~ .site-nav {
        height: 300px;
        border-bottom: 2px solid var(--snl-gold);
    }
    
    /* Hamburger to 'X' animation */
    .nav-toggle:checked + .nav-toggle-label span { background: transparent; }
    .nav-toggle:checked + .nav-toggle-label span::before { transform: rotate(45deg); top: 0; }
    .nav-toggle:checked + .nav-toggle-label span::after { transform: rotate(-45deg); top: 0; }
}
