/* ==========================================================================
   01 — Header / nav (Elementor a000e3f)
   Ground truth: research/components/01-header.tree.txt
   ========================================================================== */

.s-header {
  position: relative;
  width: 100%;
  z-index: 9999;
  background-color: var(--c-white);
  box-shadow: none;
  height: var(--header-h);
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 300;
  line-height: 22.5px;
  color: var(--c-text);
  transition: 0.4s ease-in-out, height 0.4s ease-in-out, background-color 0.4s ease-in-out,
    border-bottom-width 0.4s ease-in-out, border-bottom-color 0.4s ease-in-out, margin;
}

/* Sticky state — JS toggles this class at scrollY > 60 -------------------- */
.s-header.is-stuck {
  position: fixed;
  top: 0;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
}

/* ---- Desktop bar --------------------------------------------------------- */

.s-header__bar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
}

.s-header__logo {
  flex: 0 0 18%;
  display: flex;
  align-items: center;
}

.s-header__logo img {
  width: 192px;
  height: 48px;
  display: block;
}

.s-header__nav {
  flex: 0 0 57%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 25px;
}

.s-header__menu {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.s-header__item {
  position: relative;
}

.s-header__link {
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-weight: 600;
  color: var(--c-black);
  white-space: nowrap;
}

.s-header__caret {
  margin-left: 10px;
  flex: 0 0 auto;
}

/* ---- Dropdown panel (Services / About Us) -------------------------------- */

.s-header__dropdown {
  position: absolute;
  top: 58px;
  left: 0;
  z-index: 999;
  background-color: var(--c-green);
  border: 1px solid #dadada;
  box-shadow: rgba(45, 45, 45, 0.2) 0 10px 30px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: transform 0.4s, opacity 0.4s, visibility 0.4s;
}

.s-header__item--dropdown:nth-child(1) .s-header__dropdown {
  width: 323px;
}

.s-header__item--dropdown:nth-child(2) .s-header__dropdown {
  width: 220px;
}

.s-header__dropdown-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-white);
  background-color: var(--c-green);
  transition: 0.3s;
}

.s-header__dropdown-link:hover {
  background-color: var(--c-green-mid);
}

/* Desktop: open on hover. Also respond to JS-driven .is-open (tablet tap). */
@media (min-width: 1025px) {
  .s-header__item--dropdown:hover .s-header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.s-header__item--dropdown.is-open .s-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---- CTA button ------------------------------------------------------ */

.s-header__cta {
  flex: 0 0 25%;
  padding-left: 10px;
  text-align: left;
}

.s-header__btn {
  display: inline-block;
  padding: 0 20px 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 70px;
  color: var(--c-white);
  text-transform: capitalize;
  text-align: center;
  background-color: var(--c-green);
  border-radius: 10px;
  transition: 0.3s ease-out;
}

.s-header__btn:hover {
  background-color: var(--c-green-mid);
}

/* ---- Mobile bar (hidden desktop/tablet) ---------------------------------- */

.s-header__mobile-bar {
  display: none;
}

.s-header__mobile-logo img {
  display: block;
  width: 160px;
  height: 40px;
}

.s-header__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.s-header__burger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--c-black);
  transition: 0.3s;
}

/* ---- Mobile drawer -------------------------------------------------------- */

.s-header__drawer {
  display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet 768-1024 — desktop bar stays visible; dropdowns open on tap via JS
   (.is-open), handled above regardless of breakpoint. */
@media (min-width: 768px) and (max-width: 1024px) {
  .s-header__nav {
    flex: 0 0 55%;
  }
  .s-header__link {
    padding: 0 10px;
    font-size: 14px;
  }
}

/* Mobile <=767 — hide desktop bar, show hamburger bar + drawer -------------- */
@media (max-width: 767px) {
  .s-header {
    height: 72px;
  }

  .s-header__bar {
    display: none;
  }

  .s-header__mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 10px 20px;
  }

  .s-header__drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--c-white);
    box-shadow: rgba(45, 45, 45, 0.2) 0 10px 30px 0;
    padding: 80px 20px 30px;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 9998;
  }

  .s-header__drawer.is-open {
    transform: translateX(0);
  }

  .s-header__drawer-menu {
    display: flex;
    flex-direction: column;
  }

  .s-header__drawer-item {
    border-bottom: 1px solid var(--c-border);
  }

  .s-header__drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-weight: 600;
    font-size: 15px;
    color: var(--c-black);
  }

  .s-header__drawer-dropdown {
    display: none;
    padding-bottom: 10px;
  }

  .s-header__drawer-item--dropdown.is-open .s-header__drawer-dropdown {
    display: block;
  }

  .s-header__drawer-item--dropdown.is-open .s-header__caret {
    transform: rotate(180deg);
  }

  .s-header__drawer-dropdown li a {
    display: block;
    padding: 10px 0 10px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-grey);
  }

  .s-header__drawer-cta {
    margin-top: 20px;
  }

  .s-header__drawer-cta .s-header__btn {
    display: block;
    width: 100%;
  }
}
