/* =====================================================================
   assets/css/navbar.css — SHARED header, hamburger menu and footer.
   Extracted verbatim from index.php (the master design). Loaded by
   includes/navbar.php so every page gets the same orange (light) /
   dark header. Change it here and every page updates.
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

/* Header tokens that only index.php defined (values copied from it).
   style.css lacks them, so without this the menu would be dark in light mode. */
:root {
    --nav-bg: rgba(8,9,20,0.55);
    --menu-bg: rgba(8,9,20,0.92);
    --border-tint: rgba(167,139,250,0.35);
    --surface-shadow: none;
    --border-width: 1px;
    --glass-bg-strong: rgba(255,255,255,0.10);
    --shadow-glow-blue: 0 10px 30px rgba(96,165,250,0.25);
}
[data-theme="light"] {
    --nav-bg: rgba(255,255,255,0.92);
    --menu-bg: rgba(255,255,255,0.98);
    --border-tint: rgba(99,102,241,0.14);
    --surface-shadow: 0 1px 2px rgba(16,24,48,0.04), 0 6px 16px rgba(16,24,48,0.06), 0 18px 34px rgba(16,24,48,0.06);
    --border-width: 1.5px;
    --glass-bg-strong: #ffffff;
    --shadow-glow-blue: 0 12px 28px rgba(59,130,246,0.20);
}

/* Base tokens the header/footer read. Scoped to those elements so pages with
   their own :root palette (e.g. privacy-policy.php) still get the Home look. */
