/* Header-specific styles for Wash Point Magyar */

.header-shell {
  min-height: 64px;
}

.header-brand {
  display: inline-flex;
  align-items: center;
}

.header-brand__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
}

.header-brand__logo-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #e3efff, #1e6fdc 70%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.header-brand__bubble {
  position: absolute;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.9);
}

.header-brand__bubble--primary {
  width: 15px;
  height: 15px;
  bottom: 5px;
  right: 6px;
}

.header-brand__bubble--accent {
  width: 9px;
  height: 9px;
  top: 6px;
  left: 8px;
  opacity: 0.7;
}

.header-brand__text {
  display: flex;
  flex-direction: column;
}

.header-brand__name {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--gray-900);
}

.header-brand__tagline {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Navigation */

.header-nav {
  margin-left: auto;
}

.header-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header-nav__item {
  position: relative;
}

.header-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: background-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.header-nav__link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e6fdc, #2c8df5);
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: center;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.header-nav__link:hover {
  color: var(--color-primary-strong);
  background-color: rgba(30, 111, 220, 0.06);
}

.header-nav__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.header-nav__link--cta {
  padding-inline: 1.1rem;
  background: linear-gradient(135deg, #1e6fdc, #2c8df5);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.header-nav__link--cta::after {
  display: none;
}

.header-nav__link--cta:hover {
  background: linear-gradient(135deg, #1653a3, #1e6fdc);
  transform: translateY(-1px);
}

.header-nav__item--highlight .header-nav__link {
  font-weight: 600;
}

/* Active state helper class (to be set server-side) */
.header-nav__link.is-active {
  color: var(--color-primary-strong);
  background-color: rgba(30, 111, 220, 0.09);
}

.header-nav__link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Mobile menu toggle */

.header-toggle {
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  color: var(--gray-700);
}

.header-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.header-toggle__bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--gray-700);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.header-toggle__label {
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Mobile layout */

@media (max-width: 768px) {
  .site-header__inner {
    align-items: center;
  }

  .header-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(245, 247, 251, 0.99);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-md);
    transform-origin: top;
  }

  .header-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-8) var(--space-8) var(--space-10);
    gap: var(--space-4);
  }

  .header-nav__link,
  .header-nav__link--cta {
    width: 100%;
    justify-content: space-between;
  }

  .header-nav__link::after {
    display: none;
  }

  .header-toggle {
    display: inline-flex;
  }

  /* By default (no JS) keep nav visible for accessibility */
  .header-nav {
    position: static;
    box-shadow: none;
    border-bottom: none;
  }

  .header-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 0;
    gap: var(--space-3);
  }

  /* When JS enhances, it will add .js-nav-initialized to body
     and then we treat nav as collapsed by default */
  body.js-nav-initialized .header-nav {
    position: absolute;
  }

  body.js-nav-initialized .header-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-8) var(--space-8) var(--space-10);
    gap: var(--space-4);
  }

  body.js-nav-initialized .header-nav {
    display: none;
  }

  body.js-nav-open .header-nav {
    display: block;
  }

  body.js-nav-open .header-toggle__bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  body.js-nav-open .header-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  body.js-nav-open .header-toggle__bar:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }
}

@media (max-width: 480px) {
  .header-brand__tagline {
    display: none;
  }
}
