/* =====================================================
   BASE.CSS
   Global layout, navigation, components, utilities
   ===================================================== */


/* =====================================================
   1. CSS VARIABLES
   ===================================================== */

:root {
    --bg: #0b0b0b;
    --panel: rgba(255,255,255,0.02);
    --card-bg: rgba(255,255,255,0.03);
    --card-hover: rgba(255,255,255,0.06);
    --text: #ffffff;
    --muted: #aaa;
    --muted2: #cfcfcf;
    --line: #222;
    --glass: rgba(0,0,0,0.75);
    --accent: #d60000;
    --accent2: #2f7dff;
    --accent-2: #2f7dff;
    --gold: #b99757;
    --radius: 14px;
    --radius-lg: 20px;
    --max: 1300px;
}

.nav-icon {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex-shrink: 0;
    transition: fill .2s ease;
}

/* =====================================================
   2. RESET / GLOBAL ELEMENTS
   ===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}


/* =====================================================
   3. HEADER + NAVIGATION
   ===================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.65));
    border-bottom: 1px solid rgba(255,255,255,.06);
}

    /* Creates an invisible strip that keeps hover "alive" while moving down */
    .site-header::after {
        content: "";
        position: fixed;
        left: 0;
        right: 0;
        top: 72px; /* same as .mega-menu top */
        height: 14px; /* adjust 10–20px */
        z-index: 2099; /* just under the mega menu (2100) */
        background: transparent;
        pointer-events: auto;
    }

.nav-inner {
    position: relative;
    padding: 18px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    max-width: none;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-film-icon {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.logo-main {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Nav links */
nav a {
    color: #ccc;
    font-size: 14px;
    transition: color .15s ease;
}

    nav a:hover {
        color: #fff;
    }

/* #5 - Keyboard focus styles (accessibility) */
:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
    border-radius: 4px;
}

.btn:focus-visible,
.film-card:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
}

.nav-link:focus-visible,
.nav-trigger:focus-visible,
.nav-cta:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 4px;
    border-radius: 4px;
}

.primary-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 24px;
}
    .primary-nav > * {
        position: relative;
    }

    /* Make both <a> and .has-mega behave the same */
    .primary-nav > a,
    .primary-nav > .has-mega {
        display: inline-flex;
        align-items: center;
        height: auto;
        padding: 6px 0;
    }

.nav-link {
    font-weight: 500;
}

    .nav-link:hover,
    .nav-trigger:hover {
        color: #fff;
    }

.nav-trigger {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #cfcfcf;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    align-items: center;
}

/* =================================
   Animated gradient nav underline
================================= */

    /* underline element */
    .nav-link::after,
    .nav-trigger::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient( 90deg, #ff004c, #ff8a00, #ffd500, #2f7dff, #7c3cff );
        background-size: 300% 100%;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .28s ease;
        opacity: 0.9;
    }

    /* animate underline */
    .nav-link:hover::after,
    .nav-trigger:hover::after,
    .nav-link.active::after {
        transform: scaleX(1);
    }

    /* animated gradient movement */
    .nav-link:hover::after,
    .nav-trigger:hover::after {
        animation: navGradientMove 2s linear infinite;
    }

@keyframes navGradientMove {
    from {
        background-position: 0% 0;
    }

    to {
        background-position: 200% 0;
    }
}

/* Donate CTA link */
.nav-cta {
    font-weight: 700;
    font-size: 14px;
    color: var(--gold);
    transition: color .15s ease;
}

    .nav-cta:hover {
        color: #fff;
    }


/* ================================
   MEGA MENU
================================ */

.mega-nav {
    position: relative;
}

.has-mega {
    position: relative;
}

.mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: 72px; /* keep your header offset */
    width: auto; /* important: don't use 100vw */

    background: rgba(10,10,10,.92);
    backdrop-filter: blur(28px);
    border-top: 1px solid rgba(255,255,255,.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
    z-index: 2100;
}

.has-mega.active .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
    transform: translateY(0);
}

.mega-grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 60px; /* matches your screenshot spacing */

    display: grid;
    grid-template-columns: 1fr 1fr 420px; /* right feature card width */
    gap: 80px;
    align-items: start;
}

.mega-section a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #dcdcdc;
    margin-bottom: 8px;
    transition: all .25s ease;
}

    .mega-section a:hover {
        color: #fff;
        transform: translateX(4px);
    }

.mega-section i {
    width: 18px;
    text-align: center;
    color: #777;
    font-size: 14px;
    transition: color .2s ease;
}

