/* ===================================================
   SCITRON – header.css
   Transparent navbar → solid on scroll
   Matches dark-blue hero design from reference image
   =================================================== */

/* ─── Reset / base ──────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── CSS Variables ─────────────────────────────── */
:root {
    --nav-height: 72px;
    --primary: #003B95;
    --primary-dark: #002870;
    --accent: #00AEEF;
    --white: #FFFFFF;
    --border-glass: rgba(255, 255, 255, 0.12);
    --font-body: 'Poppins', sans-serif;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════
   NAV WRAPPER
═══════════════════════════════════════════════════ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);

    /* ── Transparent (hero state) ── */
    background: transparent;
    border-bottom: 1px solid var(--border-glass);

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 55px;
    gap: 24px;

    transition: var(--transition);
}

/* ── Scrolled state: solid navy ── */
#navbar.scrolled {
    background: rgba(0, 27, 77, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
    height: calc(var(--nav-height) - 8px);
}

/* ═══════════════════════════════════════════════════
   LOGO
═══════════════════════════════════════════════════ */
.navbar-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-logo img {
    height: 65px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    transition: all 0.3s ease;
    /* Enhances visibility with a bright outline glow and subtle drop shadow for any background */
    filter: drop-shadow(0 0 50px rgba(4, 158, 247, 0.904)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(2.15);
    /* filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(1.15); */
}

#navbar.scrolled .navbar-logo img {
    height: 55px;
}

/* ═══════════════════════════════════════════════════
   RIGHT SIDE WRAPPER
═══════════════════════════════════════════════════ */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════
   DESKTOP MENU
═══════════════════════════════════════════════════ */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin-right: 16px;
}

/* ── Nav links ── */
.nav-link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

/* Hover */
.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Active underline indicator (matches image: blue underline on "Solutions") */
.nav-link.active {
    color: var(--white);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 2.5px;
    background: var(--accent);
    border-radius: 2px;
}

/* ── CTA button ── */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--accent);
    color: var(--white);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 174, 239, 0.35);
    margin-left: 8px;
}

.nav-cta:hover {
    background: #0099d6;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.5);
}

.nav-cta:active {
    transform: translateY(0);
}

/* ── Icon buttons (search + phone from image) ── */
.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    margin-left: 8px;
    flex-shrink: 0;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.06);
}

/* Phone icon: accent background (matches image) */
.nav-icon-btn--phone {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(0, 174, 239, 0.4);
}

.nav-icon-btn--phone:hover {
    background: #0099d6;
    border-color: #0099d6;
}

/* ═══════════════════════════════════════════════════
   HAMBURGER (mobile)
═══════════════════════════════════════════════════ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: var(--transition);
    margin-left: 12px;
    flex-shrink: 0;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.16);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Open state */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════
   MOBILE MENU PANEL
═══════════════════════════════════════════════════ */
.mobile-menu {
    display: none;
    /* shown via JS */
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(0, 27, 77, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 24px 32px;
    flex-direction: column;
    gap: 6px;
    z-index: 999;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu .nav-link {
    padding: 13px 18px;
    border-radius: 8px;
    font-size: 0.9375rem;
    width: 100%;
    border: 1px solid transparent;
}

.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu .nav-cta {
    margin: 12px 0 0;
    justify-content: center;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 0.9375rem;
}

/* ═══════════════════════════════════════════════════
   HERO OFFSET UTILITY
   Add class="has-transparent-nav" to <body> so
   hero sections start behind the fixed navbar
═══════════════════════════════════════════════════ */
body.has-transparent-nav main>*:first-child,
body.has-transparent-nav .hero {
    padding-top: var(--nav-height);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    #navbar {
        padding: 0 28px;
    }

    .nav-menu ul {
        gap: 0;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .nav-cta {
        padding: 9px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 820px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 480px) {
    #navbar {
        padding: 0 18px;
    }
}