/* ============================================================
   MIRAI – Header Styles
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(10, 36, 99, 0.06);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(10, 36, 99, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 32px;
}

/* ── Logo ── */
.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 44px;
  width: auto;
}

/* Always show blue logo */
.logo-img-white { display: none !important; }
.logo-img-blue  { display: block !important; }

/* ── Navigation ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.nav-link:hover {
  color: var(--primary-light);
  background: rgba(37, 99, 235, 0.06);
}

.nav-link.active {
  color: var(--primary-light);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 14px; right: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary-light);
}

/* Dropdown */
.nav-item { position: relative; }

.nav-chevron {
  width: 14px; height: 14px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-gray);
}
.nav-item:hover .nav-chevron { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(10, 36, 99, 0.15);
  border: 1px solid rgba(10, 36, 99, 0.06);
  padding: 12px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: all 0.25s ease;
  z-index: 100;
}
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.2s ease;
  text-decoration: none;
}
.dropdown-link:hover {
  background: var(--bg-light);
  color: var(--primary-light);
  padding-left: 20px;
}

.dropdown-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.dropdown-icon svg { width: 16px; height: 16px; }
.dropdown-link:hover .dropdown-icon { background: rgba(37, 99, 235, 0.1); }

/* ── Header Actions ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.header-phone:hover { color: var(--primary-light); }

.phone-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.phone-icon svg { width: 16px; height: 16px; color: var(--primary-light); }
.header-phone:hover .phone-icon { background: rgba(37, 99, 235, 0.15); }

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
  background: none;
}
.menu-toggle:hover { background: var(--bg-light); }

.menu-bar {
  width: 24px; height: 2px;
  border-radius: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
  display: block;
}
.menu-toggle.open .menu-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open .menu-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open .menu-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Drawer ── */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 80px; left: 0; right: 0;
  background: var(--white);
  z-index: 999;
  padding: 16px 0;
  box-shadow: 0 20px 60px rgba(10, 36, 99, 0.15);
  border-top: 1px solid var(--border-light);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
  text-align: left;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  font-family: inherit;
}
.mobile-nav-link:hover { background: var(--bg-light); color: var(--primary-light); }

.mobile-sub {
  display: none;
  background: var(--bg-light);
  padding: 8px 0;
}
.mobile-sub.open { display: block; }
.mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px 12px 40px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-gray);
  border-bottom: 1px solid rgba(10, 36, 99, 0.04);
  transition: all 0.2s ease;
  text-decoration: none;
}
.mobile-sub-link:hover { color: var(--primary-light); background: rgba(37, 99, 235, 0.04); }

.mobile-drawer-footer {
  padding: 20px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-drawer-footer .btn { width: 100%; justify-content: center; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .site-nav       { display: none; }
  .header-phone   { display: none; }
  .menu-toggle    { display: flex; }
  .mobile-drawer  { display: block; }
  .site-header .btn-primary { display: none; }
}
@media (min-width: 1025px) {
  .mobile-drawer { display: none !important; }
}
