/* ================= Root & Theme ================= */

:root {
    --bg-main: #f9fafb;
    --bg-elevated: #ffffff;
    --bg-soft: #e5e7eb;

    --text-main: #020617;
    --text-muted: #4b5563;

    --accent-blue: #0ea5e9;
    --accent-blue-soft: rgba(14, 165, 233, 0.1);
    --accent-gold: #facc15;

    --border-subtle: #e5e7eb;

    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.09);

    --header-bg: rgba(248, 250, 252, 0.9);
    --hero-bg-from: #020617;
    --hero-bg-to: #0b1120;
}

:root[data-theme="dark"] {
    --bg-main: #020617;
    --bg-elevated: #020617;
    --bg-soft: #030712;

    --text-main: #e5e7eb;
    --text-muted: #9ca3af;

    --accent-blue: #0ea5e9;
    --accent-blue-soft: rgba(14, 165, 233, 0.15);
    --accent-gold: #facc15;

    --border-subtle: #1f2937;

    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.8);

    --header-bg: rgba(2, 6, 23, 0.9);
    --hero-bg-from: #020617;
    --hero-bg-to: #020617;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ================= Layout Helpers ================= */

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 3.5rem 0;
}

.section-alt {
    padding: 3.5rem 0;
    background: var(--bg-soft);
}

.section-header {
    max-width: 620px;
    margin: 0 auto 2rem auto;
    text-align: center;
}

.section-header h2 {
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
}

.section-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.98rem;
}

/* ================= Header & Nav ================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(16px);
    background: var(--header-bg);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 25%, #ffffff 0, #0ea5e9 36%, #020617 100%);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-mark::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 10px;
    border: 1.6px solid rgba(250, 204, 21, 0.9);
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.7);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-name {
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
}

.brand-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Nav */

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 0.86rem;
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    padding-bottom: 0.15rem;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
    transition: width 0.16s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a.active {
    color: var(--accent-blue);
}

.main-nav a.active::after {
    width: 100%;
}

/* Mobile nav toggle */

.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    padding: 0.4rem;
    flex-direction: column;
    gap: 0.16rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text-main);
}

/* Theme toggle */

.theme-toggle {
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ================= Hero ================= */

.hero {
    position: relative;
    min-height: 70vh;
    padding: 3.5rem 0 3.5rem;
    overflow: hidden;
    color: #e5e7eb;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0 0, rgba(14, 165, 233, 0.28) 0, transparent 55%),
        radial-gradient(circle at 100% 0, rgba(250, 204, 21, 0.22) 0, transparent 55%),
        linear-gradient(135deg, var(--hero-bg-from), var(--hero-bg-to));
    z-index: -2;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    opacity: 0.5;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.5fr);
    gap: 2.6rem;
    align-items: center;
}

.hero-text {
    max-width: 560px;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: #e5e7eb;
    opacity: 0.85;
    margin-bottom: 0.6rem;
}

.hero h1 {
    font-size: 2.3rem;
    margin: 0 0 0.8rem 0;
}

.hero-subtitle {
    font-size: 0.97rem;
    color: #e5e7eb;
    max-width: 460px;
    margin-bottom: 1.4rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-gold));
    color: #020617;
    font-weight: 600;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
}

.btn.ghost {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.7);
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    font-size: 0.86rem;
}

.hero-card h2 {
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #e5e7eb;
}

.hero-card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #e5e7eb;
}

.hero-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.3rem 1.1rem;
    font-size: 0.8rem;
    color: #e5e7eb;
}

.hero-card dt {
    opacity: 0.7;
}

.hero-card dd {
    margin: 0;
    font-weight: 500;
}

/* ================= Cards ================= */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.6rem;
}

.card {
    background: var(--bg-elevated);
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
    border-color: var(--accent-blue);
}

.card-media img {
    width: 100%;
    display: block;
    height: 170px;
    object-fit: cover;
}

.card-body {
    padding: 1rem 1.1rem 1.1rem;
    font-size: 0.92rem;
}

.card-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.02rem;
}

.card-body p {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
}

.card-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-list {
    list-style: disc;
    padding-left: 1.1rem;
    color: var(--text-muted);
    margin: 0.3rem 0 0.7rem;
}

