@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700&display=swap');

:root {
  --thsf-font: "Urbanist", sans-serif;
  /* Figma spec: 180deg, white 100% to white 0% */
  --thsf-bg-gradient: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.5) 30%,
      rgba(0, 0, 0, 0.25) 60%,
      rgba(0, 0, 0, 0.0) 100%
    );


  --thsf-bg-image: none;
  --thsf-bg: var(--thsf-bg-gradient);
  --thsf-text: #ffffff;
  --thsf-muted: rgba(255, 255, 255, 0.7);
  --thsf-accent: #8c8c8c;
  --thsf-border: #d9d9d9;
}

.thsf-header {
  --thsf-header-height: 118px;
  font-family: var(--thsf-font);
  color: var(--thsf-text);
  background: var(--thsf-bg-gradient);
  padding: 0;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
  z-index: 6;
}

.thsf-header--with-image {
  background: var(--thsf-bg-gradient), var(--thsf-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.thsf-header--overlap {
  margin-bottom: 0;
  padding-bottom: 0;
}
.thsf-header--overlap::after {
  display: none;
}

/* No forced pull-up on following blocks to avoid overlapping popups */

.thsf-header__top {
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
}

.thsf-header__row {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
}

.thsf-header__row1 {
  justify-content: space-between;
  gap: 24px;
  height: 118px;
  position: relative;
}

.thsf-header__row2 {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  width: 100%;
}

.thsf-header__logo-link {
  display: inline-flex;
  align-items: center;
  position: absolute;
  top: 35px;
  left: 50px;
  z-index: 10;
}

.thsf-header__logo-img {
  max-height: 59px;
  width: auto;
}

.thsf-header__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  width: 410px;
  background: rgba(131, 131, 131, 0.3);
  border-radius: 24px;
  padding: 0 16px 0 16px;
  border: 0;
  position: absolute;
  right: 330px; /* CTA width (241) + gap (39) + CTA right offset (50) */
  top: 42px;
  z-index: 10;
}

.thsf-header__search-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.thsf-header__search-icon:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 50%;
}

.thsf-header__search-icon img {
  display: block;
  width: 16px;
  height: 16px;
}

.thsf-header__search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--thsf-text);
  font-size: 16px;
  font-family: var(--thsf-font);
  outline: none;
  line-height: 1;
  font-weight: 400;
}

.thsf-header__search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.thsf-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #7b7b7b;
  color: #fff;
  text-decoration: none;
  border-radius: 22.5px;
  padding: 0;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: 241px;
  height: 45px;
  justify-content: center;
  position: absolute;
  top: 42px;
  right: 50px;
  z-index: 10;
}

.thsf-header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.thsf-header__cta-icon {
  display: inline-flex;
  width: 13.18px;
  height: 14px;
  align-items: center;
  justify-content: center;
}

.thsf-header__cta-icon img {
  display: block;
  width: 13.18px;
  height: 14px;
}

.thsf-header__cta-label {
  font-family: var(--thsf-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 19px;
  color: #ffffff;
}

.thsf-header__nav {
  display: flex;
  width: auto;
  height: 19px;
  align-items: center;
  justify-content: center;
  z-index: 6;
  padding-bottom: 35px;
  margin: 0 auto;
  overflow: visible;
}

.thsf-header__menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
  gap: 56px;
  text-align: center;
  flex-wrap: nowrap;
}

.thsf-header__menu-link {
  display: inline-block;
  width: auto;
  padding: 0;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0;
  transition: color 0.15s ease;
  position: relative;
  line-height: 19px;
}

.thsf-header__menu-link:hover,
.thsf-header__menu-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.thsf-header__menu-item {
  position: relative;
}

.thsf-header__caret {
  font-size: 12px;
  margin-left: 6px;
  opacity: 0.8;
  display: none;
}

.thsf-header__submenu {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 6px); /* drop the bubble to avoid overlapping trigger text */
  margin-top: 0;
  min-width: 220px;
  background: #ffffff;
  color: #000;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: 10px 12px;
  list-style: none;
  margin: 0;
  z-index: 20;
  text-align: left;
  position: absolute;
}

