/* ============================================================
   970 LOCKSMITH — PREMIUM DESKTOP NAVIGATION v1
   Glass header · gold underlines · animated dropdowns
   No phone wrap · proper sizing · refined typography
   ============================================================ */

/* ─── Header bar (sticky, scroll-aware) ──────────────────── */
@media (min-width: 1025px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, #0a0e17 0%, #0d1b2a 100%) !important;
    border-bottom: 1px solid rgba(240, 165, 0, 0.18);
    box-shadow: 0 1px 0 rgba(0,0,0,0.4);
    transition: padding .25s ease, box-shadow .3s ease, background .3s ease;
    padding: 0.85rem 0;
  }
  .site-header.scrolled {
    padding: 0.5rem 0;
    background: rgba(10, 14, 23, 0.92) !important;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(240, 165, 0, 0.28);
  }

  .site-header .header-inner {
    display: flex !important;
    align-items: center;
    gap: 1.75rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
  }

  /* ─── Logo block ─────────────────────────────────────────── */
  .site-header .logo {
    flex-shrink: 0;
    gap: 0.7rem !important;
    transition: transform .25s ease;
  }
  .site-header .logo:hover { transform: scale(1.03); }
  .site-header .logo .logo-svg { width: 42px; height: 42px; }
  .site-header .logo-text-main {
    font-size: 1.15rem;
    color: #ffffff;
    letter-spacing: -0.005em;
  }
  .site-header.scrolled .logo .logo-svg { width: 38px; height: 38px; }
  .site-header .logo-text-sub {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    color: #fbbf24 !important;
    font-weight: 700;
  }

  /* ─── Primary nav ───────────────────────────────────────── */
  .nav-primary {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
  }

  /* All top-level nav links */
  .nav-primary > a,
  .nav-primary .dropdown > a.dropdown-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.55rem 0.85rem;
    text-decoration: none !important;
    border-radius: 8px;
    transition: color .2s ease, background .2s ease;
    white-space: nowrap;
  }

  /* Premium hover effect — gold underline that animates from center */
  .nav-primary > a::after,
  .nav-primary .dropdown > a.dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 1.7rem);
    height: 2px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    transition: transform .35s cubic-bezier(.16,1,.3,1);
    transform-origin: center;
    pointer-events: none;
  }

  .nav-primary > a:hover,
  .nav-primary .dropdown:hover > a.dropdown-toggle,
  .nav-primary > a:focus-visible,
  .nav-primary .dropdown > a.dropdown-toggle:focus-visible {
    color: #fbbf24 !important;
    background: rgba(240, 165, 0, 0.06);
  }
  .nav-primary > a:hover::after,
  .nav-primary .dropdown:hover > a.dropdown-toggle::after,
  .nav-primary > a:focus-visible::after,
  .nav-primary .dropdown > a.dropdown-toggle:focus-visible::after {
    transform: translateX(-50%) scaleX(1);
  }

  /* Dropdown caret animation */
  .nav-primary .dropdown > a.dropdown-toggle {
    cursor: pointer;
    user-select: none;
  }
  .nav-primary .dropdown:hover > a.dropdown-toggle {
    color: #fbbf24 !important;
  }

  /* ─── Dropdown panel ───────────────────────────────────── */
  .nav-primary .dropdown {
    position: relative;
  }
  .nav-primary .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.97) 0%, rgba(10, 14, 23, 0.97) 100%);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(240, 165, 0, 0.32);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
    padding: 0.65rem;
    margin: 0;
    list-style: none;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .35s cubic-bezier(.16,1,.3,1), visibility .25s;
    z-index: 110;
  }
  .nav-primary .dropdown:hover .dropdown-menu,
  .nav-primary .dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  /* Hover bridge so menu doesn't close in the gap */
  .nav-primary .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.6rem;
    z-index: 109;
  }

  /* Wide dropdown for many items */
  .nav-primary .dropdown-menu.dropdown-wide {
    min-width: 340px;
    columns: 1;
  }

  /* Dropdown items */
  .nav-primary .dropdown-menu li {
    list-style: none;
    margin: 0;
  }
  .nav-primary .dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    color: rgba(226, 232, 240, 0.92) !important;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease, transform .15s ease;
    position: relative;
  }
  .nav-primary .dropdown-menu li a:hover {
    background: linear-gradient(90deg, rgba(240,165,0,0.12) 0%, rgba(240,165,0,0.03) 100%);
    color: #fbbf24 !important;
    transform: translateX(3px);
  }
  .nav-primary .dropdown-menu li a strong {
    color: #fbbf24;
    font-weight: 700;
  }
  .nav-primary .dropdown-menu li a:hover strong {
    color: #fff;
  }

  /* Divider after first "Overview" item */
  .nav-primary .dropdown-menu li:first-child a {
    border-bottom: 1px solid rgba(240, 165, 0, 0.18);
    margin-bottom: 0.35rem;
    padding-bottom: 0.7rem;
    background: linear-gradient(90deg, rgba(240,165,0,0.08), transparent);
  }
  .nav-primary .dropdown-menu li:first-child a:hover {
    background: linear-gradient(90deg, rgba(240,165,0,0.20), rgba(240,165,0,0.04));
  }

  /* ─── Header CTA group (phone + Call Now button) ─────────── */
  .site-header .header-cta {
    display: flex !important;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
  }

  .site-header .header-phone {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(240, 165, 0, 0.32);
    background: rgba(240, 165, 0, 0.06);
    transition: all .25s ease;
    white-space: nowrap !important;
    letter-spacing: 0.01em;
  }
  .site-header .header-phone:hover {
    background: rgba(240, 165, 0, 0.16);
    border-color: rgba(240, 165, 0, 0.5);
    color: #fbbf24 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(240, 165, 0, 0.18);
  }

  /* Call Now button — premium gold gradient with shimmer */
  .site-header .header-cta .btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0a500 0%, #fbbf24 50%, #c98b00 100%) !important;
    background-size: 200% 200% !important;
    color: #0a0e17 !important;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 0.7rem 1.4rem !important;
    border: 0 !important;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(240, 165, 0, 0.4), 0 0 0 1px rgba(240, 165, 0, 0.5) inset;
    transition: transform .2s ease, box-shadow .3s ease, background-position .5s ease;
    white-space: nowrap;
    text-decoration: none !important;
  }
  .site-header .header-cta .btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: translateX(-100%);
    transition: transform .7s ease;
  }
  .site-header .header-cta .btn-primary:hover {
    transform: translateY(-2px);
    background-position: 100% 100% !important;
    box-shadow: 0 10px 28px rgba(240, 165, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  }
  .site-header .header-cta .btn-primary:hover::before {
    transform: translateX(100%);
  }
  .site-header .header-cta .btn-primary:active { transform: translateY(0); }
}

/* ─── Smaller desktop (≤ 1180px): hide phone text, keep button ── */
@media (min-width: 1025px) and (max-width: 1180px) {
  .site-header .nav-primary {
    gap: 0;
  }
  .nav-primary > a,
  .nav-primary .dropdown > a.dropdown-toggle {
    font-size: 0.85rem;
    padding: 0.5rem 0.65rem;
  }
  .site-header .header-phone {
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
  }
  .site-header .header-cta .btn-primary {
    font-size: 0.88rem;
    padding: 0.6rem 1rem !important;
  }
}

/* ─── Mid-desktop optimization ──────────────────────────── */
@media (min-width: 1181px) and (max-width: 1340px) {
  .nav-primary > a,
  .nav-primary .dropdown > a.dropdown-toggle {
    font-size: 0.88rem;
    padding: 0.55rem 0.7rem;
  }
}

/* ─── Hide on mobile (already covered by other CSS) ────── */
@media (max-width: 1024px) {
  /* Premium desktop nav rules don't apply */
}

/* ─── Premium scroll behavior — fade in on scroll ──────── */
@media (min-width: 1025px) {
  @keyframes nav-fade-in {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .site-header { animation: nav-fade-in 0.4s ease-out; }
}
