/* =============================================================
   HEADER — Mobile menu drawer + nav dropdown (non-critical)
   ============================================================= */

/* ── Nav dropdown ───────────────────────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
#main-menu > li > ul {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); padding: 8px; display: none; z-index: 300;
}
#main-menu > li:hover > ul { display: block; animation: fadeDown .18s ease; }
#main-menu > li > ul li a {
  display: block; padding: 9px 14px; font-size: .875rem; border-radius: 6px;
  color: var(--text-2); transition: all var(--transition);
}
#main-menu > li > ul li a:hover { background: var(--light); color: var(--blue); }

/* ── Mobile overlay ─────────────────────────────────────────── */
.mobile-menu-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  z-index: 390; display: none; opacity: 0; transition: opacity .28s ease;
}
.mobile-menu-overlay.open { display: block; opacity: 1; }

/* ── Mobile drawer ──────────────────────────────────────────── */
.mobile-menu {
  position: fixed; top: 0; right: 0; width: 300px;
  max-width: 85vw; height: 100%; z-index: 400;
  background: #fff; overflow-y: auto; overflow-x: hidden;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 32px rgba(15,23,42,.18);
  display: flex; flex-direction: column; will-change: transform;
}
.mobile-menu.open { transform: translateX(0); }

/* Drawer header */
.mobile-menu-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; background: var(--blue); flex-shrink: 0;
}
.mobile-menu-header a { display: flex; align-items: center; }
.mobile-logo      { height: 32px; max-width: 130px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }
.mobile-logo-text { font-size: 1.25rem; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.mobile-menu-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; cursor: pointer;
  color: #fff; transition: background var(--transition); flex-shrink: 0;
}
.mobile-menu-close:hover { background: rgba(255,255,255,.22); }

/* Nav list */
.mobile-menu nav { flex: 1; }
.mobile-nav { list-style: none; padding: 8px 0; margin: 0; }
.mobile-nav > li { position: relative; }
.mobile-nav > li + li { border-top: 1px solid var(--border); }
.mobile-nav > li > a {
  display: flex; align-items: center;
  padding: 14px 52px 14px 20px;
  font-size: .95rem; font-weight: 600; color: var(--text);
  line-height: 1.3; transition: color var(--transition), background var(--transition), border-color var(--transition);
  border-left: 3px solid transparent;
}
.mobile-nav > li > a:hover,
.mobile-nav > li > a:focus        { color: var(--blue); background: var(--light); border-left-color: var(--green); }
.mobile-nav > li.current-menu-item > a,
.mobile-nav > li.current-menu-ancestor > a { color: var(--blue); background: rgba(30,58,123,.05); border-left-color: var(--green); }

/* Expand toggle */
.mobile-expand-btn {
  position: absolute; right: 0; top: 0; height: 100%; min-height: 48px; width: 48px;
  background: none; border: none; border-left: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer; transition: color var(--transition), background var(--transition);
}
.mobile-expand-btn svg { transition: transform .25s ease; }
.mobile-expand-btn:hover { color: var(--blue); background: var(--light); }
.mobile-expand-btn.open svg { transform: rotate(180deg); }

/* Submenu */
.mobile-submenu {
  display: none; list-style: none; margin: 0; padding: 0;
  background: var(--off-white); border-left: 3px solid var(--green); border-top: 1px solid var(--border);
}
.mobile-submenu.open { display: block; }
.mobile-submenu li + li { border-top: 1px solid var(--border); }
.mobile-submenu li a {
  display: block; padding: 11px 20px 11px 28px;
  font-size: .88rem; font-weight: 500; color: var(--text-2);
  transition: color var(--transition), background var(--transition);
}
.mobile-submenu li a:hover { color: var(--blue); background: var(--light); }
.mobile-submenu li.current-menu-item a { color: var(--blue); font-weight: 700; }

/* Drawer footer */
.mobile-menu-footer {
  padding: 20px; border-top: 1px solid var(--border);
  background: var(--off-white); flex-shrink: 0;
}
.mobile-contact-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--border);
  font-size: .9rem; font-weight: 700; color: var(--blue);
  margin-bottom: 10px; transition: border-color var(--transition), background var(--transition);
}
.mobile-contact-link:hover { border-color: var(--blue); background: rgba(30,58,123,.04); }
.mobile-contact-link svg { flex-shrink: 0; color: var(--green); }
.mobile-menu-footer .btn { width: 100%; justify-content: center; }

/* Topbar mobile */
@media (max-width: 768px) {
  .header-topbar  { padding: 5px 0; }
  .topbar-inner   { flex-wrap: wrap; gap: 4px; }
  .topbar-contact { gap: 10px; flex-wrap: wrap; }
  .topbar-contact a,
  .topbar-contact span { font-size: .72rem; gap: 4px; }
  .topbar-contact a:nth-child(n+3) { display: none; }
  .topbar-social  { gap: 6px; }
  .topbar-social a { width: 22px; height: 22px; }
}
@media (max-width: 480px) {
  .topbar-inner   { justify-content: center; }
  .topbar-contact { justify-content: center; }
  .topbar-contact a:nth-child(n+2) { display: flex; }
  .topbar-contact a:nth-child(n+3) { display: none; }
  .topbar-contact span { display: none; }
}
