/* =====================  FIXED HEADER (80px)  ===================== */
.header-section{ position:fixed; top:0; left:0; right:0; z-index:1000; }
#et-main-area{ padding-top:80px; }

/* WP Admin bar offsets */
body.admin-bar .header-section{ top:32px; }
body.admin-bar #et-main-area{ padding-top:112px; } /* 80 + 32 */
@media (max-width:782px){
  #wpadminbar{ position:fixed !important; top:0; left:0; right:0; z-index:100000; }
  body.admin-bar .header-section{ top:46px; }
  body.admin-bar #et-main-area{ padding-top:126px; } /* 80 + 46 */
}

/* Strip Divi padding inside header section */
.header-section.et_pb_section{ padding:0 !important; }

/* Header bar */
.site-header{
  /* background:#0b1b2b; */
  background: rgba(11, 27, 43, 0.60);
  backdrop-filter: blur(20px);  
  border-bottom:1px solid #102c49 !important;
  transition:background .25s ease, border-color .25s ease;
  box-sizing:border-box;
  height:80px;
  padding:20px 0;
  display:flex; align-items:center;
}

/* Base header row (shared) */
.site-header .et_pb_row{
  height:40px;
  display:flex; align-items:center; justify-content:flex-start;
  margin:0 auto !important;
}

/* Kill module bottom nudges */
.site-header .et_pb_module{ margin-bottom:0 !important; }

/* ===== Logo variants ===== */
.logo{ display:flex; align-items:center; min-width:0; }
.logo img{ max-height:40px; height:auto; width:auto; display:block; object-fit:contain; }

/* Hide all by default */
.logo--desktop-light, .logo--desktop-dark,
.logo--mobile-light, .logo--mobile-dark{ display:none !important; }

/* Desktop logo swap */
@media (min-width:981px){
  .logo--desktop-light{ display:block !important; }
  .site-header.is-reversed .logo--desktop-light{ display:none !important; }
  .site-header.is-reversed .logo--desktop-dark{ display:block !important; }
}

/* Mobile/tablet logo swap */
@media (max-width:980px){
  .logo--mobile-light{ display:block !important; }
  .site-header.is-reversed .logo--mobile-light{ display:none !important; }
  .site-header.is-reversed .logo--mobile-dark{ display:block !important; }
}

/* Reversed (overlay open) header surface */
.site-header.is-reversed{
  background:#e0efff;
  border-bottom:1px solid #d0d8e0 !important;
}

/* ===== Right cluster ===== */
.hdr-right{
  display:flex; align-items:center; justify-content:flex-end;
  gap:12px; min-height:40px; position:relative; z-index:1001;
}

