/* ==========================================================================
   AXIOS HEADER — floating liquid-glass bar (matches the home redesign)
   Shared by every page. Loaded after style.css / glassmorphism.css.
   ========================================================================== */

.glass-header {
  --hdr-text: #F5F6F8;
  --hdr-muted: #9AA3B5;
  --hdr-orange: #E35309;
  --hdr-orange-l: #FF6B1F;
  --hdr-ink: #0B0D12;
  --hdr-ease: cubic-bezier(.25, 1, .5, 1);

  top: 0;
  padding: 12px 16px 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  pointer-events: none;
}
.glass-header.scrolled { background: transparent; box-shadow: none; }

/* The bar itself is the glass capsule */
.glass-header .header-container {
  position: relative;
  max-width: 1200px;
  height: 64px;
  padding: 0 10px 0 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 40%, rgba(255, 255, 255, 0.02) 65%, rgba(255, 255, 255, 0.06) 100%),
    rgba(7, 9, 15, 0.38);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 18px 40px -24px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  transition: background .45s var(--hdr-ease), box-shadow .45s var(--hdr-ease);
}
.glass-header.scrolled .header-container {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.05) 100%),
    rgba(7, 9, 15, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 20px 50px -20px rgba(0, 0, 0, 0.85);
}

.glass-header .header-logo-img { height: 34px; }

/* ---------- Links ---------- */
.glass-header .nav-menu { gap: 4px; margin: 0; padding: 0; }

.glass-header .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--hdr-muted);
  transition: color .3s var(--hdr-ease), background .3s var(--hdr-ease);
}
.glass-header .nav-link:hover { color: var(--hdr-text); background: rgba(255, 255, 255, 0.06); }
.glass-header .nav-link.active {
  color: var(--hdr-text);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.glass-header .nav-link.active::after {
  left: 50%;
  right: auto;
  bottom: 4px;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  background: var(--hdr-orange-l);
}
.glass-header .dropdown-chevron { font-size: 0.625rem; color: var(--hdr-muted); }
.glass-header .nav-dropdown-wrapper:hover .dropdown-chevron,
.glass-header .nav-dropdown-wrapper.active .dropdown-chevron { color: var(--hdr-orange-l); }

/* ---------- Dropdowns ---------- */
.glass-header .dropdown-menu {
  background: rgba(12, 15, 22, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 30px 70px -20px rgba(0, 0, 0, 0.9);
}
.glass-header .dropdown-menu:hover { background: rgba(12, 15, 22, 0.94) !important; }
.glass-header .dropdown-header-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #FFB27A;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.glass-header .country-item,
.glass-header .submenu-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  color: #D5DAE3;
}
.glass-header .country-item:hover,
.glass-header .submenu-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff !important;
  transform: translateX(3px);
}
.glass-header .submenu-item:hover .submenu-svg-icon { stroke: var(--hdr-orange-l); }

/* ---------- Actions ---------- */
.glass-header .header-actions { gap: 8px; }

.hdr-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px 0 18px;
  border-radius: 13px;
  background: #fff;
  color: var(--hdr-ink);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 26px -10px rgba(255, 107, 31, 0.6);
  transition: transform .45s var(--hdr-ease), box-shadow .45s var(--hdr-ease);
}
.hdr-cta:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #fff, 0 14px 32px -10px rgba(255, 107, 31, 0.8); }
.hdr-cta:active { transform: scale(.98); }
.hdr-cta-arrow {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--hdr-orange);
  color: #fff;
  font-size: 0.8125rem;
  transition: transform .45s var(--hdr-ease);
}
.hdr-cta:hover .hdr-cta-arrow { transform: translateX(2px); }

.hdr-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.hdr-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: var(--hdr-text);
  transition: transform .4s var(--hdr-ease), top .4s var(--hdr-ease);
}
.hdr-toggle span:first-child { top: 17px; }
.hdr-toggle span:last-child { top: 25px; }
.glass-header.menu-open .hdr-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.glass-header.menu-open .hdr-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

.glass-header a:focus-visible,
.glass-header button:focus-visible { outline: 2px solid #22C3D6; outline-offset: 3px; }

/* ---------- Mobile panel ---------- */
.hdr-panel {
  max-width: 1200px;
  margin: 8px auto 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100svh - 100px);
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.05) 100%),
    rgba(7, 9, 15, 0.9);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  pointer-events: auto;
  animation: hdr-panel-in .35s var(--hdr-ease) both;
}
.hdr-panel[hidden] { display: none; }

