/* Header */
.site-header {
    align-items: center;
    background: linear-gradient(180deg, rgba(5, 7, 11, 0.9), rgba(5, 7, 11, 0));
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 24px 36px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 20;
    transition: background 0.3s ease;
}
.site-header.scrolled { background: rgba(5, 7, 11, 0.95); backdrop-filter: blur(10px); }
.brand { font-size: 1.35rem; font-weight: 950; letter-spacing: 0.05em; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; }
.nav-links a:hover { color: white; }

/* Cinematic Hero Slider */
.hero-slider {
    position: relative;
    min-height: 100vh;
    justify-content: center;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.slider-backgrounds {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slider-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.slider-bg.active { opacity: 1; }

.slider-vignette {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, rgba(5, 7, 11, 0.98) 0%, rgba(5, 7, 11, 0.6) 40%, transparent 80%),
        linear-gradient(0deg, var(--bg) 0%, transparent 40%);
}

.slider-content {
    position: relative;
    z-index: 2;
    padding: 112px 36px 72px;
    width: 100%;
    /* Let the container manage the height naturally */
}

.hero-copy {
    max-width: 620px;
    display: none; /* Hide inactive slides completely */
}

.hero-copy.active {
    display: block; /* Show the active slide */
}

/* * The Staggered Cinematic Animation 
 * Elements start slightly lower and transparent, then slide up into place.
 */
.hero-copy.active .eyebrow,
.hero-copy.active h1,
.hero-copy.active .movie-meta,
.hero-copy.active .hero-summary,
.hero-copy.active .hero-actions {
    opacity: 0;
    transform: translateY(20px);
    animation: cinematicEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger the entrance times for that premium feel */
.hero-copy.active .eyebrow       { animation-delay: 0.1s; }
.hero-copy.active h1             { animation-delay: 0.2s; }
.hero-copy.active .movie-meta    { animation-delay: 0.3s; }
.hero-copy.active .hero-summary  { animation-delay: 0.4s; }
.hero-copy.active .hero-actions  { animation-delay: 0.5s; }

@keyframes cinematicEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-copy h1 { 
    font-size: clamp(4rem, 10vw, 8.5rem); 
    line-height: 0.85; 
    letter-spacing: -0.04em; 
    margin: 0 0 18px; 
}
/* ... keep your existing .movie-meta, .hero-summary, and .hero-actions styles below this ... */
.movie-meta { color: var(--muted); display: flex; gap: 12px; margin-bottom: 20px; font-weight: 800; }
.movie-meta span:not(:last-child)::after { content: "•"; margin-left: 12px; color: rgba(255,255,255,0.35); }
.hero-summary { color: #d8dde6; font-size: 1.05rem; line-height: 1.7; max-width: 560px; letter-spacing: -0.05em; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; }

/* Slider Thumbnails */
.slider-nav {
    position: absolute;
    bottom: 40px;
    right: 36px;
    z-index: 10;
    display: flex;
    gap: 12px;
}
.slider-thumb {
    width: 140px;
    aspect-ratio: 16/9;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease;
}
.slider-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: opacity 0.3s; }
.slider-thumb:hover { transform: translateY(-4px); }
.slider-thumb:hover img { opacity: 1; }
.slider-thumb.active { border-color: white; transform: scale(1.05); }
.slider-thumb.active img { opacity: 1; }

.thumb-progress {
    position: absolute;
    bottom: 0; left: 0; height: 3px; background: var(--accent); width: 0;
}
.slider-thumb.active .thumb-progress {
    animation: thumbTimer 8s linear forwards;
}

@keyframes thumbTimer {
    from { width: 0%; }
    to { width: 100%; }
}

/* Rails & Search (Using the new kinematics) */
.toolbar { padding: 20px 36px 0; }
.search-field { display: grid; gap: 8px; max-width: 480px; }
.search-field span { color: var(--muted); font-size: 0.84rem; font-weight: 800; }

.movie-rails { padding: 28px 0 56px; }
.rail { padding: 0 0 48px 36px; }
.rail-heading h2 { font-size: 4.5rem; letter-spacing: -0.04em; margin: 0 0 18px; text-transform: uppercase; }

.movie-row {
    display: grid; gap: 16px; grid-auto-columns: minmax(164px, 190px); grid-auto-flow: column;
    overflow-x: auto; padding: 0 36px 14px 0; scrollbar-color: rgba(255,255,255,0.22) transparent;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
}

.movie-card { position: relative; z-index: 1; transition: z-index 0ms 0ms; scroll-snap-align: start; }
.movie-card:hover, .movie-card:focus-within { z-index: 10; transition: z-index 0ms 300ms; }

.poster-button {
    aspect-ratio: 2/3; background: var(--surface-2); border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius); color: white; cursor: pointer; overflow: hidden; padding: 0;
    position: relative; text-align: left; width: 100%;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), border-color 300ms ease;
}
.poster-button img { height: 100%; object-fit: cover; width: 100%; }
.poster-button:hover, .poster-button:focus { border-color: rgba(255,255,255,0.32); transform: scale(1.08); }
.poster-gradient { background: linear-gradient(0deg, rgba(0,0,0,0.92), transparent 58%); position: absolute; inset: 0; }
.poster-copy { bottom: 14px; display: grid; gap: 3px; left: 14px; position: absolute; right: 14px; }
.poster-copy strong { font-size: 0.95rem; }
.poster-copy small { color: var(--accent-2); font-weight: 900; }
.poster-fallback { align-items: center; display: flex; height: 100%; justify-content: center; padding: 18px; text-align: center; }