.navbar, .mobile-menu, .search-wrap, footer {
    --text-primary: #f2f2f7; --text-secondary: #b7b9d6; --border: rgba(255,255,255,0.10);
    --glass-bg: rgba(255,255,255,0.06); --border-strong: rgba(255,255,255,0.18);
    --accent-blue: #60a5fa; --accent-purple: #a78bfa;
}
[data-theme="light"] .navbar, [data-theme="light"] .mobile-menu, [data-theme="light"] .search-wrap, [data-theme="light"] footer {
    --text-primary: #10121f; --text-secondary: #454962; --border: #cfd4e6;
    --glass-bg: #ffffff; --border-strong: #a8afce;
}
.navbar a { color: inherit; text-decoration: none; }
.mobile-menu a { text-decoration: none; }

    /* ---------------- NAVBAR ---------------- */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 24px;
        background: var(--nav-bg, rgba(8,9,20,0.55));
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: var(--border-width, 1px) solid var(--border);
        box-shadow: var(--surface-shadow, none);
    }
    [data-theme="light"] .navbar {
        background: #ff8a00;
        border-bottom-color: #e67600;
    }
    [data-theme="light"] .navbar a,
    [data-theme="light"] .nav-links a {
        color: #ffffff;
    }
    [data-theme="light"] .logo span {
        background: none;
        -webkit-background-clip: initial;
        background-clip: initial;
        -webkit-text-fill-color: #ffffff;
        color: #ffffff;
        font-weight: 800;
        text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    }
    [data-theme="light"] .admin-btn,
    [data-theme="light"] .hamburger span {
        color: #ffffff;
    }
    [data-theme="light"] .theme-toggle {
        color: #10121f;
    }
    [data-theme="light"] .hamburger span { background: #ffffff; }

    .logo {
        font-size: 20px;
        font-weight: 800;
        display: flex;
        align-items: center;
        gap: 11px;
    }

    .logo span {
        background: linear-gradient(90deg, var(--accent-blue, #60a5fa), var(--accent-purple, #a78bfa));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        letter-spacing: -0.5px;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        display: block;
        border: 2px solid var(--border-strong, rgba(255,255,255,0.18));
        box-shadow: var(--surface-shadow, none);
    }

    .nav-links {
        display: none;
        gap: 18px;
        row-gap: 8px;
        flex-wrap: wrap;
        font-size: 14px;
        color: var(--text-secondary);
    }

    .nav-links a:hover { color: var(--text-primary); }

    .nav-right { display: flex; align-items: center; gap: 8px; }

    .admin-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 9px;
        border: var(--border-width, 1px) solid var(--border);
        background: var(--glass-bg, rgba(255,255,255,0.06));
        box-shadow: var(--surface-shadow, none);
        transition: all 0.2s ease;
        flex-shrink: 0;
    }
    .admin-btn svg { width: 18px; height: 18px; stroke: var(--text-secondary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .admin-btn:hover { background: var(--border-tint, rgba(167,139,250,0.35)); border-color: var(--accent-blue); box-shadow: var(--surface-shadow-hover, var(--surface-shadow, none)); }
    .admin-btn:hover svg { stroke: var(--accent-blue); }

    .theme-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 9px;
        border: var(--border-width, 1px) solid var(--border);
        background: var(--glass-bg, rgba(255,255,255,0.06));
        box-shadow: var(--surface-shadow, none);
        cursor: pointer;
        transition: all 0.2s ease;
        color: var(--text-primary);
    }
    .theme-toggle:hover { background: var(--border-tint, rgba(167,139,250,0.35)); border-color: var(--accent-blue); box-shadow: var(--surface-shadow-hover, var(--surface-shadow, none)); }
    .theme-toggle svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
    .theme-toggle .icon-moon { display: none; }
    .theme-toggle.is-light .icon-sun { display: none; }
    .theme-toggle.is-light .icon-moon { display: block; }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        padding: 6px;
    }
    .hamburger span {
        width: 20px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
    }

    @media (min-width: 860px) {
        .nav-links { display: flex; }
        .hamburger { display: none; }
    }

    .mobile-menu {
        display: none;
        flex-direction: column;
        gap: 4px;
        padding: 10px 24px 18px;
        background: var(--menu-bg, rgba(8,9,20,0.92));
        backdrop-filter: blur(16px);
        border-bottom: var(--border-width, 1px) solid var(--border);
        box-shadow: var(--surface-shadow, none);
    }
    .mobile-menu.open { display: flex; }
    .mobile-menu a {
        padding: 12px 4px;
        font-size: 14px;
        color: var(--text-secondary);
        border-bottom: var(--border-width, 1px) solid var(--border);
    }

    .search-wrap {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 10px 20px;
        background: var(--menu-bg, rgba(8,9,20,0.92));
        border-bottom: var(--border-width, 1px) solid var(--border);
        box-shadow: var(--surface-shadow, none);
        display: none;
        z-index: 50;
    }

    .search-wrap.search-open {
        display: block;
    }

    .search-wrap input {
        display: block;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        padding: 9px 14px 9px 38px;
        border-radius: 12px;
        border: var(--border-width, 1px) solid var(--border);
        background: var(--glass-bg, rgba(255,255,255,0.06));
        backdrop-filter: blur(10px);
        color: var(--text-primary);
        font-size: 13px;
        outline: none;
        box-shadow: var(--surface-shadow, none);
    }

    .search-wrap input:focus {
        border-color: var(--accent-blue);
        box-shadow: 0 0 0 4px var(--shadow-glow-blue, 0 10px 30px rgba(96,165,250,0.25));
        background: var(--menu-bg, rgba(8,9,20,0.92));
    }

    .search-wrap .icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-secondary);
        pointer-events: none;
        font-size: 13px;
    }

    .nav-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 9px;
        border: var(--border-width, 1px) solid var(--border);
        background: var(--glass-bg, rgba(255,255,255,0.06));
        color: var(--text-secondary);
        cursor: pointer;
        transition: background 0.2s ease;
        flex-shrink: 0;
    }
    .nav-search-toggle:hover { background: var(--glass-bg-strong, rgba(255,255,255,0.10)); }

    footer {
        border-top: var(--border-width, 1px) solid var(--border);
        padding: 30px 20px;
        text-align: center;
        color: var(--text-secondary);
        font-size: 13px;
    }
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 20px;
        margin-bottom: 14px;
    }
    .footer-links a {
        color: var(--text-secondary);
        font-size: 13px;
        transition: color 0.2s ease;
    }
    .footer-links a:hover { color: var(--accent-blue, #60a5fa); }
    @media (max-width: 480px) {
        .navbar { padding: 12px 14px; }
        .logo { gap: 6px; }
        .logo-icon { width: 30px; height: 30px; }
        .logo span { font-size: 13px; white-space: nowrap; }
        .nav-right { gap: 6px; }
        .hero { padding: 22px 20px 12px; }
    }
/* ---- Active page (added) ---- */
.nav-links a.is-active { color: var(--text-primary, #f2f2f7); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent-blue, #60a5fa); padding-bottom: 2px; }
[data-theme="light"] .navbar .nav-links a.is-active { color: #ffffff; box-shadow: inset 0 -2px 0 #ffffff; }
.mobile-menu a.is-active { color: var(--text-primary, #f2f2f7); font-weight: 700; background: var(--border-tint, rgba(167,139,250,0.2)); border-left: 3px solid var(--accent-blue, #60a5fa); padding-left: 10px; border-radius: 6px; }
[data-theme="light"] .mobile-menu a.is-active { color: #c25e00; border-left-color: #ff8a00; background: rgba(255,138,0,0.12); }
.logo { min-width: 0; }