.mega-section a:hover i {
    color: #fff;
}

.mega-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: #888;
    font-weight: 900;
    display: block;
    margin-bottom: 10px;
}

.mega-feature {
    border-radius: 10px;
    padding: 26px;
    background: radial-gradient(600px 200px at 20% 20%, rgba(47,125,255,.18), transparent 60%), radial-gradient(600px 200px at 80% 80%, rgba(214,0,0,.18), transparent 60%), rgba(25,25,25,.95);
    border: 1px solid rgba(255,255,255,.08);
}

    .mega-feature h3 {
        font-size: 22px;
        margin: 14px 0;
        font-weight: 900;
    }

    .mega-feature p {
        font-size: 14px;
        color: #aaa;
        line-height: 1.6;
        margin-bottom: 20px;
    }


/* =====================================================
   5. SEARCH
   ===================================================== */

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 22px;
}

    .nav-search svg {
        position: absolute;
        left: 10px;
        width: 16px;
        height: 16px;
        transform: translateY(50%);
        opacity: .7;
        pointer-events: none;
    }
    .nav-search form {
        position: relative;
        width: 100%;
        margin: 0;
    }

.nav-search-input {
    width: 150px;
    padding: 8px 14px 8px 34px;
    font-size: 13px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
    color: #fff;
    outline: none;
    transition: all .2s ease;
}

    .nav-search-input::placeholder {
        color: #666;
    }

    .nav-search-input:focus {
        width: 240px;
        border-color: rgba(255,255,255,0.25);
        background: rgba(255,255,255,0.10);
    }

.search-dropdown {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    width: 420px;
    max-height: 450px;
    overflow-y: auto;
    background: rgba(20,20,20,0.98);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 9999;
}

.search-result-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .search-result-item:hover {
        background: rgba(255,255,255,0.08);
    }

    .search-result-item img {
        width: 110px;
        height: 62px;
        object-fit: cover;
        border-radius: 6px;
    }

/* =====================================================
   6. BUTTONS
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: #eee;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .6px;
    text-transform: uppercase;
    transition: transform .22s cubic-bezier(.16,1,.3,1), background .2s ease, border-color .2s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,0.10);
        border-color: rgba(255,255,255,0.18);
    }

    .btn.primary {
        background: linear-gradient(135deg, rgba(214,0,0,0.96), rgba(161,0,0,0.96));
        border-color: rgba(214,0,0,0.45);
        color: #fff;
    }

    .btn.secondary {
        background: linear-gradient(135deg, rgba(47,125,255,0.94), rgba(31,94,214,0.94));
        border-color: rgba(47,125,255,0.42);
        color: #fff;
    }

    .btn.donate {
        background: linear-gradient(135deg, #d60000, #9f0000);
        border-color: rgba(214,0,0,0.6);
        color: #fff;
        padding: 16px 26px;
    }


/* =====================================================
   7. FILM CARDS
   ===================================================== */

.card-body {
    padding: 16px;
}

.card-meta {
    color: var(--muted);
    font-size: 13px;
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: black;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Pill / badge shared components */
.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.category-pill {
    background: rgba(255,215,0,0.15);
    color: #ffd700;
}

.flag-pill {
    padding: 3px 6px;
}

    .flag-pill img {
        width: 20px;
        height: auto;
        border-radius: 3px;
    }

.flag-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    z-index: 2;
}

    .flag-badge img {
        width: 20px;
        height: 14px;
        border-radius: 2px;
        object-fit: cover;
    }

/* =====================================================
   8. BLOG / POST CARDS
   ===================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 12px;
}

.post-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius);
    overflow: visible;
    transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

    .post-card:hover {
        background: var(--card-hover);
        border-color: rgba(255,255,255,0.08);
        transform: translateY(-2px);
    }

.post-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
}

    .post-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: .95;
        transition: transform .35s ease, opacity .35s ease;
    }

.post-card:hover .post-thumb img {
    transform: scale(1.06);
    opacity: 1;
}

.post-body {
    padding: 16px 18px 18px;
}

.post-title {
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    color: #9a9a9a;
    font-size: 13.5px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}


/* =====================================================
   9. FOOTER
   ===================================================== */

.site-footer {
    margin-top: 40px;
    position: relative;
    background: #0b0b0b;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 60px 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.9fr;
    gap: 52px;
    padding-bottom: 44px;
}