.hdr-panel-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--hdr-text);
  text-decoration: none;
}
.hdr-panel-link:hover,
.hdr-panel-link:focus-visible { background: rgba(255, 255, 255, 0.07); }
.hdr-panel-sub { min-height: 42px; padding-left: 26px; font-size: 0.875rem; color: #C3CAD6; }
.hdr-panel-label {
  margin: 10px 14px 2px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFB27A;
}

@keyframes hdr-panel-in {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Breakpoints ---------- */
@media (max-width: 992px) {
  .hdr-toggle { display: inline-block; }
}
@media (min-width: 993px) {
  .hdr-panel { display: none !important; }
}
@media (max-width: 600px) {
  .glass-header { padding: 10px 10px 0; }
  .glass-header .header-container { height: 60px; padding: 0 8px 0 14px; border-radius: 18px; }
  .glass-header .header-logo-img { height: 26px; max-width: 128px; }
  .hdr-cta { min-height: 44px; padding: 0 6px 0 12px; font-size: 0.8125rem; gap: 8px; }
  .hdr-cta-arrow { width: 26px; height: 26px; }
}
@media (max-width: 359px) {
  .hdr-cta > span:first-child { display: none; }
  .hdr-cta { padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .hdr-panel { animation: none; }
  .hdr-toggle span, .hdr-cta, .hdr-cta-arrow { transition: none; }
}

/* ==========================================================================
   INITIATIVES MEGA MENU — photo cards with each initiative's color glow
   ========================================================================== */
.glass-header .mega-menu {
  width: min(840px, calc(100vw - 48px)) !important;
  padding: 18px;
  border-radius: 22px;
}

.mega-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 4px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mega-kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFB27A;
}
.mega-lead {
  max-width: 440px;
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--hdr-muted);
}
.mega-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 6px 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hdr-text);
  text-decoration: none;
  transition: background .3s var(--hdr-ease), border-color .3s var(--hdr-ease);
}
.mega-all:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.24); }
.mega-all-arrow {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--hdr-orange);
  color: #fff;
  transition: transform .45s var(--hdr-ease);
}
.mega-all:hover .mega-all-arrow { transform: translateX(2px); }

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.mega-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #11141C, #0C0F15);
  text-decoration: none;
  color: var(--hdr-text);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity .45s var(--hdr-ease), transform .45s var(--hdr-ease),
    border-color .35s var(--hdr-ease), box-shadow .35s var(--hdr-ease);
}
.mega-card:nth-child(2) { transition-delay: .05s, .05s, 0s, 0s; }
.mega-card:nth-child(3) { transition-delay: .1s, .1s, 0s, 0s; }

.nav-dropdown-wrapper:hover .mega-card,
.nav-dropdown-wrapper.active .mega-card,
.nav-dropdown-wrapper:focus-within .mega-card { opacity: 1; transform: none; }

.mega-card:hover {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 20px 40px -24px var(--c);
}

.mega-photo {
  position: relative;
  display: block;
  height: 148px;
  overflow: hidden;
}
.mega-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform .8s var(--hdr-ease);
}
.mega-card:hover .mega-photo img { transform: scale(1.06); }
.mega-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 110%, color-mix(in srgb, var(--c) 55%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(12, 15, 21, 0) 35%, #0F121A 100%);
}

.mega-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(14, 17, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.6875rem;
  font-weight: 500;
  color: #E9ECF2;
}
.mega-chip i {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.mega-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 4px 16px 16px;
}
.mega-n { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; color: var(--c); }
.mega-title { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--hdr-text); }
.mega-text { font-size: 0.75rem; line-height: 1.5; color: var(--hdr-muted); }
.mega-more {
  display: inline-flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c);
}
.mega-more span:last-child { transition: transform .45s var(--hdr-ease); }
.mega-card:hover .mega-more span:last-child { transform: translateX(3px); }

/* After choosing an option, keep the menu closed until the pointer leaves */
.glass-header .nav-dropdown-wrapper.is-dismissed .dropdown-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Mobile panel: initiative thumbnails */
.hdr-panel-sub { gap: 12px; min-height: 52px; padding-left: 14px; }
.hdr-panel-thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .mega-card { opacity: 1; transform: none; transition: none; }
  .mega-photo img, .mega-all-arrow { transition: none; }
}

/* ==========================================================================
   PROJECTS MEGA MENU — countries created in the admin panel
   ========================================================================== */
.glass-header .projects-mega { width: min(760px, calc(100vw - 48px)) !important; }

.mega-countries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  max-height: min(420px, calc(100svh - 260px));
  overflow-y: auto;
  padding-right: 2px;
}
.mega-countries::-webkit-scrollbar { width: 4px; }
.mega-countries::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border-radius: 4px; }

.mega-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 26px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  text-align: center;
  font-size: 0.875rem;
  color: var(--hdr-muted);
}

.mega-country {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(60% 120% at 0% 50%, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.03);
  color: var(--hdr-text);
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity .4s var(--hdr-ease), transform .4s var(--hdr-ease),
    border-color .3s var(--hdr-ease), background-color .3s var(--hdr-ease);
}
.nav-dropdown-wrapper:hover .mega-country,
.nav-dropdown-wrapper.active .mega-country,
.nav-dropdown-wrapper:focus-within .mega-country { opacity: 1; transform: none; }
.mega-country:nth-child(2) { transition-delay: .03s, .03s, 0s, 0s; }
.mega-country:nth-child(3) { transition-delay: .06s, .06s, 0s, 0s; }
.mega-country:nth-child(4) { transition-delay: .09s, .09s, 0s, 0s; }
.mega-country:nth-child(n + 5) { transition-delay: .12s, .12s, 0s, 0s; }
.mega-country:hover {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background-color: rgba(255, 255, 255, 0.05);
}

.mega-flag {
  width: 44px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 14px -6px rgba(0, 0, 0, 0.8);
}
.mega-country-body { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.mega-country-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.25; }
.mega-country-meta { font-size: 0.75rem; color: var(--hdr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-country-bar { display: block; height: 4px; margin-top: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mega-country-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.mega-country-count {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  font-size: 0.6875rem;
  color: #D5DAE3;
  white-space: nowrap;
}
.mega-country-count strong { color: var(--c); font-size: 0.8125rem; }

/* Mobile menu: country flags */
.hdr-panel-countries { display: flex; flex-direction: column; gap: 2px; }
.hdr-panel-flag {
  width: 30px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent);
}
.hdr-panel-countries .hdr-panel-sub { min-height: 46px; }

@media (prefers-reduced-motion: reduce) {
  .mega-country { opacity: 1; transform: none; transition: none; }
}
