/* ============================================================
   navbar.css — ProAzure
   Link this in every page: <link rel="stylesheet" href="navbar.css">
   ============================================================ */

/* ── NAVBAR BAR ─────────────────────────────────────────────── */
.navbar {
    background: #0f172a;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    width: 100%;
}
.navbar.scrolled {
    background: #020617;
    box-shadow: 0 6px 30px rgba(0,0,0,0.6);
}

/* ── Push page content below fixed navbar on desktop ────────── */
body {
    padding-top: 70px;
}

/* ── NAV CONTAINER — full width single row ──────────────────── */
.nav-container {
    width: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 70px;
    gap: 20px;
}

/* ── LOGO ───────────────────────────────────────────────────── */
.nav-logo { flex-shrink: 0; }
.nav-logo a {
    display: flex; align-items: center;
    gap: 0; text-decoration: none;
}
.nav-logo img { height: 50px; width: 60px; object-fit: contain; }
.nav-logo a span {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1;
}
.logo-pro {
    letter-spacing: 0;

}
.logo-azure {
    letter-spacing: 0;
}
.logo-pro   { color: #54dc98; }
.logo-azure { color: #54c7e1; }


/* ── NAV MENU — desktop (grows to fill space) ───────────────── */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
    margin-left: auto;   /* pushes menu away from logo */
    flex-shrink: 0;
}
.nav-item { position: relative; }

.nav-link {
    display: flex; align-items: center; gap: 4px;
    color: #fff; text-decoration: none;
    font-weight: 600; font-size: 1.05rem;
    padding: 0.55rem 1rem;
    border-radius: 22px;
    white-space: nowrap;
    transition: background 0.2s;
}
.nav-link:hover { background: rgba(255,255,255,0.14); }
.nav-item.cta .nav-link {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
}
.nav-item.cta .nav-link:hover { background: rgba(255,255,255,0.25); }

.arrow { font-size: 0.62rem; transition: transform 0.3s; margin-left: 2px; }
.nav-item.open > .nav-link .arrow { transform: rotate(180deg); }

/* ── Hide mobile header on desktop ─────────────────────────── */
.mob-header { display: none; }

/* ── SEARCH — far right after nav menu ─────────────────────── */
.search-container {
    flex-shrink: 0;
    width: 220px;          /* slightly compact on desktop */
    position: relative;
    margin-left: 12px;     /* breathing room from Contact Us */
}
.search-wrapper { position: relative; width: 100%; }

.search-input {
    width: 100%;
    padding: 8px 16px 8px 38px;
    border: 2px solid rgba(255,255,255,0.22);
    border-radius: 24px;
    font-size: 13.5px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    height: 38px;
    transition: border-color 0.2s, background 0.2s, width 0.3s;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="%23aaa" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.117-.099zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
}
.search-input::placeholder { color: rgba(255,255,255,0.45); }
.search-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.55);
    background-color: rgba(255,255,255,0.13);
    width: 280px;          /* expands on focus */
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 6px); left: 0; right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 99999;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.search-suggestions.show { display: block; }
.suggestion-item {
    padding: 10px 14px; cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px; color: #1e293b;
    transition: background 0.12s;
}
.suggestion-item:hover { background: #f1f5f9; color: #3b82f6; }
.suggestion-item:last-child { border-bottom: none; }

/* ── DESKTOP MEGA MENU ──────────────────────────────────────── */
.mega-menu {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: #ffffff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.10);
    border-radius: 0 0 20px 20px;
    border-top: 1px solid #e2e8f0;
    opacity: 0; visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.25s ease;
    z-index: 999;
    pointer-events: none;
    padding-top: 10px; /* bridges the gap */
    margin-top: -10px; /* pulls it up to cover gap */
}
.nav-item:hover .mega-menu,
.mega-menu:hover {
    opacity: 1; visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.mega-content {
    width: 100%;
    padding: 2.4rem 3.5rem 2.8rem;
}
.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
}

.mega-column {
    padding: 0 2.5rem 0 0;
    margin-right: 2.5rem;
    border-right: 1px solid #e2e8f0;
}
.mega-column:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

.mega-column h3 {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    position: relative;
}
.mega-column h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2.5px;
    background: #3b82f6;
    border-radius: 2px;
}
.mega-column h3 a {
    color: inherit; text-decoration: none; font-size: 1.1rem;
}
.mega-column h3 a:hover { color: #3b82f6; }

.mega-column ul { list-style: none; }
.mega-column li { margin-bottom: 0; }
.mega-column li a {
    display: block;
    color: #64748b;
    text-decoration: none;
    padding: 0.8rem 0.4rem;
    font-size: 0.99rem;
    font-weight: 400;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s, padding-left 0.15s;
}
.mega-column li a:hover {
    color: #3b82f6;
    background: #eff6ff;
    padding-left: 1rem;
}

/* ── HAMBURGER BUTTON ───────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px; height: 22px;
    background: none; border: none;
    cursor: pointer; padding: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.hamburger span {
    display: block; width: 100%; height: 3px;
    background: #fff; border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* ── DARK OVERLAY ───────────────────────────────────────────── */
.nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.nav-overlay.show { display: block; }

/* ════════════════════════════════════════════════════════════
   MOBILE  ≤ 768px
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    body {
        padding-top: 115px;
    }

    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 1rem 8px;
        gap: 0;
    }

    /* Row 1: logo left, hamburger right */
    .nav-logo    { flex: 1; order: 1; }
    .hamburger   { display: flex; order: 2; margin-left: 10px; }

    /* Row 2: search full width — appears below logo+ham row */
    .search-container {
        order: 3;
        width: 100%;
        margin: 8px 0 0;
        flex: none;
    }
    .search-input {
        background-color: rgba(255,255,255,0.10);
        border-color: rgba(255,255,255,0.3);
        color: #fff;
        width: 100% !important;   /* override focus-expand on mobile */
        height: 40px;
    }

    /* ── FULL SCREEN SLIDE-IN MENU ── */
    .nav-menu {
        position: fixed;
        top: 0; left: -100%;
        width: 100%; height: 100vh;
        background: #0f172a;
        flex-direction: column;
        align-items: stretch;
        padding: 0 0 30px;
        gap: 0;
        overflow-y: auto;
        z-index: 1010;
        margin: 0;
        transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-menu.open { left: 0; }

    /* ── BACK ARROW HEADER (injected by JS) ── */
    .mob-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 18px 20px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.10);
        background: #0f172a;
        position: sticky; top: 0;
        z-index: 10;
    }
    .mob-back {
        display: flex; align-items: center; justify-content: center;
        width: 38px; height: 38px;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 50%;
        cursor: pointer; color: #fff;
        font-size: 1.2rem; font-weight: 700;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        transition: background 0.2s;
    }
    .mob-back:hover { background: rgba(255,255,255,0.18); }
    .mob-header-logo { display: flex; align-items: center; gap: 2px; }
    .mob-header-logo .logo-pro   { font-size: 1.5rem; }
    .mob-header-logo .logo-azure { font-size: 1.5rem; }

    /* Nav items */
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    .nav-link {
        color: #e2e8f0;
        padding: 16px 22px;
        border-radius: 0;
        font-size: 1rem;
        justify-content: space-between;
        width: 100%;
        pointer-events: auto;
        position: relative;
        z-index: 1011;
    }
    .nav-link:hover { background: rgba(255,255,255,0.05); color: #54dc98; }
    .nav-item.cta .nav-link { color: #f3f4f4; background: transparent; border: none; }

    /* Disable desktop hover mega on mobile */
    .nav-item:hover .mega-menu {
        opacity: 0 !important; visibility: hidden !important;
        pointer-events: none !important;
    }

    /* ── MOBILE ACCORDION SUBMENU ── */
    .mega-menu {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: rgba(255,255,255,0.04) !important;
        transition: max-height 0.35s ease !important;
        pointer-events: auto !important;
        border-top: none !important;
        z-index: auto !important;
    }
    .nav-item.open .mega-menu {
        max-height: 800px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-item.open .mega-menu .mega-content,
    .nav-item.open .mega-menu .mega-grid,
    .nav-item.open .mega-menu .mega-column,
    .nav-item.open .mega-menu .mega-column h3,
    .nav-item.open .mega-menu .mega-column ul,
    .nav-item.open .mega-menu .mega-column li,
    .nav-item.open .mega-menu .mega-column li a {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        pointer-events: auto !important;
    }
    .nav-item.open .mega-menu .mega-column ul {
        display: block !important;
    }
    .nav-item.open .mega-menu .mega-column h3 {
        color: #64748b !important;
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        margin-bottom: 6px !important;
        padding-bottom: 4px !important;
    }
  
    .nav-item.open .mega-menu .mega-column li a {
        color: #cbd5e1 !important;
        padding: 10px 8px !important;
        font-size: 0.93rem !important;
        border-radius: 6px !important;
        text-decoration: none !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 1012 !important;
    }
    .nav-item.open .mega-menu .mega-column li a:hover {
        color: #54dc98 !important;
        background: rgba(84,220,152,0.08) !important;
        padding-left: 16px !important;
    }

    .mega-content { padding: 8px 16px 16px 28px; }
    .mega-grid { grid-template-columns: 1fr; gap: 4px; }
    .mega-column {
        padding: 0; margin-right: 0;
        border-right: none;
    }
    .mega-column h3::after { display: none !important; }
}

.logo-text {
    display: inline-flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-pro {
    color: #54dc98;
    font-size: inherit;
    letter-spacing: inherit;
}

.logo-azure {
    color: #54c7e1;
    font-size: inherit;
    letter-spacing: inherit;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.nav-item:hover .mega-menu {
    opacity: 1; visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ADD THIS RIGHT HERE 👇 */
.nav-item.has-mega::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}