/* CTA button */
.site-header .et_pb_button.hdr-cta,
.site-header .hdr-cta .et_pb_button{
  height:40px !important; line-height:40px !important;
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  width:120px !important; padding:0 16px !important; box-sizing:border-box !important;

  font-family:"CaseLocal", sans-serif !important;
  font-size:16px !important; font-variation-settings:"wght" 350; /* smooth weight */
  background:#00FFE1 !important; color:#102c49 !important;
  border:0 !important; border-radius:4px !important; text-decoration:none !important;
  box-shadow:none !important; transition:font-variation-settings .2s, background-color .2s, color .2s !important;
}
/* Mobile override */
@media (max-width:980px){
  .site-header .et_pb_button.hdr-cta,
  .site-header .hdr-cta .et_pb_button{
    width:106px !important;
  }
}
.site-header .et_pb_button.hdr-cta:hover,
.site-header .hdr-cta .et_pb_button:hover{ background:#000d1a !important; color:#00FFE1 !important; }
.site-header .et_pb_button.hdr-cta:after,
.site-header .hdr-cta .et_pb_button:after{ content:none !important; display:none !important; }

.site-header.is-reversed .et_pb_button.hdr-cta,
.site-header.is-reversed .hdr-cta .et_pb_button{
  background:#0b1b2b !important; color:#e0efff !important; font-variation-settings:"wght" 350;
}
.site-header.is-reversed .et_pb_button.hdr-cta:hover,
.site-header.is-reversed .hdr-cta .et_pb_button:hover{
   background:#00FFE1 !important; color:#000d1a !important; }

/* Mobile font size tweak */
@media (max-width:980px){
  .site-header .et_pb_button.hdr-cta,
  .site-header .hdr-cta .et_pb_button{ font-size:13px !important; }
}

/* ===== Replace Divi toggle with SVG swap ===== */
.site-header .et_pb_menu__menu,
.site-header .et_mobile_menu,
.hdr-menu .et_pb_menu__toggle,
.hdr-menu .mobile_menu_bar{ display:none !important; }

.hdr-toggle{ width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  background:transparent !important; border:0; margin:0; padding:0; position:relative; z-index:1002; cursor:pointer; line-height:1; }
.hdr-toggle *{ pointer-events:none; }
.hdr-toggle .bars{ display:none !important; } /* legacy */
.hdr-toggle .icon{ width:40px; height:40px; display:block; background-position:center; background-repeat:no-repeat; background-size:contain; }
.hdr-toggle .icon--closed{ background-image:url('/wp-content/uploads/2025/09/menu-closed.svg?v=2'); }
.hdr-toggle .icon--open{   background-image:url('/wp-content/uploads/2025/09/menu-open.svg?v=2'); display:none; }
.hdr-toggle.is-open .icon--closed{ display:none; }
.hdr-toggle.is-open .icon--open{  display:block; }

/* Keep overlay under header so clicks reach the toggle */
.header-section{ z-index:1000; }
.mobile-overlay{ z-index:900; }

/* =====================  OVERLAY PANEL  ===================== */
#mobile-overlay.et_pb_section,
#mobile-overlay.et_pb_section.et_pb_with_background{ background:#e0efff !important; padding:0 !important; }

.mobile-overlay{
  position:fixed; left:0; right:0; bottom:0; top:80px; z-index:900;
  background:#e0efff; overflow:auto;
  transform:translateY(-100%); opacity:0; pointer-events:none;
  transition:transform .28s ease, opacity .28s ease;
}
.mobile-overlay.is-open{ transform:translateY(0); opacity:1; pointer-events:auto; }
@media (min-width:783px){ body.admin-bar .mobile-overlay{ top:calc(80px + 32px); } }
@media (max-width:782px){ body.admin-bar .mobile-overlay{ top:calc(80px + 46px); } }

/* Overlay rows (optional: match site grid or full width) */
.mobile-overlay .et_pb_row{
  max-width:1272px; margin:0 auto; padding:24px 0; margin-bottom:0 !important;
}

/* Use vertical Divi mobile menu inside overlay */
.overlay-menu .et_pb_menu__menu{ display:none !important; }
.overlay-menu .et_mobile_menu{ display:block !important; position:static; width:auto; box-shadow:none; border:0; background:transparent; }
.overlay-menu .et_mobile_menu li a{
  display:block; padding:16px 18px; color:#0e2735; border-bottom:1px solid rgba(14,39,53,.12);
}
.overlay-menu .et_mobile_menu li:last-child > a{ border-bottom:0; }
.overlay-menu .et_mobile_menu li a:hover{ background:rgba(14,39,53,.05); }

/* Optional section labels */
.overlay-menu .et_mobile_menu .is-section > a{
  font-size:12px; letter-spacing:.12em; text-transform:uppercase;
  color:rgba(14,39,53,.55); background:none; border-bottom:0; padding:10px 18px 6px; cursor:default;
}

/* =====================  RESPONSIVE LAYOUT  ===================== */

/* Desktop (≥981px): cap at 1272; zero gutters in header row */
@media (min-width:981px){
  .site-header .et_pb_row{
    max-width:1272px !important;
    margin-left:auto !important; margin-right:auto !important;
    padding-left:0 !important; padding-right:0 !important;
    display:flex !important; align-items:center !important; gap:0 !important;
  }

  /* Column behavior */
  .site-header .et_pb_row > .et_pb_column,
  .site-header .et_pb_row > .et_pb_column_1_2{
    float:none !important; width:auto !important; max-width:none !important;
    padding:0 !important; margin:0 !important;
  }
  .site-header .et_pb_row > .et_pb_column:first-child{ flex:0 0 auto !important; }
  .site-header .et_pb_row > .et_pb_column.hdr-right{
    flex:1 1 auto !important; margin-left:auto !important; padding-right:0 !important;
    display:flex !important; align-items:center !important; justify-content:flex-end !important; gap:12px !important;
  }

  /* No stray padding inside cluster */
  .hdr-right .et_pb_module, .hdr-right .et_pb_button, .hdr-right .hdr-toggle{ margin:0 !important; padding:0 !important; }
}

/* Tablet (768–980): full width + 48px gutters */
@media (max-width:980px) and (min-width:768px){
  .et-l--header .site-header .et_pb_row,
  .et-l--header .et_pb_section.site-header .et_pb_row,
  .site-header .et_pb_row{
    width:100% !important; max-width:100% !important;
    margin-left:0 !important; margin-right:0 !important;
    padding-left:48px !important; padding-right:48px !important;
    box-sizing:border-box !important;
    display:flex !important; justify-content:space-between !important; align-items:center !important;
  }
  .site-header .et_pb_row .et_pb_column{ display:flex !important; align-items:center !important; margin:0 !important; padding:0 !important; }
  .site-header .et_pb_row > .et_pb_column:first-child{ flex:0 0 auto !important; }
  .hdr-right{ flex:1 1 auto !important; justify-content:flex-end !important; min-width:0 !important; }
}

/* Mobile (≤767): full width + 16px gutters */
@media (max-width:767px){
  .et-l--header .site-header .et_pb_row,
  .et-l--header .et_pb_section.site-header .et_pb_row,
  .site-header .et_pb_row{
    width:100% !important; max-width:100% !important;
    margin-left:0 !important; margin-right:0 !important;
    padding-left:16px !important; padding-right:16px !important;
    box-sizing:border-box !important;
    display:flex !important; justify-content:space-between !important; align-items:center !important;
  }
  .site-header .et_pb_row .et_pb_column{ display:flex !important; align-items:center !important; margin:0 !important; padding:0 !important; }
  .site-header .et_pb_row > .et_pb_column:first-child{ flex:0 0 auto !important; }
  .hdr-right{ flex:1 1 auto !important; justify-content:flex-end !important; min-width:0 !important; }
  .mobile-overlay .overlay-close{ display:none !important; }
}

/* ===== Safety: if header refuses to move (rare) ===== */
body.admin-bar #et-main-area{ padding-top:80px !important; }

/* ========= OVERLAY CONTENT ========= */

/* Panel surface (optional; use #fff if you want pure white) */
.mobile-overlay{ background:#e0efff !important; }
.site-header.is-reversed + .mobile-overlay{ background:#e0efff; }

/* Base text/link styles */
.overlay-menu{ color:#0e2735; font-weight:350; }
.overlay-menu a{ color:#0b1b2b; text-decoration:none; }
.overlay-menu a:hover{ text-decoration:underline; }

/* Layout: flex column on mobile/tablet; two columns on desktop */
.overlay-inner{
  display:flex;
  flex-direction:column;
  /* we’ll simulate “gap” with margins on children for compatibility */
  padding-top:24px;
}

/* Columns container behavior */
.overlay-col{ width:100%; }

/* stack gap only on mobile/tablet */
@media (max-width:980px){
  .overlay-col + .overlay-col{
    margin-top:28px;
  }
}
/* Desktop: two columns */
@media (min-width:981px){
  .overlay-inner{
    flex-direction:row;
    padding-top:24px;
  }
  .overlay-col{ width:50%; }
  .overlay-col--left{ padding-right:24px; }
  .overlay-col--right{ padding-left:24px; margin-top:0; }
}

/* Primary big link (“Who We Are”) */
.overlay-col--left .overlay-primary{ list-style:none !important; list-style-type: none !important; margin:0 0 24px; padding:0; }
.overlay-col--left .overlay-link--xl{
  display:inline-block;
  font-size:16px;
  line-height:1.2;
  padding:0 0;
  color:#0b1b2b;
}

/* Section groups + separators */
.overlay-group{
  padding:24px 0;
  border-top:1px solid #a2adb8;
}
.overlay-group:first-child{ border-top:1; padding:24px 0; }

/* Labels (SERVICES / LOCATIONS / RESOURCES) */
.overlay-label{
  font-size:10px;
  letter-spacing:.2px;
  text-transform:uppercase;
  color:#0b1b2b;
  margin-bottom:16px;
}

/* Lists */ 
.overlay-list{ list-style:none !important; list-style-type: none !important; margin:0 0 20px; padding:0 0; }
.overlay-list li + li{ margin-top:14px; }
.overlay-link{ display:inline-block; font-size:16px; line-height:1.2; padding:0 0; color: #0b1b2b; }
/* Kill default UL padding inside overlay */
.overlay-list,
.overlay-list ul{
  padding:0 !important;
  margin:0 !important;
  list-style:none !important;
}

/* Desktop: right column drops its top rule for a cleaner split */
@media (min-width:981px){
  .overlay-col--right .overlay-group{ padding-top:0; margin-top:0; border-top:0; }
}
