/* ──────────────────────────────────────────────────────────────
   Unified marketing header (index.html, learn-more.html,
   locateiq.html, schemas.html, schemas-advanced.html,
   locate-point-builder.html, privacy.html, security.html).
   Provides hover-based dropdowns with keyboard / touch support.
   ────────────────────────────────────────────────────────────── */

/* Layout primitives the header markup depends on. Previously these
   lived as inline <style> blocks on only three pages, leaving the
   other five pages with an unstyled nav on mobile. */
.header-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 4rem;
    gap: 0.35rem;
}
.header-top {
    display: flex;
    align-items: center;
    min-height: 3rem;
}
.header-bottom {
    display: flex;
    justify-content: center;
    padding-bottom: 0.45rem;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
    justify-content: center;
}

.marketing-nav-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0.5rem 0;        /* taller tap target */
    white-space: nowrap;
}
.marketing-nav-link:hover,
.marketing-nav-link[aria-expanded="true"] {
    color: #fff;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.nav-dropdown-chevron {
    font-size: 0.62em;
    margin-left: 0.25rem;
    opacity: 0.65;
    transition: transform 0.15s;
    display: inline-block;
}
.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown:focus-within .nav-dropdown-chevron {
    transform: rotate(180deg);
    opacity: 0.9;
}

.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding-top: 0.65rem;
    min-width: 230px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
    z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-panel-inner {
    background: rgba(11, 16, 27, 0.97);
    border: 1px solid rgba(55, 65, 81, 0.6);
    border-radius: 0.65rem;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    backdrop-filter: blur(12px);
}
.nav-dropdown-panel a {
    display: block;
    padding: 0.65rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.12s, color 0.12s;
    border-bottom: 1px solid rgba(55, 65, 81, 0.4);
}
.nav-dropdown-panel a:last-child {
    border-bottom: none;
}
.nav-dropdown-panel a:hover,
.nav-dropdown-panel a:focus-visible {
    background: rgba(76, 110, 245, 0.18);
    color: #fff;
    outline: none;
}
.nav-dropdown-panel a .nav-item-hint {
    display: block;
    color: #6b7280;
    font-size: 0.72rem;
    margin-top: 0.15rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Mobile (≤ 767px): collapse dropdowns to a flat list. Each label still
   renders as a plain link to the section's primary destination, and the
   submenu items appear underneath with indent. Also relaxes the header
   shell + nav-links so the bar can scroll horizontally instead of
   wrapping to multiple rows. */
@media (max-width: 767px) {
    .header-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .header-bottom {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .header-bottom::-webkit-scrollbar { display: none; }
    .nav-links {
        flex-wrap: nowrap;
        gap: 1.1rem;
        padding-bottom: 0.1rem;
    }
    .marketing-nav-link {
        padding: 0.75rem 0;   /* ≥44px tap target on touch */
    }
    .nav-dropdown {
        display: inline-flex;
    }
    /* Inline dropdown panels become a flyout below the nav row */
    .nav-dropdown-chevron { display: inline-block; }
    .nav-dropdown-panel {
        position: absolute;
        transform: translateX(-50%) translateY(4px);
        padding-top: 0.65rem;
        min-width: 230px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .nav-dropdown:focus-within .nav-dropdown-panel,
    .nav-dropdown:active .nav-dropdown-panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav-dropdown-panel-inner {
        background: rgba(11, 16, 27, 0.97);
        border: 1px solid rgba(55, 65, 81, 0.6);
        box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75);
    }
    .nav-dropdown-panel a {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        border-bottom: 1px solid rgba(55, 65, 81, 0.4);
    }
    .nav-dropdown-panel a:last-child { border-bottom: none; }
}