.thsf-header__submenu::before {
  content: "";
  position: absolute;
  top: -8px; /* keep arrow connected after lowering submenu */
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
  z-index: 21;
}

.thsf-header__menu-item.has-children:hover > .thsf-header__submenu,
.thsf-header__menu-item.has-children:focus-within > .thsf-header__submenu {
  display: block;
}

.thsf-header__submenu-item {
  margin: 0;
}

.thsf-header__submenu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #000 !important;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.12s ease, color 0.12s ease;
}

.thsf-header__submenu-link:hover,
.thsf-header__submenu-link:focus-visible {
  background: #f2f2f2;
  color: #000;
}

/* Ensure all submenu text stays black */
.thsf-header__submenu,
.thsf-header__submenu * {
  color: #000 !important;
}

/* Reset block wrapper spacing when shortcode is used */
.thsf-header-shell {
  margin: 0;
  padding: 0;
}
.wp-block-shortcode:has(.thsf-header) {
  margin: 0 !important;
  padding: 0 !important;
}
.wp-block-group:has(.thsf-header) {
  margin: 0 !important;
  padding: 0 !important;
}

.thsf-header__submenu .thsf-header__submenu {
  position: relative;
  left: auto;
  transform: none;
  top: auto;
  margin-top: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 22;
}

.thsf-header__submenu .thsf-header__menu-item {
  position: relative;
}

/* ============================================
   MOBILE NAVIGATION STYLES
   ============================================ */

/* Hamburger Button - Hidden on desktop, transparent background with white lines */
.thsf-header__hamburger {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 32px;
  background: transparent;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  position: absolute;
  left: 15px;
  top: 40px;
  z-index: 100;
  transition: all 0.2s ease;
  border-radius: 4px;
}

/* Hide any br tags that WordPress might inject */
.thsf-header__hamburger br {
  display: none;
}

.thsf-header__hamburger:hover {
  transform: scale(1.05);
}

.thsf-header__hamburger:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 4px;
}

.thsf-header__hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 1px;
  transition: none; /* Disable animation to prevent interpolation */
  margin: 0;
  position: relative;
}

.thsf-header__hamburger-line:not(:last-child) {
  margin-bottom: 5px;
}

/* No animation on hamburger - keep it static */

/* Mobile Overlay - Full screen dark background (HIDDEN ON DESKTOP) */
.thsf-header__mobile-overlay {
  display: none; /* Critical: completely hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none; /* Don't block clicks when hidden */
}

.thsf-header__mobile-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Allow clicks when visible */
}

/* Mobile Drawer - Slides in from left */
.thsf-header__mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 380px;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
}

.thsf-header__mobile-drawer.is-active {
  transform: translateX(0);
}

/* Mobile Drawer Header */
.thsf-header__mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px;
  border-bottom: 1px solid #e5e5e5;
  background: #f8f8f8;
  position: sticky;
  top: 0;
  z-index: 10;
}

.thsf-header__mobile-title {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  font-family: var(--thsf-font);
}

.thsf-header__mobile-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #000;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity 0.2s ease;
  font-weight: 300;
}

.thsf-header__mobile-close:hover {
  opacity: 0.7;
}

.thsf-header__mobile-close:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile Navigation Menu */
.thsf-header__nav--mobile {
  display: block;
  padding: 0;
  height: auto;
}

.thsf-header__mobile-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.thsf-header__mobile-menu-item {
  border-bottom: 1px solid #f0f0f0;
}

.thsf-header__mobile-menu-link-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.thsf-header__mobile-menu-link {
  display: block;
  padding: 16px 20px;
  color: #000;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--thsf-font);
  transition: background 0.2s ease;
  flex: 1;
}

.thsf-header__mobile-menu-item.has-children .thsf-header__mobile-menu-link {
  padding-right: 0;
}

.thsf-header__mobile-menu-link:hover,
.thsf-header__mobile-menu-link:focus-visible {
  background: #f8f8f8;
}

/* Mobile Submenu Toggle Button */
.thsf-header__mobile-submenu-toggle {
  background: none;
  border: none;
  padding: 16px 20px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  min-width: 56px;
}

