/* Header-specific styles for magyarscene.com */

.site-header {
  /* base appearance mostly from base.css; here we just refine layout */
}

.navbar__brand {
  text-decoration: none;
}

.navbar__brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ff6b9a 0, transparent 55%),
              radial-gradient(circle at 70% 80%, #6366f1 0, transparent 55%),
              #05050a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), var(--shadow-sm);
}

.navbar__brand-text {
  display: flex;
  flex-direction: column;
}

/* Top-level navbar layout */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.navbar__brand-title {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.navbar__brand-subtitle {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.navbar__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 5, 12, 0.9);
  color: var(--color-text);
}

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

.navbar__menu {
  list-style: none !important;
}

.navbar__item {
  display: flex;
  align-items: center;
}

.navbar__item--cta {
  margin-left: var(--space-2);
}

.navbar__link {
  font-size: 0.9rem;
}

.button.button--small {
  padding: 0.45rem 1.2rem;
  font-size: 0.85rem;
}

/* Mobile layout: full-width menu overlay and right-aligned burger */
@media (max-width: 768px) {
  .navbar__toggle {
    display: inline-flex;
    margin-left: auto; /* ensure toggle sits at the far right */
    z-index: 10010;
  }

  /* Make the navigation a full-viewport overlay when opened. Using position:fixed
     keeps it out of the container max-width so it spans the full device width. */
  .navbar__nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-surface);
    transform: translateY(-100%);
    transition: transform var(--transition-base);
    z-index: 10000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* When JS adds the open class, slide the nav into view */
  .navbar__nav.navbar__menu--open {
    transform: translateY(0);
  }

  .navbar__menu {
    position: static;
    inset-inline: auto;
    top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: calc(var(--space-6) + 2.5rem) var(--layout-gutter);
    align-items: stretch;
    background: transparent;
    border-bottom: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    transition: none;
  }

  .navbar__item {
    padding: 0.5rem 0;
    width: 100%;
  }

  .navbar__link {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
    font-size: 1.05rem;
  }

  .navbar__item--cta {
    width: 100%;
  }

  .navbar__item--cta .button {
    width: 100%;
    justify-content: center;
  }
}

/* When JS marks body as having-open-menu, ensure proper scrolling behaviour if needed */
body.has-open-menu {
  overflow: hidden;
}
