/* Header styles for OFFLINE ZABAVA HUB */

.ozh-header {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 20px; /* detached from top */
  z-index: 60;
  width: calc(100% - 48px);
  max-width: 1180px;
  border-radius: 14px; /* soft rounded capsule */
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(17, 24, 39, 0.06);
}

/* Header offset variable: measured at runtime by JS for perfect fit. */
:root {
  --site-header-offset: calc(20px + 64px + 0.75rem);
}

/* Apply the offset padding to main so the fixed header never overlaps content. */
main {
  padding-top: var(--site-header-offset);
}

@media (min-width: 1200px) {
  /* On wide screens the header sits differently; reduce the offset slightly. */
  main {
    padding-top: calc(var(--site-header-offset) - 0.5rem);
  }
}

.ozh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

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

.ozh-header__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.ozh-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #f6e9b6, #c79b2a 45%, #5c4414 80%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.7);
}

.ozh-header__logo-text {
  display: flex;
  flex-direction: column;
}

.ozh-header__logo-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ozh-header__logo-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Navigation */
.ozh-header__nav {
  display: flex;
  align-items: center;
}

.ozh-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ozh-header__nav-link {
  position: relative;
  color: var(--color-text-muted);
  padding-block: 0.25rem;
  transition: color var(--transition-base), opacity var(--transition-base);
}

.ozh-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.9), transparent);
  transition: width var(--transition-base);
}

.ozh-header__nav-link:hover::after,
.ozh-header__nav-link:focus-visible::after {
  width: 100%;
}

.ozh-header__nav-link--cta {
  padding-inline: 1rem;
  padding-block: 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.22), transparent 55%);
}

.ozh-header__nav-item--highlight .ozh-header__nav-link--cta:hover,
.ozh-header__nav-item--highlight .ozh-header__nav-link--cta:focus-visible {
  background: linear-gradient(135deg, #c79b2a, #e1c269);
  color: var(--color-text);
}

/* Mobile nav toggle */
.ozh-header__nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, 0.06);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0;
}

.ozh-header__nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--color-text);
  transition: transform var(--transition-base), opacity var(--transition-base), background-color var(--transition-base);
}

/* Hide toggle on larger screens by default */
.ozh-header__nav-toggle {
  display: none;
}

/* Mobile layout */
@media (max-width: 768px) {
  .ozh-header__inner {
    padding-block: var(--space-3);
  }

  .ozh-header__logo-title {
    font-size: 0.9rem;
  }

  .ozh-header__logo-subtitle {
    display: none;
  }

  .ozh-header__nav-toggle {
    display: inline-flex;
  }

  .ozh-header__nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1180px;
    top: calc(20px + 64px); /* sit below floating header */
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: 0 14px 40px rgba(17,24,39,0.06);
    border: 1px solid rgba(17,24,39,0.06);
    transform-origin: top center;
    transform: translate(-50%, -10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
    z-index: 70;
  }

  .ozh-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .ozh-header__nav-link {
    font-size: 0.95rem;
    color: var(--color-text);
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
  }

  .ozh-header--menu-open .ozh-header__nav {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }

  .ozh-header--menu-open .ozh-header__nav-toggle-bar:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }

  .ozh-header--menu-open .ozh-header__nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .ozh-header--menu-open .ozh-header__nav-toggle-bar:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
  }
}

/* Focus styles adjustment */
.ozh-header__nav-link:focus-visible,
.ozh-header__logo:focus-visible,
.ozh-header__nav-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
