/* === HEADER BASE === */
#header {
  background-color: transparent !important;
  transition: background-color 0.4s ease !important;
}

/* === HEADER SCROLLED === */
#header.scrolled {
  background-color: #ffffff !important;
  box-shadow: 0px 4px 6px -4px rgba(0, 0, 0, 0.1) !important;
}

/* === LOGO COLOR TRANSITION === */
#header .et_pb_image_wrap img {
  transition: filter 0.4s ease !important;
  filter: brightness(0) saturate(100%) invert(100%) !important;
  /* white */
}

#header .et_pb_image_wrap img.scrolled-logo {
  filter: brightness(0) saturate(100%) invert(0%) !important;
  /* black */
}

/* Logo Fix of Safari Bug */
.header-logo {
  max-width: 200px;
  display: block;
}

/* === CONTACT BUTTON === */
/* Default: white background, dark blue text */
#header_main_button {
  background-color: #ffffff !important;
  color: #0c284c !important;
  border: 0px solid #0c284c !important;
  border-radius: 100px !important;
  transition: all 0.4s ease !important;
  white-space: nowrap !important;
}

/* Default hover: Hydrostor blue background, white text */
#header_main_button:hover {
  background-color: #29abe2 !important;
  color: #ffffff !important;
  border-color: #29abe2 !important;
}

/* On scroll: dark blue background, white text (no hover change) */
#header_main_button.scrolled-btn,
#page-container .et_pb_section .et_pb_button_0_tb_header.scrolled-btn {
  background-color: #0c284c !important;
  color: #ffffff !important;
  border-color: #0c284c !important;
}

/* Scrolled hover: stay the same (no color change) */
#header_main_button.scrolled-btn:hover,
#page-container .et_pb_section .et_pb_button_0_tb_header.scrolled-btn:hover {
  background-color: #29abe2 !important;
  color: #0c284c !important;
  border-color: #0c284c !important;
}

/* === HEADER ICONS === */
/* Default: white */
#header .et-pb-icon,
.et_pb_icon_0_tb_header .et_pb_icon_wrap,
.et_pb_icon_0_tb_header .et_pb_icon_wrap .et-pb-icon {
  border-color: #ffffff !important;
  color: #ffffff !important;
  transition: all 0.4s ease !important;
}

/* On scroll: dark blue */
#header .et-pb-icon.scrolled-icon,
.et_pb_icon_0_tb_header .et_pb_icon_wrap.scrolled-icon,
.et_pb_icon_0_tb_header .et_pb_icon_wrap .et-pb-icon.scrolled-icon {
  border-color: #0c284c !important;
  color: #0c284c !important;
}

/* === HEADER INTERIOR PADDING === */
#header-interior,
#menu-dialog div:first-child,
#menu-dialog .et_pb_row_1_tb_header.et_pb_row {
  transition: padding 0.4s ease !important;
  /*padding-top: 3vh !important;
  padding-bottom: 3vh !important;*/
}

#header-interior.scrolled-padding {
  padding-top: 1vh !important;
  padding-bottom: 1vh !important;
}

#menu-dialog div:first-child.scrolled-padding,
#menu-dialog .et_pb_row_1_tb_header.et_pb_row.scrolled-padding {
  padding-top: 0.5vh !important;
  padding-bottom: 0.5vh !important;
}

@media (max-width: 980px) {
  .header-line:after {
    display: none !important;
  }
}

.et_pb_menu--without-logo .et_pb_menu__menu > nav > ul > li {
  padding-left: 0px !important;
}

/* Code that was on header module settings */

.active {
  opacity: 1 !important;
  visibility: visible !important;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    display 0.4s ease;
  pointer-events: auto;
  /* 🔥 clickable again */
}

#menu-dialog.active {
  pointer-events: auto !important;
}

#header.et_pb_sticky--top {
  background: white !important;
  border-bottom: 1px solid #eee;
}