.footer-brand-name {
    font-size: 20px;
    font-weight: 950;
    color: #fff;
    letter-spacing: -0.3px;
    margin: 0 0 14px 0;
}

.footer-brand p {
    color: #777;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 8px 0;
}

.footer-brand a {
    color: var(--accent-2);
    font-weight: 800;
}

.footer-col-label {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #555;
    margin: 0 0 18px 0;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
}

    .footer-links-grid a {
        display: block;
        color: #888;
        font-size: 14px;
        padding: 6px 0;
        transition: color .15s ease;
    }

        .footer-links-grid a:hover {
            color: #fff;
        }

.footer-contact-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    color: #888;
    font-size: 14px;
    line-height: 1.6;
    align-items: flex-start;
}

.fc-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
    opacity: .45;
}

    .fc-icon svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: #fff;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

    .footer-bottom p {
        margin: 0;
        font-size: 12.5px;
        color: #444;
    }

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

    .footer-bottom-links a {
        color: #444;
        font-size: 12.5px;
        transition: color .15s ease;
    }

        .footer-bottom-links a:hover {
            color: #888;
        }


/* =====================================================
   10. UTILITIES & ANIMATIONS
   ===================================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}

    .reveal.reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

    .reveal-left.reveal-visible,
    .reveal-right.reveal-visible {
        transform: translateX(0);
    }

.stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}

.stagger.reveal-visible > * {
    opacity: 1;
    transform: translateY(0);
}

    .stagger.reveal-visible > *:nth-child(1) {
        transition-delay: .05s;
    }

    .stagger.reveal-visible > *:nth-child(2) {
        transition-delay: .12s;
    }

    .stagger.reveal-visible > *:nth-child(3) {
        transition-delay: .19s;
    }

    .stagger.reveal-visible > *:nth-child(4) {
        transition-delay: .26s;
    }

    .stagger.reveal-visible > *:nth-child(5) {
        transition-delay: .33s;
    }

@media (prefers-reduced-motion: reduce) {
    .sponsors-track {
        animation: none !important;
    }

    .btn, .film-card, .post-card, .film-thumb img, .post-thumb img {
        transition: none !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

.main-hero {
    min-height: 52vh;
    display: flex;
    align-items: flex-end;
    padding: 0 60px 30px;
}

.main-hero-content {
    max-width: 820px;
    padding-top: 110px;
}

.main-hero h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.main-hero p {
    font-size: 18px;
    line-height: 1.7;
    color: #cfcfcf;
    max-width: 740px;
}

/* ===================== SECTION ===================== */
.main-section {
    position: relative;
    padding: 72px 60px 60px;
}

    .main-section::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient( circle at 50% 0%, rgba(185,151,87,0.06) 0%, rgba(185,151,87,0.025) 40%, transparent 75% );
        pointer-events: none;
        z-index: 0;
    }

.main-container {
    max-width: 1260px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}


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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

    .mobile-menu-toggle span {
        width: 26px;
        height: 2px;
        background: white;
        display: block;
    }


/* =====================================================
   MOBILE SLIDE NAV
   ===================================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

    .mobile-menu-toggle span {
        width: 26px;
        height: 2px;
        background: white;
        display: block;
    }


/* ========================================
   MOBILE NAV PANEL
   ======================================== */

@media (max-width: 900px) {

    .mobile-menu-toggle {
        display: flex;
    }


    /* slide panel */

    .primary-nav {
        position: fixed;
        top: 0;
        left: -320px;
        width: 320px;
        height: 100vh;
        background: #0b0b0b;
        flex-direction: column;
        padding: 90px 25px 40px;
        transition: left .35s ease;
        z-index: 1000;
        overflow-y: auto;
    }


        /* open state */

        .primary-nav.open {
            left: 0;
        }


    /* overlay */

    body.nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 900;
    }


    /* links */

    .primary-nav a,
    .nav-trigger {
        display: block;
        padding: 14px 0;
        font-size: 18px;
    }


    /* hide mega panels */

    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-left: 10px;
    }


    /* accordion open */

    .has-mega.open .mega-menu {
        display: block;
    }


    /* remove grid */

    .mega-grid {
        display: block;
    }

    .mega-feature {
        margin-top: 15px;
    }


    /* search */

    .nav-search {
        margin-top: 20px;
    }
}

.keyboard-selected {
    outline: 3px solid #f5c518;
    transform: scale(1.02);
    z-index: 5;
}

.search-result-item.keyboard-selected {
    background: rgba(212,175,55,0.12);
    outline: 2px solid #d4af37;
}