/* KitchenLabX Header Styles */

.klx-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fffffffa;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

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

.klx-header__brand {
  display: flex;
  align-items: center;
}

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

.klx-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #b2f46b, #6fd41f);
  box-shadow: 0 6px 16px rgba(111, 212, 31, 0.35);
  position: relative;
}

.klx-header__logo-mark::before,
.klx-header__logo-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.klx-header__logo-mark::before {
  width: 14px;
  height: 4px;
  top: 9px;
  left: 9px;
}

.klx-header__logo-mark::after {
  width: 18px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-top: none;
  bottom: 7px;
  left: 7px;
}

.klx-header__logo-text {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: #111827;
}

.klx-header__nav {
  display: flex;
}

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

.klx-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.klx-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b2f46b, #6fd41f);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease-out;
}

.klx-header__nav-link:hover::after,
.klx-header__nav-link:focus-visible::after {
  transform: scaleX(1);
}

.klx-header__nav-link:focus-visible {
  outline: 2px solid #6fd41f;
  outline-offset: 3px;
  border-radius: 999px;
}

.klx-header__nav-item--cta .klx-header__nav-link--cta {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: #111827;
  color: #f9fafb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.klx-header__nav-item--cta .klx-header__nav-link--cta::after {
  display: none;
}

.klx-header__nav-item--cta .klx-header__nav-link--cta:hover,
.klx-header__nav-item--cta .klx-header__nav-link--cta:focus-visible {
  background: #020617;
}

.klx-header__toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #ffffff;
  padding: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.klx-header__toggle:focus-visible {
  outline: 2px solid #6fd41f;
  outline-offset: 3px;
}

.klx-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
  transition: transform 0.18s ease-out, opacity 0.18s ease-out, translate 0.18s ease-out;
}

.klx-header__toggle-bar + .klx-header__toggle-bar {
  margin-top: 4px;
}

.klx-header__toggle.is-active .klx-header__toggle-bar:nth-child(1) {
  translate: 0 3px;
  transform: rotate(45deg);
}

.klx-header__toggle.is-active .klx-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.klx-header__toggle.is-active .klx-header__toggle-bar:nth-child(3) {
  translate: 0 -3px;
  transform: rotate(-45deg);
}

/* Mobile styles */
@media (max-width: 768px) {
  .klx-header__inner {
    padding: 0.6rem 1rem;
  }

  .klx-header__toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .klx-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transform-origin: top;
    transform: scaleY(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease-out, transform 0.16s ease-out;
  }

  .klx-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem 1rem;
    gap: 0.4rem;
  }

  .klx-header__nav-link {
    padding: 0.5rem 0.25rem;
    width: 100%;
    justify-content: flex-start;
  }

  .klx-header__nav-item--cta .klx-header__nav-link--cta {
    width: 100%;
    justify-content: center;
    margin-top: 0.3rem;
  }

  .klx-header__nav--open {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
  }
}

@media (min-width: 769px) {
  .klx-header__nav {
    position: static;
  }
}
