/* AED 2026 Header / Nav
   - Desktop: topbar + sticky nav + dropdown panels
   - Mobile: slide-in drawer with overlay + accordions
*/

:root{
  --aed-bg: #ffffff;
  --aed-ink: #0f172a;
  --aed-muted: #475569;
  --aed-line: rgba(15,23,42,.10);
  --aed-brand: #1d4ed8; /* blue-700 */
  --aed-brand-2: #0ea5e9; /* sky-500 */
  --aed-soft: #f8fafc;
  --aed-shadow: 0 18px 50px rgba(15,23,42,.14);
  --aed-shadow-soft: 0 10px 30px rgba(15,23,42,.10);
  --aed-radius: 16px;
}

/* Keep header above sliders */
.aed-header{ position: relative; z-index: 1050; }

.aed-topbar{
  background: linear-gradient(90deg, rgba(29,78,216,.08), rgba(14,165,233,.08));
  border-bottom: 1px solid var(--aed-line);
}
.aed-topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 8px 0;
}
.aed-topbar__left{ display:flex; align-items:center; gap:10px; min-width: 0; }
.aed-topbar__tag{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--aed-brand);
  background: rgba(29,78,216,.10);
  border: 1px solid rgba(29,78,216,.18);
  border-radius: 999px;
  white-space: nowrap;
}
.aed-topbar__title{
  font-size: 13px;
  font-weight: 600;
  color: var(--aed-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Language switch (topbar) */
.aed-topbar .lang-switch{
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.65);
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}
.aed-topbar .lang-switch .lang-btn{
  display: inline-block;
  padding: 0.32rem 0.70rem;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--aed-brand);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.aed-topbar .lang-switch .lang-btn:hover,
.aed-topbar .lang-switch .lang-btn:focus{
  background: rgba(29,78,216,.12);
  color: var(--aed-brand);
}
.aed-topbar .lang-switch .lang-btn.active{
  background: linear-gradient(90deg, rgba(29,78,216,.95), rgba(14,165,233,.95));
  color: #fff;
}

/* Sticky nav */
.aed-nav{
  background: var(--aed-bg);
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--aed-line);
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}
.aed-nav__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 10px 0;
}

/* Brand */
.aed-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none !important;
  min-width: 0;
}
.aed-brand__logo{ height: 44px; width:auto; display:block; }
.aed-brand__text{ display:flex; flex-direction:column; line-height:1.05; min-width: 0; }
.aed-brand__name{ font-size: 14px; font-weight: 800; color: var(--aed-ink); letter-spacing: .01em; }
.aed-brand__sub{ font-size: 12px; font-weight: 700; color: var(--aed-muted); }

/* Desktop menu */
.aed-desktop{ display:none; }
.aed-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap: 4px;
}
.aed-link{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none !important;
  color: var(--aed-ink) !important;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  border: 1px solid transparent;
  background: transparent;
}
.aed-link:hover,
.aed-link:focus{
  background: rgba(29,78,216,.08);
  color: var(--aed-brand) !important;
  border-color: rgba(29,78,216,.14);
}
.aed-cta{
  background: linear-gradient(90deg, rgba(29,78,216,.12), rgba(14,165,233,.12));
  border-color: rgba(29,78,216,.18);
}
.aed-cta:hover{ transform: translateY(-1px); }

/* Dropdowns */
.aed-dd{ position: relative; }
.aed-dd__toggle{
  border: 1px solid transparent;
  cursor: pointer;
}
.aed-dd__toggle::after{
  content:"";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
  opacity: .70;
}
.aed-dd__panel{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--aed-line);
  border-radius: var(--aed-radius);
  box-shadow: var(--aed-shadow);
  padding: 10px;
  display:none;
}
.aed-dd__panel--district{
  min-width: 320px;
  max-width: 380px;
}
.aed-dd__grid{
  display: block;
}
.aed-dd__group{
  padding: 4px 0;
}
.aed-dd__group + .aed-dd__group{
  border-top: 1px solid var(--aed-line);
  margin-top: 4px;
  padding-top: 8px;
}
.aed-dd__divider{
  height:1px;
  background: var(--aed-line);
  margin: 8px 6px;
}
.aed-dd__section-title{
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #475569;
}
.aed-dd__subtoggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--aed-ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.aed-dd__subtoggle:hover,
.aed-dd__subtoggle:focus{
  background: rgba(29,78,216,.08);
  color: var(--aed-brand);
  border-color: rgba(29,78,216,.14);
}
.aed-dd__subchev{
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 4px;
  opacity: .75;
  transition: transform .15s ease;
}
.aed-dd__subtoggle[aria-expanded="true"] .aed-dd__subchev{
  transform: rotate(225deg);
}
.aed-dd__subpanel{
  padding: 3px 0 5px 10px;
  margin-left: 4px;
  border-left: 2px solid rgba(29,78,216,.18);
}
.aed-dd__item{
  display:flex;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--aed-ink) !important;
  text-decoration:none !important;
  font-weight: 700;
  font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.aed-dd__item:hover,
.aed-dd__item:focus{
  background: rgba(14,165,233,.10);
  color: #0369a1 !important;
}
.aed-dd__subitem{
  margin-left: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155 !important;
  padding-top: 6px;
  padding-bottom: 6px;
}
.aed-dd__subitem::before{
  content: ">";
  margin-right: 8px;
  color: #0ea5e9;
  font-weight: 900;
}

