/* ================================================================
   Hilf Al-Fudul Header Widget for Elementor v2.0
   Palette: Deep Teal #0D3B38 · Gold #C8962B
   KEY FIX: Mega menu overflow/z-index fully resolved
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --hafh-teal:  #0D3B38;
  --hafh-mid:   #183d3a;
  --hafh-gold:  #C8962B;
  --hafh-goldl: #E8B84B;
  --hafh-white: #ffffff;
  --hafh-fb:    'DM Sans', sans-serif;
  --hafh-tr:    .25s cubic-bezier(.4,0,.2,1);
}

/* ================================================================
   OVERFLOW FIX — Force every Elementor ancestor to NOT clip
   the dropdown. This is the root cause of the "dropdown hidden"
   bug — Elementor sections/columns default to overflow:hidden.
================================================================ */
.elementor-widget-haf_header,
.elementor-widget-haf_header .elementor-widget-container,
.elementor-widget-haf_header .hafh,
.elementor-widget-haf_header .hafh__inner,
.elementor-widget-haf_header .hafh-nav,
.elementor-widget-haf_header .hafh-nav__list,
.elementor-widget-haf_header .hafh-nav__item--has-dropdown {
  overflow: visible !important;
}

/* Elementor section/column containing the widget */
.elementor-section:has(.elementor-widget-haf_header),
.elementor-column:has(.elementor-widget-haf_header),
.elementor-widget-wrap:has(.elementor-widget-haf_header),
.e-con:has(.elementor-widget-haf_header),
.e-con-inner:has(.elementor-widget-haf_header) {
  overflow: visible !important;
}

/* ── Full-width breakout ────────────────────────────────── */
.elementor-widget-haf_header {
  width:        100vw !important;
  max-width:    100vw !important;
  margin-left:  calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing:   border-box;
  /* Must not create new stacking context */
  position:     relative;
  z-index:      9999;
}
.elementor-widget-haf_header .elementor-widget-container {
  padding: 0 !important;
  margin:  0 !important;
}

/* ================================================================
   HEADER BAR
================================================================ */
.hafh {
  position: sticky;
  top: 0; left: 0; right: 0;
  width: 100%;
  background: rgba(13, 59, 56, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  /* CRITICAL: must not clip dropdowns */
  overflow: visible;
  /* High z-index so it sits above page content */
  z-index: 9999;
}

.hafh__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  /* CRITICAL: must not clip dropdowns */
  overflow: visible;
  position: relative;
}

/* ── Logo ───────────────────────────────────────────────── */
.hafh__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  /* contain the image without overflow:hidden */
  max-width: 170px;
}
.hafh__logo img {
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.hafh__logo-fallback {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--hafh-fb);
  font-size: 16px;
  font-weight: 700;
  color: var(--hafh-white);
}

/* ── Nav wrapper ────────────────────────────────────────── */
.hafh-nav {
  flex: 1;
  /* CRITICAL */
  overflow: visible;
  position: relative;
}
.hafh-nav__list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
  gap: 2px;
  flex-wrap: nowrap;
  /* CRITICAL */
  overflow: visible;
}

/* ── Nav items ──────────────────────────────────────────── */
.hafh-nav__list > li {
  position: relative;
  /* CRITICAL */
  overflow: visible;
}

.hafh-nav__link,
.hafh-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--hafh-fb);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 6px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color var(--hafh-tr), background var(--hafh-tr);
}
.hafh-nav__link:hover,
.hafh-nav__btn:hover {
  color: var(--hafh-gold);
  background: rgba(255,255,255,.07);
}
.hafh-nav__link--active {
  color: #fff;
  border-bottom: 2px solid var(--hafh-gold);
  border-radius: 0;
}

/* Chevron */
.hafh-chevron {
  width: 10px; height: 7px;
  flex-shrink: 0;
  transition: transform var(--hafh-tr);
}
.hafh-nav__item--has-dropdown:hover .hafh-chevron,
.hafh-nav__item--has-dropdown.is-open .hafh-chevron {
  transform: rotate(180deg);
}

/* ================================================================
   DROPDOWN — the key section
================================================================ */
.hafh-dropdown {
  /* Positioned relative to the <li> parent */
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);

  min-width: 250px;
  padding: 8px;
  background: #0c302d;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0,0,0,.55);

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;

  /* MUST be above everything */
  z-index: 999999;
}

/* Show on hover OR .is-open (JS) */
.hafh-nav__item--has-dropdown:hover .hafh-dropdown,
.hafh-nav__item--has-dropdown.is-open .hafh-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.hafh-dropdown__heading {
  font-family: var(--hafh-fb);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hafh-gold);
  padding: 8px 12px 6px;
  margin: 0;
}
.hafh-dropdown ul {
  list-style: none;
  margin: 0; padding: 0;
}
.hafh-dropdown__link {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-family: var(--hafh-fb);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.hafh-dropdown__link:hover {
  background: rgba(200,150,43,.18);
  color: var(--hafh-gold);
}

/* ── Right side ─────────────────────────────────────────── */
.hafh__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.hafh__phone {
  display: flex;
  align-items: center;
  gap: 9px;
}
.hafh__phone svg {
  width: 22px; height: 22px;
  color: var(--hafh-gold);
  flex-shrink: 0;
}
.hafh__phone div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.hafh__phone span {
  font-family: var(--hafh-fb);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.hafh__phone strong {
  font-family: var(--hafh-fb);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.hafh__cta {
  display: inline-block;
  background: var(--hafh-gold);
  color: #0A0F0E;
  font-family: var(--hafh-fb);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background var(--hafh-tr), transform var(--hafh-tr);
  flex-shrink: 0;
}
.hafh__cta:hover {
  background: var(--hafh-goldl);
  transform: translateY(-1px);
}

/* ── Hamburger ──────────────────────────────────────────── */
.hafh__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.hafh__burger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hafh__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hafh__burger.is-open span:nth-child(2) { opacity: 0; }
.hafh__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   MOBILE DRAWER
================================================================ */
.hafh-mobile {
  display: none;
  background: #0a2a28;
  border-top: 1px solid rgba(255,255,255,.08);
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.hafh-mobile.is-open {
  max-height: 90vh;
  overflow-y: auto;
}
.hafh-mobile__list {
  list-style: none;
  margin: 0; padding: 10px 0;
}
.hafh-mobile__list > li {
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.hafh-mobile__list > li > a,
.hafh-mobile__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--hafh-fb);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.hafh-mobile__toggle svg { width: 12px; height: 8px; transition: transform var(--hafh-tr); }
.hafh-mobile__group.is-open > button svg { transform: rotate(180deg); }
.hafh-mobile__group ul {
  list-style: none;
  margin: 0; padding: 0 0 6px;
  background: rgba(0,0,0,.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.hafh-mobile__group.is-open > ul { max-height: 600px; }
.hafh-mobile__group ul li a {
  display: block;
  padding: 10px 24px 10px 38px;
  font-family: var(--hafh-fb);
  font-size: 13px;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color .2s;
}
.hafh-mobile__group ul li a:hover { color: var(--hafh-gold); }

/* ── Scroll shadow ──────────────────────────────────────── */
.hafh.is-scrolled {
  box-shadow: 0 4px 32px rgba(0,0,0,.4);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hafh__phone { display: none; }
}
@media (max-width: 880px) {
  .hafh-nav    { display: none; }
  .hafh__burger { display: flex; }
  .hafh-mobile  { display: block; }
  .hafh__inner  { height: 60px; padding: 0 20px; }
}
@media (max-width: 480px) {
  .hafh__cta { font-size: 10px; padding: 8px 12px; }
}
