/**
 * SecureClimate global header.
 *
 * Phase 49E scope: static header structure and styling only. Navigation
 * styling and mobile drawer behavior are intentionally not implemented -
 * see template-parts/dynamic-header.php for the corresponding markup
 * notes. No sticky/scroll behavior is implemented.
 *
 * @package HelloElementorChild
 */

.sc-header {
  background-color: var(--sc-color-white);
  border-bottom: 4px solid var(--sc-color-horizon-orange);
}

.sc-header__inner {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sc-space-4);
  width: 100%;
  max-width: var(--sc-content-width);
  height: var(--sc-header-height-desktop);
  margin: 0 auto;
  padding: 0 var(--sc-container-padding-desktop);
}

.sc-header__logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.sc-header__logo-link:focus-visible {
  outline: var(--sc-focus-width) solid var(--sc-focus-color);
  outline-offset: var(--sc-focus-offset);
}

.sc-header__logo {
  display: block;
  height: auto;
}

.sc-header__logo--desktop {
  width: 260px;
  max-width: 100%;
}

.sc-header__logo--mobile {
  display: none;
}

.sc-header__slogan {
  display: none;
}

.sc-header__nav {
  flex: 1 1 auto;
}

.sc-header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: var(--sc-control-height);
  height: var(--sc-control-height);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sc-header__menu-toggle:focus-visible {
  outline: var(--sc-focus-width) solid var(--sc-focus-color);
  outline-offset: var(--sc-focus-offset);
}

.sc-header__menu-toggle-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--sc-color-deep-ink);
}

.sc-header__menu-toggle-icon::before,
.sc-header__menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background-color: var(--sc-color-deep-ink);
}

.sc-header__menu-toggle-icon::before {
  top: -6px;
}

.sc-header__menu-toggle-icon::after {
  top: 6px;
}

/* Tablet: same structure as desktop, narrower container padding only. */
@media (max-width: 1023px) {
  .sc-header__inner {
    padding: 0 var(--sc-container-padding-tablet);
  }
}

/* Mobile: compact header, mobile logo, slogan as text, menu placeholder. */
@media (max-width: 767px) {
  .sc-header__inner {
    height: var(--sc-header-height-mobile);
    padding: 0 var(--sc-container-padding-mobile);
    flex-wrap: wrap;
  }

  .sc-header__logo--desktop {
    display: none;
  }

  .sc-header__logo--mobile {
    display: block;
    width: 240px;
    max-width: 60vw;
  }

  .sc-header__slogan {
    display: block;
    flex-basis: 100%;
    order: 3;
    margin: 0;
    padding: 0 0 var(--sc-space-2);
    font-family: var(--sc-font-body);
    font-size: var(--sc-text-body-sm-size);
    line-height: var(--sc-text-body-sm-line-height);
    color: var(--sc-color-muted-ink);
  }

  .sc-header__nav {
    display: none;
  }

  .sc-header__menu-toggle {
    display: inline-flex;
  }
}

/* ==========================================================================
   Header search link (plain link to the search page - no JavaScript).
   ========================================================================== */

.sc-header__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sc-space-2);
  flex-shrink: 0;
  min-width: var(--sc-control-height);
  min-height: var(--sc-control-height);
  padding: 0 var(--sc-space-2);
  border-radius: var(--sc-radius-sm);
  font-family: var(--sc-font-body);
  font-weight: var(--sc-font-weight-semibold);
  font-size: var(--sc-text-nav-size);
  color: var(--sc-color-deep-ink);
  text-decoration: none;
}

.sc-header__search:hover {
  color: var(--sc-color-action-green);
}

.sc-header__search:focus-visible {
  outline: var(--sc-focus-width) solid var(--sc-focus-color);
  outline-offset: var(--sc-focus-offset);
}

.sc-header__search-icon {
  width: 20px;
  height: 20px;
}

/* While the drawer is in use (<1280px) the label is visually hidden; the icon keeps a 44px target. */
@media (max-width: 1279px) {
  .sc-header__search {
    margin-left: auto;
  }

  .sc-header__search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* Mobile: the slogan wraps onto its own row, so the header must grow with
   it (a fixed 72px height let the slogan spill over the orange rule). */
@media (max-width: 767px) {
  .sc-header__inner {
    height: auto;
    min-height: var(--sc-header-height-mobile);
    padding-top: var(--sc-space-2);
    row-gap: 0;
  }
}

/* ==========================================================================
   Mobile logo minimum (Launch Kit: horizontal logo without slogan, at least
   220 CSS px; 220-250 recommended). 360-767px: 220-240px, sized so logo +
   search (44) + menu button (44) + 8px gaps fit. Below 360px there is not
   room for all three at 220px, so when a menu exists the search icon moves
   into the drawer (its first row); without a menu there is no menu button
   and the search icon stays.
   ========================================================================== */

@media (max-width: 767px) {
  .sc-header__inner {
    column-gap: var(--sc-space-2);
  }

  .sc-header__logo--mobile {
    width: clamp(220px, calc(100vw - 136px), 240px);
    max-width: none;
  }
}

@media (max-width: 359px) {
  .sc-header--has-menu .sc-header__search {
    display: none;
  }
}
