/* =========================================================
   IFL Global Header — GLOSSY BLACK + GREEN ACCENT
   Fixes:
   - Dropdowns above header (header z-index lowered)
   - Only one header visible (theme wrappers hidden via PHP)
   ========================================================= */

:root{
  --ifl-bg:#000000;
  --ifl-text:#e8f5ef;
  --ifl-muted:rgba(255,255,255,.72);
  --ifl-border:rgba(255,255,255,.10);
  --ifl-border2:rgba(255,255,255,.06);
  --ifl-accent:#18e27b;

  --ifl-h:84px;
}

/* Header shell */
.ifl-gh{
  position: relative;
  color: var(--ifl-text);

  /* IMPORTANT: keep header BELOW popups/dropdowns */
  z-index: 9000;

  background:
    radial-gradient(1200px 220px at 18% 0%, rgba(255,255,255,.10), transparent 62%),
    radial-gradient(900px 180px at 78% 0%, rgba(255,255,255,.06), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 42%),
    #000000;

  border-bottom: 1px solid var(--ifl-border2);

  box-shadow:
    0 18px 55px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* Sticky */
.ifl-gh--sticky{
  position: sticky;
  top: 0;
}

/* Inner layout */
.ifl-gh__inner{
  height: var(--ifl-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
  padding: 14px 18px;
}

/* Brand */
.ifl-gh__brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: var(--ifl-text);
}

.ifl-gh__logoImg{
  height: 44px;
  width: auto;
  display:block;
}

.ifl-gh__logoMark{
  width: 44px; height: 44px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), transparent 55%),
    #000000;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 34px rgba(0,0,0,.80);
}

.ifl-gh__site{
  font-weight: 900;
  letter-spacing: .3px;
  line-height: 1.05;
  font-size: 16px;
}

.ifl-gh__tag{
  font-size: 11px;
  letter-spacing: 2.4px;
  color: var(--ifl-muted);
  margin-top: 4px;
}

/* Nav */
.ifl-gh__nav{ flex: 1; display:flex; justify-content:center; }
.ifl-gh__menu{
  display:flex;
  gap: 18px;
  list-style:none;
  margin:0;
  padding:0;
}
.ifl-gh__menu > li{ position:relative; }

.ifl-gh__menu a{
  color: rgba(255,255,255,.92);
  text-decoration:none;
  font-weight: 800;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 10px 10px;
  border-radius: 14px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.ifl-gh__menu a:hover{
  color: var(--ifl-accent);
  background: rgba(255,255,255,.03);
}

/* Dropdown (header dropdowns) */
.ifl-gh__menu .sub-menu{
  position:absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: rgba(0,0,0,.98);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 10px;
  list-style:none;
  margin: 10px 0 0 0;
  display:none;
  z-index: 9100;

  box-shadow:
    0 26px 70px rgba(0,0,0,.90),
    inset 0 1px 0 rgba(255,255,255,.06);
}
.ifl-gh__menu li:hover > .sub-menu{ display:block; }

.ifl-gh__menu .sub-menu a{
  font-size: 13px;
  font-weight: 700;
  text-transform:none;
  letter-spacing: .2px;
  padding: 10px 12px;
  border-radius: 12px;
  width:100%;
}

/* Right side */
.ifl-gh__right{ display:flex; align-items:center; gap: 10px; }

/* Buttons */
.ifl-gh__btn{
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration:none;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.ifl-gh__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.18);
}

.ifl-gh__btn--primary{
  background: linear-gradient(180deg, rgba(24,226,123,.95), rgba(24,226,123,.65));
  color:#04130a;
  border-color: rgba(24,226,123,.35);
  box-shadow: 0 14px 34px rgba(0,0,0,.85);
}

/* Burger */
.ifl-gh__burger{
  display:none;
  width: 46px; height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  cursor:pointer;
}
.ifl-gh__burger span{
  display:block;
  height: 2px;
  margin: 6px 12px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
}

/* Mobile drawer/backdrop */
.ifl-gh__drawer, .ifl-gh__backdrop{ display:none; }

@media (max-width: 980px){
  .ifl-gh__nav{ display:none; }
  .ifl-gh__btn{ display:none; }
  .ifl-gh__burger{ display:block; }
  :root{ --ifl-h:76px; }

  .ifl-gh__drawer{
    display:block;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: min(86vw, 360px);
    background: rgba(0,0,0,.98);
    border-right: 1px solid rgba(255,255,255,.10);
    transform: translateX(-110%);
    transition: transform .22s ease;
    z-index: 9500;
    padding: 16px;
    box-shadow: 22px 0 80px rgba(0,0,0,.90);
  }

  .ifl-gh__backdrop{
    display:block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.60);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 9400;
  }

  .ifl-gh.is-open .ifl-gh__drawer{ transform: translateX(0); }
  .ifl-gh.is-open .ifl-gh__backdrop{
    opacity: 1;
    pointer-events: auto;
  }

  .ifl-gh__drawerTop{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 6px 4px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .ifl-gh__drawerTitle{ font-weight: 900; letter-spacing:.3px; }

  .ifl-gh__drawerClose{
    width: 46px; height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.03);
    color: var(--ifl-text);
    cursor:pointer;
  }

  .ifl-gh__drawerLinks .ifl-gh__menu{
    display:flex;
    flex-direction:column;
    gap: 6px;
  }

  .ifl-gh__drawerLinks .ifl-gh__menu a{
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
  }

  .ifl-gh__drawerLinks .sub-menu{
    position: static;
    display:block;
    margin: 6px 0 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.02);
  }

  .ifl-gh__drawerCtas{ display:flex; gap: 10px; margin-top: 16px; }
  .ifl-gh__drawerCtas .ifl-gh__btn{ display:inline-flex; flex:1; justify-content:center; }
}

/* =========================================================
   CRITICAL: Make popups/dropdowns above header
   ========================================================= */
.select2-container,
.select2-dropdown,
.dropdown-menu,
.ui-datepicker,
.flatpickr-calendar,
.pac-container,
.elementor-popup-modal,
.swal2-container {
  z-index: 10000 !important;
}