.text-link {
    font-size: 0.85rem;
    color: var(--accent-blue);
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

/* Grids */

.about-grid,
.research-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.about-block,
.contact-block {
    background: var(--bg-elevated);
    border-radius: 18px;
    padding: 1.3rem 1.3rem 1.1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    font-size: 0.92rem;
}

.about-block h3,
.contact-block h3 {
    margin-top: 0;
}

/* Media */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.video-wrapper video {
    width: 100%;
    border-radius: 14px 14px 0 0;
    display: block;
}

/* Contact list */

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.contact-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.contact-list li + li {
    margin-top: 0.65rem;
}

.contact-list a {
    color: var(--accent-blue);
    text-decoration: none;
}

/* ================= Footer ================= */

.site-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.footer-inner {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-note {
    margin-top: 0.3rem;
}

/* ================= Preloader ================= */

.preloader {
    position: fixed;
    inset: 0;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    color: #e5e7eb;
    font-size: 0.8rem;
}

.preloader-logo {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1.8px solid rgba(148, 163, 184, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preloader-logo::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 10px;
    border: 1.5px solid rgba(250, 204, 21, 0.9);
    box-shadow: 0 0 18px rgba(14, 165, 233, 0.9);
    animation: preloaderPulse 1.3s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0% { transform: scale(0.9); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.9; }
}

/* ================= Scroll Animations ================= */

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* ================= Chatbot ================= */

.ep-chat-wrapper {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    font-family: inherit;
}

.ep-chat-button {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background:
        radial-gradient(circle at 30% 25%, #ffffff 0, #0ea5e9 35%, #020617 100%);
    color: #f9fafb;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ep-chat-button:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.95);
}

.ep-chat-window {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: 320px;
    max-height: 430px;
    background: radial-gradient(circle at 0 0, rgba(14, 165, 233, 0.22) 0, transparent 52%), #020617;
    color: #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.6);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    overflow: hidden;
}

.ep-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ep-chat-header {
    padding: 0.6rem 0.8rem;
    background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(15,23,42,1));
    border-bottom: 1px solid rgba(148, 163, 184, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ep-chat-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.ep-chat-subtitle {
    display: block;
    font-size: 0.7rem;
    color: #cbd5f5;
}

.ep-chat-close {
    border: none;
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    border-radius: 999px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ep-chat-log {
    padding: 0.55rem 0.55rem 0.4rem;
    overflow-y: auto;
    flex: 1;
    font-size: 0.8rem;
    background:
        radial-gradient(circle at 100% 100%, rgba(250, 204, 21, 0.18) 0, transparent 55%),
        #020617;
}

.ep-chat-message {
    margin-bottom: 0.35rem;
    display: flex;
}

.ep-chat-message.bot {
    justify-content: flex-start;
}

.ep-chat-message.user {
    justify-content: flex-end;
}

.ep-chat-message .bubble {
    max-width: 80%;
    padding: 0.4rem 0.55rem;
    border-radius: 12px;
    line-height: 1.4;
}

.ep-chat-message.bot .bubble {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.ep-chat-message.user .bubble {
    background: var(--accent-blue);
    color: #020617;
    border-radius: 12px 12px 3px 12px;
}

.ep-chat-input-row {
    display: flex;
    padding: 0.4rem 0.45rem 0.45rem;
    gap: 0.35rem;
    border-top: 1px solid rgba(30, 64, 175, 0.98);
    background: rgba(15, 23, 42, 0.97);
}

.ep-chat-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
}

.ep-chat-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.ep-chat-send {
    border-radius: 999px;
    border: none;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
    background: var(--accent-blue);
    color: #020617;
}

/* ================= Responsive ================= */

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-top: 3rem;
    }

    .hero-side {
        margin-top: 1.4rem;
    }

    .main-nav {
        position: absolute;
        inset: 100% 0 auto 0;
        background: var(--header-bg);
        border-bottom: 1px solid rgba(148, 163, 184, 0.4);
        padding: 0.6rem 1.25rem 0.9rem;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .main-nav.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.6rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .header-inner {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .ep-chat-window {
        right: 8px;
        bottom: 64px;
        width: 90vw;
        max-height: 60vh;
    }

    .ep-chat-wrapper {
        right: 10px;
        bottom: 12px;
    }
}
/* ============ FIX: Uniform Videos ============ */
.media-grid {
    display: grid;
    /* This forces columns to be min 250px, max 1fr. Automatic resizing */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.video-wrapper {
    width: 100%;
    /* Forces a 16:9 ratio (YouTube style) for ALL videos */
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video fills the box without stretching */
}

/* ============ FIX: Image Logo Sizing ============ */
.brand-logo-img {
    height: 40px; /* Force logo to be small and neat */
    width: auto;
    border-radius: 50%; /* Makes it a circle if your image is square */
    border: 2px solid var(--accent-gold);
}

/* ============ FIX: Chatbot Buttons ============ */
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.chat-btn {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--text-main);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    text-align: left;
}
.chat-btn:hover {
    background: var(--accent-blue);
    color: #000;
}
/* ============ FINAL FIXES ============ */

/* 1. Hero Background - BRIGHTER */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The Dimmer: Much lighter now (0.3 opacity instead of 0.7) */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(2, 6, 23, 0.3) 0%,   /* Much clearer at top */
        rgba(2, 6, 23, 0.2) 50%,  /* Almost clear in middle */
        rgba(2, 6, 23, 0.8) 100%  /* Dark only at very bottom for text contrast */
    );
    z-index: 1;
}

/* 2. Logo Sizing (Using Myicon_64x64.png) */
.brand-logo-img {
    height: 42px;
    width: 42px;
    object-fit: contain;
    border-radius: 50%;
    border: 1.5px solid var(--accent-gold);
    margin-right: 10px;
    background: #000;
}

/* 3. Fix Videos (FULL VIEW - NO CROPPING) */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;       /* Centers the video */
    align-items: center;
    justify-content: center;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* <--- THIS FIXES THE ZOOM. Shows full video. */
}
/* ============ CLICKABLE CARDS FIX ============ */

/* Turn the link into a block that looks like a card */
a.card {
    text-decoration: none; /* Removes underline */
    color: inherit;        /* Keeps text color normal */
    display: block;        /* Makes it a solid box */
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

/* Hover Effect */
a.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    background: var(--bg-elevated);
}

/* The "Tabbed" / Click Effect */
a.card:active {
    transform: scale(0.98); /* Shrinks slightly when you tap it */
    border-color: var(--accent-gold); /* Flashes gold */
}

/* Remove old link styles inside the card if any remain */
a.card h3 {
    color: var(--text-main);
}

/* ================= Media cards (images + video) ================= */

.media-card .card-media {
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

.media-card .card-media img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.media-card .card-body {
    padding: 1.1rem 1.1rem 1.2rem;
}



/* ================= Reveal animation ================= */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ================= Mobile nav (toggle) ================= */

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--header-bg);
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
        display: none;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.75rem 1rem;
    }

    .main-nav li + li {
        margin-top: 0.35rem;
    }

    .main-nav a {
        display: block;
        padding: 0.55rem 0.4rem;
    }

    .site-header.nav-open .main-nav {
        display: block;
    }
}
/* ================= Footer ================= */

.site-footer--black {
  background: #000;
  color: rgba(255,255,255,0.85);
  padding: 44px 0 18px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.site-footer--black a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
}

.site-footer--black a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 18px;
}

