/* ============ HEADER ============ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

#site-header.transparent {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(250,247,242,0.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 30px rgba(26,22,18,0.08);
  padding: 0;
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.header-logo a { display: flex; align-items: center; }
.header-logo img { height: 38px; transition: all 0.4s ease; }
.logo-dark { display: block; }
.logo-light { display: none; }

#site-header.transparent .logo-dark { display: none; }
#site-header.transparent .logo-light { display: block; filter: brightness(0) invert(1); }
#site-header.scrolled .logo-dark { display: block; }
#site-header.scrolled .logo-light { display: none; }

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav ul li { position: relative; }

.header-nav ul li a {
  font-family: var(--font-sans);
  font-size: 1.0rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* Transparent header - white links */
#site-header.transparent .header-nav ul li a {
  color: rgba(255,255,255,0.85);
}
#site-header.transparent .header-nav ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}
#site-header.transparent .header-nav ul li a.active {
  color: white;
  background: rgba(255,255,255,0.15);
}

/* Scrolled header - dark links */
#site-header.scrolled .header-nav ul li a {
  color: var(--text-dark);
}
#site-header.scrolled .header-nav ul li a:hover {
  background: var(--soft-grey);
  color: var(--deep-navy);
}
#site-header.scrolled .header-nav ul li a.active {
  color: var(--deep-navy);
  background: var(--soft-grey);
}

.nav-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
}
.has-dropdown:hover .nav-arrow { transform: rotate(180deg); }

.nav-ai-link {
  color: var(--gold) !important;
  font-weight: 600 !important;
}

/* Mega Dropdown */
.mega-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #f9f7f4;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(26,22,18,0.2);
  padding: 28px;
  min-width: 420px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 100;
  border-top: 3px solid var(--blush);
}

.has-dropdown:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.dropdown-grid a {
  font-size: 1.0rem !important;
  font-weight: 400 !important;
  color: var(--text-dark) !important;
  padding: 9px 14px !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  display: block !important;
  background: transparent !important;
}
.dropdown-grid a:hover {
  background: var(--warm-off) !important;
  color: var(--deep-navy) !important;
  padding-left: 18px !important;
}

/* Header CTA */
.header-cta { display: flex; align-items: center; gap: 16px; }

.btn-consult {
  padding: 11px 26px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#site-header.transparent .btn-consult {
  background: var(--blush);
  color: var(--deep-navy);
  border: 1px solid var(--blush);
}
#site-header.transparent .btn-consult:hover { background: white; border-color: white; }

#site-header.scrolled .btn-consult {
  background: var(--deep-navy);
  color: white;
  border: 1px solid var(--deep-navy);
}
#site-header.scrolled .btn-consult:hover { background: transparent; color: var(--deep-navy); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: all 0.3s ease;
  border-radius: 2px;
}
#site-header.transparent .hamburger { color: white; }
#site-header.scrolled .hamburger { color: var(--text-dark); }

/* Mobile Menu */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,22,18,0.6);
  z-index: 5100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.mobile-overlay.open { opacity: 1; visibility: visible; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: #f9f7f4;
  z-index: 5200;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: 0 0 40px;
}
.mobile-menu.open { transform: none; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.mobile-menu-header img { height: 32px; }
.mobile-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #f0ece4;
  color: #1A1612;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.mobile-close svg { stroke: #1A1612; }
.mobile-close:hover { background: var(--deep-navy); color: white; border-color: var(--deep-navy); }
.mobile-close:hover svg { stroke: white; }

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}
.mobile-nav > a {
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 8px;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border);
}
.mobile-nav > a:last-of-type { border-bottom: none; }
.mobile-nav > a:hover { background: var(--warm-off); color: var(--deep-navy); padding-left: 22px; }

/* Services accordion */
.mob-services-wrap {
  border-bottom: 1px solid var(--border);
}
.mob-services-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}
.mob-services-toggle:hover { background: var(--warm-off); color: var(--deep-navy); }
.mob-chevron { transition: transform 0.3s ease; flex-shrink: 0; stroke: currentColor; }
.mob-services-toggle[aria-expanded="true"] .mob-chevron { transform: rotate(180deg); }

.mob-services-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
  background: rgba(26,22,18,0.03);
  border-radius: 0 0 8px 8px;
}
.mob-services-sub.open { max-height: 900px; }
.mob-services-sub a {
  display: block;
  padding: 11px 16px 11px 28px;
  font-size: 0.88rem;
  font-weight: 400;
  color: #555;
  border-bottom: 1px solid rgba(26,22,18,0.05);
  transition: all 0.2s ease;
}
.mob-services-sub a:last-child { border-bottom: none; }
.mob-services-sub a:hover { color: var(--deep-navy); background: var(--warm-off); padding-left: 34px; }
.mob-sub-all {
  font-weight: 600 !important;
  color: var(--deep-navy) !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 16px 12px 28px !important;
  border-bottom: 1px solid rgba(26,22,18,0.08) !important;
}

.mobile-cta {
  margin-top: 12px;
  background: var(--deep-navy) !important;
  color: white !important;
  text-align: center;
  letter-spacing: 0.1em;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  padding: 16px !important;
  border-radius: 4px !important;
  border: none !important;
}
.mobile-cta:hover { background: #2A2520 !important; padding-left: 22px !important; }

@media (max-width: 1024px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .header-container { padding: 0 24px; }
}

/* Phone number — adapts to header state */
.header-phone {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.3s ease;
}
#site-header.transparent .header-phone { color: rgba(255,255,255,0.85); }
#site-header.transparent .header-phone:hover { color: white; }
#site-header.scrolled .header-phone { color: var(--text-dark); }
#site-header.scrolled .header-phone:hover { color: var(--deep-navy); }
@media (max-width: 600px) {
  #site-header { height: 64px; }
  .header-container { height: 64px; padding: 0 16px; }
  .header-logo img { height: 32px; }
  .hamburger { width: 36px; height: 36px; }
}