#header.et_pb_sticky--top .et_pb_image_wrap img {
  filter: brightness(0) saturate(100%) invert(11%) sepia(17%) saturate(1937%) hue-rotate(182deg)
    brightness(96%) contrast(92%);
}

#header.et_pb_sticky--top .et-pb-icon,
#header.et_pb_sticky--top .et_pb_icon_wrap {
  color: #0c284c !important;
  border-color: #0c284c !important;
}

#header.et_pb_sticky--top .et_pb_button {
  color: #ffffff !important;
  background: #0c284c !important;
  border-color: #0c284c !important;
}

#header.et_pb_sticky--top #header-interior,
.reduce-header-spacing {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.et_pb_sticky--top,
#header,
#menu-dialog,
#open-icon,
#close-icon,
.active,
#header div {
  transition: all 0.5s;
}

body #page-container #header.et_pb_section.et_pb_sticky--top .et_pb_button_0_tb_header {
  color: white !important;
}

#header #open-icon,
#header #close-icon {
  display: flex;
  align-items: flex-end;
  /* vertical centering */
  justify-content: flex-end;
  /* optional: horizontal centering */
  height: 100%;
  /* ensure it takes full column height */
}

.header-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: #fff;
  border-left: 1px solid #4696e5;
  border-right: 1px solid #4696e5;
  -webkit-box-shadow:
    0 0 50px 10px rgba(0, 128, 255, 0.5),
    0 0 100px 50px rgba(0, 128, 255, 0.3);
  box-shadow:
    0 0 50px 10px rgba(0, 128, 255, 0.5),
    0 0 100px 50px rgba(0, 128, 255, 0.3);
  z-index: 1;
}

.et_pb_row_1_tb_header.et_pb_row {
  padding-top: 0px !important;
  padding-bottom: 0px !important;
}

/*
#menu-dialog div:first-child, #menu-dialog .et_pb_row_1_tb_header.et_pb_row {
  padding-top: 3vh !important;
  padding-bottom: 3vh !important;
}*/

/* === MENU DIALOG TRANSITION === */
#menu-dialog {
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    display 0.4s ease;
  pointer-events: none;
  /* 🔥 prevent clicks */
}

#header-interior-3,
#header-exterior-3 {
  margin-right: 0% !important;
  margin-left: 0% !important;
}

#header_main_button {
  width: calc(100% - 0px) !important;
}

#menu-dialog .et_pb_column_9_tb_header {
  padding-left: 1vh;
}

div#et-boc header .et_builder_inner_content.et_pb_gutters4 {
  z-index: 99999 !important;
}

#menu-dialog {
  z-index: 99999999 !important;
}

#menu-dialog div:first-child .et-last-child {
  text-align: right !important;
}

.last-of-dialog {
  text-align: right !important;
}

.et_pb_menu__wrap {
  justify-content: flex-start !important;
}

#menu-dialog-first-column {
  /*padding-top: 1vh !important;
  padding-bottom: 1vh !important;*/
  margin-bottom: 0px !important;
}

#menu-menu-right li a {
  z-index: 10 !important;
}

#header-exterior-3,
#menu-dialog #header-interior-3 {
  display: flex;
  align-items: center;
  /* vertically centers the button */
  justify-content: flex-end;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 100%;
  /* ensures equal parent height across states */
}

#header_main_button {
  align-self: center !important;
}

/* Laptop */

@media (min-width: 980px) and (max-width: 1210px) {
  #header_main_button,
  #contact-us-header-interior {
    font-size: 0.7em !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Disable Divi fixed-section behavior on the menu overlay */
#menu-dialog.et_pb_section--fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;

  transform: none !important;
  /* STOP DIVI'S SCROLL ENGINE from adjusting position */
  will-change: auto !important;

  z-index: 99999999 !important;
}

#menu-dialog.et_pb_section--with-menu {
  position: fixed !important;
}

#menu-dialog.et_pb_section_sticky {
  position: fixed !important;
}

#menu-dialog {
  transform: none !important;
}