.footer-brand {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.footer-title {
  margin: 0 0 10px;
  font-weight: 800;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Floating chat button */
.chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #111;
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  z-index: 9999;
}

.chat-fab:hover {
  background: #000;
}
/* Video animations inside cards */
.video-media {
  height: 170px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
}

.video-media { position: relative; }
/* Exness partner image fix */
.exness-media img {
  object-fit: contain;
  background: #000;
}
/* Exness banner: show full image, no crop */
.card-media.exness-media img,
.exness-media img {
  object-fit: contain !important;
  transform: none !important;
  background: #000;
}

.card:hover .card-media.exness-media img,
.card:hover .exness-media img {
  transform: none !important;
}
.card-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

.card-links a:hover {
  color: #fff;
  border-bottom-color: #fff;
}
/* ---------- Mobile Nav Fix ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* Ensure buttons sit above overlays */
.nav-toggle,
.theme-toggle {
  position: relative;
  z-index: 10001;
}

/* Default: desktop nav visible */
.main-nav {
  position: relative;
  z-index: 10000;
}

/* Mobile layout */
@media (max-width: 820px) {
  /* Hide desktop-style nav list until opened */
  .main-nav ul {
    display: none;
  }

  /* Show burger button */
  .nav-toggle {
    display: inline-flex;
  }

  /* When nav is opened (JS adds .open), show it */
  .main-nav.open ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    right: 16px;
    top: 70px; /* below header */
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 14px;
    min-width: 220px;
    z-index: 10000;
  }

  .main-nav.open a {
    padding: 10px 10px;
    border-radius: 10px;
  }

  /* Prevent hero overlay from blocking clicks */
  .hero-bg-wrapper,
  .hero-overlay,
  .hero-bg-img {
    pointer-events: none;
  }

  /* Reduce hero spacing on mobile */
  .hero {
    min-height: auto;
    padding: 56px 0;
  }

  .hero-inner {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
@media (max-width: 820px) {
  .section {
    padding: 40px 0;
  }
  .section-header p {
    max-width: 60ch;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ================== FINAL MOBILE NAV OVERRIDE (PASTE LAST) ================== */

/* Keep header above everything */
.site-header{
  position: sticky !important;
  top: 0;
  z-index: 999999 !important;
}

/* Buttons always clickable */
.nav-toggle,
.theme-toggle{
  position: relative !important;
  z-index: 9999999 !important;
}

/* Desktop nav stays normal */
.main-nav{
  position: relative;
  z-index: 999999;
}

/* MOBILE */
@media (max-width: 900px){

  /* show burger */
  .nav-toggle{ display: inline-flex !important; }

  /* hide links until opened */
  .main-nav ul{ display: none !important; }

  /* dropdown container */
  .main-nav{
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    background: var(--header-bg) !important;
    border-bottom: 1px solid rgba(148,163,184,0.35) !important;
    padding: 10px 14px !important;
    transform: translateY(-8px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* OPEN STATE: support BOTH class styles */
  .main-nav.open,
  .site-header.nav-open .main-nav{
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  /* show links when open (support both class styles) */
  .main-nav.open ul,
  .site-header.nav-open .main-nav ul{
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 6px 0 !important;
  }

  .main-nav a{
    display: block !important;
    padding: 10px 8px !important;
    border-radius: 10px !important;
  }
}
