/* Header styles for Top Magyar Helyek */

.tmh-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;

  padding-top: 0;

  backdrop-filter: blur(18px);
  background: rgba(4, 7, 8, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tmh-header__inner {
  display: flex;
  align-items: center;
  min-height: 72px;
}

/* Brand */
.tmh-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.tmh-header__logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.tmh-header__logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--color-accent-gold), var(--color-accent-burgundy), var(--color-primary), var(--color-accent-gold));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.9);
  position: relative;
}

.tmh-header__logo-mark::after {
  content: "TH";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
}

.tmh-header__title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tmh-header__subtitle {
  display: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

@media (min-width: 1123px) {
  .tmh-header__subtitle {
    display: inline-flex;
  }
}

/* Nav */
.tmh-header__nav {
  display: flex;
  align-items: center;
}

.tmh-header__nav-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tmh-header__nav-item {
  list-style: none;
}

.tmh-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  border-radius: 999px;
}

.tmh-header__nav-link::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.9), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-base) var(--transition-bezier-soft);
}

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

.tmh-header__nav-item--primary .tmh-header__nav-link {
  padding-inline: 1.3rem;
}

.tmh-header__cta {
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.7);
  background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.22), transparent 55%),
              rgba(10, 18, 16, 0.98);
  color: var(--color-text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
}

.tmh-header__cta::after {
  display: none;
}

.tmh-header__cta:hover,
.tmh-header__cta:focus-visible {
  background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.28), transparent 55%),
              rgba(18, 36, 32, 0.98);
}

/* Mobile toggle */
.tmh-header__toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 55%),
              rgba(4, 7, 8, 0.95);
  cursor: pointer;
}

.tmh-header__toggle-bar {
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  transition: transform var(--transition-base) var(--transition-bezier-soft),
              opacity var(--transition-fast) ease-out;
}

.tmh-header__toggle-bar + .tmh-header__toggle-bar {
  margin-top: 0.26rem;
}

/* Mobile layout */
@media (max-width: 1123px) {
  .tmh-header__inner {
    gap: 0.75rem;
  }

  .tmh-header__nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.6rem);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--transition-base) ease-out,
                transform var(--transition-base) ease-out,
                visibility var(--transition-base) ease-out;
  }

  .tmh-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    width: 100%;
    gap: 0.25rem;
    border-radius: var(--radius-card);
    background: linear-gradient(145deg, rgba(10, 12, 13, 0.98), rgba(2, 4, 4, 0.98));
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-soft);
  }

  .tmh-header__nav-link {
    width: 100%;
    justify-content: space-between;
    padding-inline: 0.85rem;
  }

  .tmh-header__inner.tmh-header--menu-open .tmh-header__nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .tmh-header__inner.tmh-header--menu-open .tmh-header__toggle-bar:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .tmh-header__inner.tmh-header--menu-open .tmh-header__toggle-bar:last-child {
    transform: translateY(-5px) rotate(-45deg);
  }
}

/* Desktop layout */
@media (min-width: 1123px) {
  .tmh-header__toggle {
    display: none;
  }

  .tmh-header__nav {
    margin-left: auto;
  }
}

/* Focus styles */
.tmh-header__nav-link:focus-visible,
.tmh-header__logo-link:focus-visible,
.tmh-header__toggle:focus-visible {
  box-shadow: var(--shadow-focus);
}