.thsf-header__mobile-submenu-toggle:hover {
  background: #f0f0f0;
}

.thsf-header__mobile-submenu-toggle:focus-visible {
  outline: 2px solid #000;
  outline-offset: -2px;
}

.thsf-header__mobile-caret {
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.3s ease;
  display: inline-block;
}

.thsf-header__mobile-menu-item.is-open > .thsf-header__mobile-menu-link-wrapper .thsf-header__mobile-caret {
  transform: rotate(90deg);
}

/* Mobile Submenu */
.thsf-header__mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  background: #f8f8f8;
  transition: max-height 0.3s ease;
}

.thsf-header__mobile-menu-item.is-open > .thsf-header__mobile-submenu {
  max-height: 1000px; /* Large enough to accommodate content */
}

.thsf-header__mobile-submenu .thsf-header__mobile-menu-item {
  border-bottom: 1px solid #e8e8e8;
}

.thsf-header__mobile-submenu .thsf-header__mobile-menu-item:last-child {
  border-bottom: none;
}

.thsf-header__mobile-submenu .thsf-header__mobile-menu-link {
  padding-left: 40px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.thsf-header__mobile-submenu .thsf-header__mobile-submenu .thsf-header__mobile-menu-link {
  padding-left: 60px;
  font-size: 14px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Medium Desktop - Adjust spacing for tighter fit */
@media (max-width: 1200px) {
  .thsf-header__menu {
    gap: 40px;
  }
  
  .thsf-header__search {
    width: 340px;
    right: 300px;
  }
}

/* Small Desktop / Large Tablet - Further reduce spacing */
@media (max-width: 1024px) {
  .thsf-header__menu {
    gap: 24px;
  }
  
  .thsf-header__menu-link {
    font-size: 14px;
  }
  
  .thsf-header__search {
    width: 260px;
    right: 260px;
  }
  
  .thsf-header__cta {
    width: 190px;
    font-size: 14px;
  }
  
  .thsf-header__cta-label {
    font-size: 14px;
  }
  
  .thsf-header__logo-link {
    left: 25px;
  }
  
  .thsf-header__nav {
    padding-bottom: 25px;
  }
  
  .thsf-header__row1 {
    height: 100px;
  }
  
  .thsf-header__logo-link {
    top: 30px;
  }
  
  .thsf-header__search {
    top: 38px;
  }
  
  .thsf-header__cta {
    top: 38px;
  }
}

/* Tablet - Make search icon-only to prevent overlap */
@media (max-width: 840px) {
  .thsf-header__search {
    width: 45px;
    padding: 0;
    justify-content: center;
    right: 250px;
  }
  
  .thsf-header__search input {
    display: none;
  }
  
  .thsf-header__search-icon {
    width: 20px;
    height: 20px;
  }
  
  .thsf-header__search-icon img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 960px) {
  /* Show mobile overlay on mobile devices only */
  .thsf-header__mobile-overlay {
    display: block;
  }

  /* Show hamburger button on mobile */
  .thsf-header__hamburger {
    display: flex;
  }

  /* Hide desktop navigation on mobile */
  .thsf-header__nav--desktop {
    display: none !important;
  }

  /* Hide row2 completely on mobile since desktop nav is inside */
  .thsf-header__row2 {
    display: none !important;
  }

  /* Adjust logo position for hamburger */
  .thsf-header__logo-link {
    left: 60px; /* Make room for hamburger */
  }

  .thsf-header__top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  /* Hide search on very small screens */
  .thsf-header__search {
    display: none !important;
  }

  .thsf-header__cta {
    right: 20px;
    width: auto;
    padding: 0 16px;
  }

  .thsf-header__cta-label {
    display: none;
  }

  .thsf-header__cta-icon {
    margin: 0;
  }
}

@media (max-width: 480px) {
  .thsf-header {
    padding: 16px 14px;
  }
  
  .thsf-header__logo-link {
    left: 50px !important;
  }

  .thsf-header__hamburger {
    left: 14px !important;
  }

  .thsf-header__row1 {
    height: auto;
    min-height: 80px;
  }
}

