/* ========== Public site header: logo + adaptive burger / full-screen menu ========== */

.hs-site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hs-border, #d8ebe2);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.hs-site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}
.hs-site-header.is-nav-open {
  background: #fff;
  box-shadow: none;
  border-bottom-color: transparent;
}

.hs-header-main {
  padding: 0;
  position: relative;
  z-index: 220;
}
.hs-header-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
}

/* Logo */
.hs-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
  color: inherit;
}
.hs-logo-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  line-height: 1.15;
  gap: 0.08rem;
}
.hs-logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hs-logo-tagline {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hs-muted, #5b6f66);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.hs-logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hs-logo-sun {
  background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 45%, #ea580c 100%) !important;
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22), 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* Desktop actions */
.hs-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}
.hs-header-btn-login {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* Burger = bars / X */
.hs-header-burger {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--hs-border, #d8ebe2);
  border-radius: 12px;
  background: #fff;
  color: var(--hs-text, #0f1f17);
  cursor: pointer;
  flex-shrink: 0;
  z-index: 230;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.hs-header-burger:hover {
  border-color: #059669;
  color: #047857;
  background: #ecfdf5;
}
.hs-header-burger:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
}
.hs-header-burger-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.15s, transform 0.15s;
}
.hs-header-burger-icon i {
  font-size: 1.25rem;
  line-height: 1;
}
.hs-header-burger-icon--close {
  opacity: 0;
  transform: scale(0.6) rotate(-40deg);
  pointer-events: none;
}
.hs-site-header.is-nav-open .hs-header-burger-icon--open {
  opacity: 0;
  transform: scale(0.6) rotate(40deg);
  pointer-events: none;
}
.hs-site-header.is-nav-open .hs-header-burger-icon--close {
  opacity: 1;
  transform: scale(1) rotate(0);
  pointer-events: auto;
}
.hs-site-header.is-nav-open .hs-header-burger {
  border-color: #059669;
  background: #ecfdf5;
  color: #047857;
}

/* Backdrop */
.hs-header-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 210;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.hs-header-mobile-backdrop[hidden] {
  display: none !important;
}
.hs-site-header.is-nav-open .hs-header-mobile-backdrop {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}

/* Nav — desktop default */
.hs-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.hs-header-nav-panel {
  display: contents;
}
.hs-header-nav-kicker {
  display: none;
}
.hs-header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.hs-header-nav-link i {
  font-size: 0.82rem;
  color: var(--hs-muted, #5b6f66);
}
.hs-header-nav-link:hover,
.hs-header-nav-link.is-active {
  color: #047857;
  background: #ecfdf5;
  text-decoration: none;
}
.hs-header-nav-link:hover i,
.hs-header-nav-link.is-active i {
  color: #059669;
}
.hs-header-nav-mobile-actions {
  display: none;
}

/* —— Desktop layout: logo | nav | actions —— */
@media (min-width: 961px) {
  .hs-header-main-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 1.25rem;
    padding: 0.75rem 1.5rem;
  }
  .hs-logo {
    flex: 0 0 auto;
    grid-column: 1;
  }
  .hs-header-nav {
    grid-column: 2;
    justify-self: center;
  }
  .hs-header-actions {
    grid-column: 3;
  }
  .hs-header-burger {
    display: none !important;
  }
  .hs-header-mobile-backdrop {
    display: none !important;
  }
  .hs-header-nav {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }
  .hs-header-nav-panel {
    display: contents;
  }
  .hs-header-nav-mobile-actions,
  .hs-header-nav-kicker {
    display: none !important;
  }
  .hs-logo-text {
    display: inline !important;
  }
}

/* —— Mobile / tablet: full-screen menu —— */
@media (max-width: 960px) {
  .hs-header-main-inner {
    display: flex;
    justify-content: space-between;
  }
  .hs-logo {
    max-width: min(58vw, 13.5rem);
  }
  .hs-logo-text {
    display: none !important;
  }
  .hs-logo-tagline {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--hs-text, #0f1f17);
  }
  .hs-header-burger {
    display: inline-flex;
    order: 3;
  }
  .hs-header-actions {
    order: 2;
  }
  .hs-header-actions .hs-header-btn-login {
    display: none;
  }
  .hs-header-actions .hs-btn-primary {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
  .hs-header-actions .hp-lang-btn span:nth-child(2) {
    display: none;
  }

  /* Full-screen drawer */
  .hs-header-nav {
    position: fixed;
    inset: 0;
    z-index: 215;
    width: 100%;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
    background: linear-gradient(165deg, #f0fdf4 0%, #ffffff 38%, #ecfdf5 100%);
    border: none;
    box-shadow: none;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hs-site-header.is-nav-open .hs-header-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .hs-header-nav-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    min-height: 100%;
    min-height: 100dvh;
    padding: max(5.5rem, calc(env(safe-area-inset-top, 0px) + 4.75rem)) 1.5rem max(2rem, env(safe-area-inset-bottom, 0px));
    max-width: 32rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
  }

  .hs-header-nav-kicker {
    display: block;
    margin: 0 0 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #059669;
  }

  .hs-header-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 0.35rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(5, 150, 105, 0.12);
    font-size: clamp(1.45rem, 6.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0f1f17;
    background: transparent;
  }
  .hs-header-nav-link i {
    font-size: 1.15rem;
    width: 1.5rem;
    text-align: center;
    color: #059669;
    flex-shrink: 0;
  }
  .hs-header-nav-link:hover,
  .hs-header-nav-link:focus-visible,
  .hs-header-nav-link.is-active {
    color: #047857;
    background: transparent;
  }
  .hs-header-nav-link span {
    flex: 1;
  }

  .hs-header-nav-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.75rem;
  }
  .hs-header-nav-cta {
    width: 100%;
    justify-content: center;
    min-height: 3.1rem;
    font-size: 1.05rem;
    font-weight: 700;
  }
}

@media (max-width: 520px) {
  .hs-header-main-inner {
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }
  .hs-header-actions .hs-header-btn-register {
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 380px) {
  .hs-logo {
    max-width: min(50vw, 11rem);
  }
  .hs-logo-tagline {
    font-size: 0.8rem;
  }
  .hs-header-actions .hs-header-btn-register-text {
    display: none;
  }
  .hs-header-actions .hs-header-btn-register {
    padding: 0.5rem 0.6rem;
  }
  .hs-header-nav-link {
    font-size: 1.4rem;
    padding: 0.9rem 0.25rem;
  }
}

/* Prevent body scroll when menu open (JS also sets overflow) */
body.hs-nav-open {
  overflow: hidden;
  touch-action: none;
}