/* Open rules: hover for desktop, click via .is-open */
@media (min-width: 992px){
  .aed-desktop{ display:block; }
  .aed-burger{ display:none !important; }
  .aed-dd:hover .aed-dd__panel:not(.aed-dd__panel--district){ display:block; }
  .aed-dd.is-open .aed-dd__panel{ display:block; }
  .aed-dd__panel--district .aed-dd__divider{ display:none; }

  /* Side menu (drawer) must be mobile-only */
  .aed-overlay{ display:none !important; }
  .aed-drawer{ display:none !important; }
  .aed-nav-open{ overflow: auto; }
}

/* Mobile-only burger (ensure visible on small screens) */
@media (max-width: 991.98px){
  .aed-burger{ display:inline-flex !important; }
}

/* Burger */
.aed-burger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(29,78,216,.08);
  border: 1px solid rgba(29,78,216,.18);
  cursor:pointer;
}
.aed-burger__bar{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--aed-brand);
  border-radius: 2px;
  margin: 2px 0;
}

/* Overlay + Drawer */
.aed-overlay{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(2px);
  z-index: 1090;
}
.aed-drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 92vw);
  background: #0b1220;
  color: #fff;
  z-index: 1100;
  transform: translateX(102%);
  transition: transform .22s ease;
  box-shadow: var(--aed-shadow);
  border-left: 1px solid rgba(255,255,255,.10);
  display:flex;
  flex-direction:column;
}
.aed-nav-open .aed-drawer{ transform: translateX(0); }
.aed-nav-open{ overflow: hidden; }

.aed-drawer__head{
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.aed-drawer__brand{ display:flex; gap: 10px; align-items:center; }
.aed-drawer__logo{ height: 44px; width:auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.25)); }
.aed-drawer__title{ font-weight: 900; font-size: 14px; letter-spacing: .01em; }
.aed-drawer__sub{ font-weight: 700; font-size: 12px; opacity: .85; }
.aed-drawer__close{
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
  width: 40px;
  height: 40px;
  border-radius: 14px;
  cursor:pointer;
  line-height: 1;
  font-size: 24px;
}

.aed-drawer__body{
  padding: 14px 16px 18px;
  overflow:auto;
}
.aed-drawer__lang{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.aed-drawer__label{ font-weight: 800; font-size: 13px; opacity: .92; }

/* reuse existing lang-switch look, but adjust for dark */
.aed-drawer .lang-switch{
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
}
.aed-drawer .lang-switch .lang-btn{ color: rgba(255,255,255,.90); }
.aed-drawer .lang-switch .lang-btn.active{
  background: linear-gradient(90deg, rgba(29,78,216,.95), rgba(14,165,233,.95));
  color: #fff;
}

/* Force active highlight for EN/MZ buttons everywhere in header (desktop + mobile) */
.aed-header .lang-switch .lang-btn.active{
  background: linear-gradient(90deg, rgba(29,78,216,.95), rgba(14,165,233,.95)) !important;
  color: #fff !important;
}

/* Mobile links */
.aed-m-link,
.aed-m-cta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding: 12px 12px;
  border-radius: 16px;
  color: rgba(255,255,255,.92) !important;
  text-decoration:none !important;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  margin: 8px 0;
}
.aed-m-link:hover,
.aed-m-link:focus{
  background: rgba(14,165,233,.14);
  border-color: rgba(14,165,233,.25);
}
.aed-m-cta{
  background: linear-gradient(90deg, rgba(29,78,216,.30), rgba(14,165,233,.22));
  border-color: rgba(29,78,216,.30);
}

.aed-m-acc{
  width:100%;
  margin: 8px 0 0;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.92);
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
}
.aed-m-acc--inner{
  margin-top: 6px;
  background: rgba(14,165,233,.12);
  border-color: rgba(14,165,233,.24);
  font-size: 12px;
}
.aed-m-acc__chev{
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,.85);
  border-bottom: 2px solid rgba(255,255,255,.85);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.aed-m-acc[aria-expanded="true"] .aed-m-acc__chev{ transform: rotate(225deg); }

.aed-m-panel{
  padding: 10px 6px 4px;
  border-left: 2px solid rgba(14,165,233,.35);
  margin-left: 10px;
}
.aed-m-panel--inner{
  margin-left: 6px;
  padding-top: 6px;
}

@media (max-width: 1199.98px){
  .aed-dd__panel--district{
    min-width: 340px;
  }
}
.aed-m-sublink{
  display:block;
  padding: 10px 10px;
  margin: 6px 0;
  border-radius: 14px;
  text-decoration:none !important;
  color: rgba(255,255,255,.88) !important;
  font-weight: 700;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.aed-m-sublink:hover,
.aed-m-sublink:focus{
  background: rgba(29,78,216,.20);
  border-color: rgba(29,78,216,.22);
}
.aed-m-group-title{
  margin: 10px 2px 4px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, .95);
}

/* Small screens: tighten brand text */
@media (max-width: 420px){
  .aed-brand__text{ display:none; }
  .aed-topbar__title{ max-width: 210px; }
}