.bookmark {
    align-items: center; background: rgba(0,0,0,0.58); border: 1px solid rgba(255,255,255,0.13); border-radius: 999px;
    color: white; cursor: pointer; display: flex; height: 32px; justify-content: center; position: absolute;
    right: 10px; top: 10px; width: 32px; z-index: 4;
}
.bookmark.is-saved { background: var(--accent); border-color: var(--accent); }
.bookmark-note { color: var(--muted); padding: 0 36px 72px; }

/* Modal Detail View */
@keyframes modalPop { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }

.modal {
    align-items: center; background: rgba(0,0,0,0.76); bottom: 0; display: flex; justify-content: center;
    left: 0; padding: 32px; position: fixed; right: 0; top: 0; z-index: 50; opacity: 1;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal[hidden] { display: flex; opacity: 0; pointer-events: none; }
.modal-open { overflow: hidden; }

.modal-panel {
    background: #080b11; border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius);
    box-shadow: var(--shadow); max-height: 92vh; max-width: 980px; overflow: auto; position: relative; width: min(980px, 100%);
}
.modal:not([hidden]) .modal-panel { animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.modal-close {
    background: rgba(0,0,0,0.62); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; color: white;
    cursor: pointer; font-size: 2rem; height: 44px; line-height: 1; position: absolute; right: 16px; top: 16px; width: 44px; z-index: 3;
}
.modal-media { aspect-ratio: 16/9; background: #111722; }
.modal-media iframe { border: 0; height: 100%; width: 100%; }
.modal-body { padding: 28px; }
.modal-body h2 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1; margin: 0 0 16px; text-transform: uppercase; }
.modal-body > p { color: #d9dee8; line-height: 1.7; }
.modal-actions { margin: 22px 0; }
.detail-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); margin-top: 28px; }
.detail-grid h3 { color: var(--accent-2); font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase; }
.detail-grid p, .breakdown-text { color: #c8d0dd; line-height: 1.72; }

@media (max-width: 820px) {
    .site-header { padding: 18px; }
    .slider-nav { display: none; /* Hide thumbs on mobile */ }
    .hero-copy h1 { font-size: 6em; }
    .detail-grid { grid-template-columns: 1fr; }
    .rail-heading h2 {font-size: 2.5em;}
}

/* ----------------------------------------------------- */
/* Movie Blog Post Layout (Redesign)                     */
/* ----------------------------------------------------- */

.movie-blog-container {
    padding: 120px 24px 80px; /* Account for fixed header */
    min-height: 100vh;
}

.movie-blog-article {
    max-width: 860px;
    margin: 0 auto;
}

.movie-blog-header {
    margin-bottom: 32px;
    text-align: center;
}

.movie-blog-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: 2px;
}

.movie-blog-breadcrumbs {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.breadcrumb-separator {
    opacity: 0.5;
}

.movie-blog-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
}

.movie-blog-trailer, .movie-blog-featured-image {
    width: 100%;
    aspect-ratio: 16/9;
    margin: 0 0 48px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    background: #000;
}

.movie-blog-trailer iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.movie-blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.movie-blog-content {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.movie-blog-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(229, 9, 20, 0.2);
    padding-bottom: 8px;
}

.movie-blog-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    white-space: pre-wrap;
}

/* Mobile Menu */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 30;
}
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    margin: 6px 0;
    transition: 0.3s ease;
}

@media (max-width: 900px) {
    .hamburger-btn { display: block; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(5, 7, 11, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 25;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.is-open {
        right: 0;
    }
    
    .hamburger-btn.is-active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-btn.is-active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.is-active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}