/* ==========================================================
   header.css
   Depends on: base.css (tokens, .wrap, .logo-box)
========================================================== */

.site-header {
  background-color: var(--navy-dark);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Top utility bar (email / phone / social) */
.top-bar {
  background-color: var(--navy-darker);
  font-size: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.top-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
.top-left { display: flex; align-items: center; }
.contact-link {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease;
}
.contact-link:hover { color: var(--text-white); }
.contact-link .icon { width: 13px; height: 13px; stroke: var(--accent-cyan); }
.top-left .sep { margin: 0 0.8rem; color: var(--border-subtle); }

.social-links { display: flex; gap: 0.6rem; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.social-links a svg { width: 12px; height: 12px; fill: currentColor; }
.social-links a:hover { color: var(--navy-darker); background-color: var(--accent-cyan); }

/* Main nav row: logo + links + CTA */
.main-header { padding: 0.85rem 0; }
.main-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.header-logo { text-decoration: none; }

.nav ul { display: none; list-style: none; margin: 0; padding: 0; gap: 2rem; }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
}
.nav a:hover, .nav a.active { color: var(--text-white); }
.nav a .arrow { font-size: 0.7rem; color: var(--accent-cyan); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 100%; height: 2px;
  background-color: var(--accent-cyan);
}

.btn-primary-dark {
  background-color: transparent;
  color: var(--text-white);
  border: 1px solid var(--accent-cyan);
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.btn-primary-dark:hover { background-color: var(--accent-cyan); color: var(--navy-darker); }

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.mobile-menu-btn .bar { width: 100%; height: 2px; background-color: #fff; border-radius: 2px; }


/* Hide mobile-only elements on desktop by default */
.mobile-nav-cta {
  display: none;
}



@media (min-width: 960px) {
  .nav ul { display: flex; }
  .mobile-menu-btn { display: none; }
}
@media (max-width: 640px) {
  .social-links { display: none; }
}














/* Base Mobile Styles */
/* Base Desktop Defaults */
.menu-toggle-checkbox {
  display: none !important;
}

.mobile-menu-btn {
  display: none;
}

/* Mobile Styles */
@media (max-width: 991px) {
  /* 1. Hide Desktop Quote Button */
  .main-header .wrap > .btn-primary-dark,
  .desktop-cta {
    display: none !important;
  }

  /* 2. Show Mobile Hamburger Label */
  .mobile-menu-btn {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 26px;
    background: transparent;
    cursor: pointer;
    z-index: 100001 !important;
    position: relative;
  }

  .mobile-menu-btn .bar {
    width: 100%;
    height: 3px;
    background-color: #38bdf8;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* 3. Mobile Slide-Out Drawer (Closed State) */
  .nav {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important; /* Off-screen */
    width: 280px !important;
    height: 100vh !important;
    background-color: #121a24 !important;
    padding: 5rem 1.5rem 2rem 1.5rem !important;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease-in-out !important;
    z-index: 100000 !important;
    display: block !important;
  }

  /* 4. Pure CSS Checkbox Trigger (Open State) */
  .menu-toggle-checkbox:checked ~ .nav {
    right: 0 !important; /* Slides into view when checked */
  }

  /* Hamburger Animate to 'X' when open */
  .menu-toggle-checkbox:checked ~ .mobile-menu-btn .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle-checkbox:checked ~ .mobile-menu-btn .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle-checkbox:checked ~ .mobile-menu-btn .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav ul li a {
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-nav-cta {
    display: block !important;
    margin-top: 2rem;
  }

  .mobile-nav-cta .btn-primary-dark {
    display: block !important;
    width: 100%;
    text-align: center;
  }
}