/* Header Layout */
.htl-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.htl-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Branding */
.htl-header__brand {
  display: flex;
  align-items: center;
}

.htl-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.htl-header__logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #ffe066, #ff922b);
  font-size: 1.4rem;
}

.htl-header__logo-text {
  font-family: 'Baloo 2', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: #ff6b6b;
}

/* Navigation */
.htl-header__nav {
  display: flex;
}

.htl-header__nav-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.htl-header__nav-item {}

.htl-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1f2933;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.htl-header__nav-link:focus-visible {
  outline: 3px solid #1fb6ff;
  outline-offset: 2px;
}

.htl-header__nav-link:hover {
  background-color: #e3f8ff;
  color: #127fbf;
}

.htl-header__nav-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06) inset;
}

/* CTA item */
.htl-header__nav-item--cta {
  margin-left: 0.25rem;
}

.htl-header__nav-link--cta {
  background: linear-gradient(135deg, #ffd43b, #ff922b);
  color: #1f2933;
  box-shadow: 0 4px 12px rgba(255, 146, 43, 0.35);
}

.htl-header__nav-link--cta:hover {
  background: linear-gradient(135deg, #ffe066, #ff922b);
  color: #102a43;
}

/* Mobile Toggle */
.htl-header__toggle {
  display: none;
  position: relative;
  border: none;
  background: #fff9db;
  color: #102a43;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.htl-header__toggle:focus-visible {
  outline: 3px solid #1fb6ff;
  outline-offset: 3px;
}

.htl-header__toggle-icon {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #102a43;
}

.htl-header__toggle-icon::before,
.htl-header__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #102a43;
  transition: transform 0.18s ease, top 0.18s ease, opacity 0.18s ease;
}

.htl-header__toggle-icon::before {
  top: -6px;
}

.htl-header__toggle-icon::after {
  top: 6px;
}

.htl-header__toggle[aria-expanded="true"] .htl-header__toggle-icon {
  background-color: transparent;
}

.htl-header__toggle[aria-expanded="true"] .htl-header__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.htl-header__toggle[aria-expanded="true"] .htl-header__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.htl-header__toggle-label {
  line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .htl-header__inner {
    padding-inline: 0.75rem;
  }

  .htl-header__toggle {
    display: inline-flex;
  }

  .htl-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    transform-origin: top center;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.22s ease, opacity 0.18s ease;
  }

  .htl-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0.75rem 0.75rem;
    gap: 0.25rem;
  }

  .htl-header__nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.6rem 0.9rem;
  }

  .htl-header__nav--open {
    max-height: 18rem;
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .htl-header__nav {
    position: static;
    max-height: none !important;
    opacity: 1 !important;
    box-shadow: none;
  }
}

/* High contrast / prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .htl-header *,
  .htl-header *::before,
  .htl-header *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
