/* ═══════════════════════════════════════════════════════════
   SITE HEADER — Mujeres Latinas Unidas
   Shared across all pages
   ─────────────────────────────────────────────────────────── */

/* ─── TOKENS ──────────────────────────────────────────────── */
:root {
  --h-white:  #FFFFFF;
  --h-orange: #D9593C;
  --h-gray:   #363636;
  --h-brown:  #803723;
  --h-height: 80px;
  --h-max:    1280px;
}

/* ─── RESET (scoped to header) ────────────────────────────── */
.site-header *,
.site-header *::before,
.site-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── HEADER WRAPPER ──────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--h-white);
  border-bottom: 1px solid rgba(54, 54, 54, 0.08);
}

/* ─── INNER CONTAINER ─────────────────────────────────────── */
.header-container {
  max-width: var(--h-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  height: var(--h-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
}

/* ─── LOGO ────────────────────────────────────────────────── */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.header-logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Fallback text logo if image not found */
.header-logo-fallback {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--h-gray);
  line-height: 1.25;
}
.header-logo-fallback span {
  display: block;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--h-orange);
  margin-top: 3px;
}

/* ─── NAV ─────────────────────────────────────────────────── */
.header-nav {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
}

.nav-link {
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--h-gray);
  text-decoration: none;
  padding-bottom: 4px;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--h-orange);
}

/* Active state — underline indicator */
.nav-link.active {
  color: var(--h-gray);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--h-orange);
  border-radius: 1px;
}

/* ─── ACTIONS (right side) ────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

/* Donate button — rounded pill */
.header-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--h-orange);
  color: var(--h-white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}

.header-donate:hover {
  background: var(--h-brown);
  transform: translateY(-1px);
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--h-gray);
  opacity: 0.45;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s, color 0.2s;
}

.lang-btn:hover {
  opacity: 0.8;
}

.lang-btn.lang-btn--active {
  color: var(--h-orange);
  opacity: 1;
  font-weight: 600;
}

.lang-sep {
  font-size: 0.72rem;
  color: rgba(54, 54, 54, 0.28);
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  pointer-events: none;
}

/* ─── MOBILE HAMBURGER ────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--h-gray);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── PAGE OFFSET (so fixed header doesn't overlap content) ── */
body {
  padding-top: var(--h-height);
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */

/* Tablet: slightly tighter nav gaps */
@media (max-width: 1024px) {
  .nav-list {
    gap: 1.5rem;
  }
  .nav-link {
    font-size: 0.83rem;
  }
}

/* Mobile: collapsed nav */
@media (max-width: 768px) {
  :root {
    --h-height: 68px;
  }

  .header-container {
    grid-template-columns: auto 1fr auto auto;
  }

  /* Hide desktop nav */
  .header-nav {
    display: none;
    position: fixed;
    top: var(--h-height);
    left: 0;
    right: 0;
    background: var(--h-white);
    border-bottom: 1px solid rgba(54, 54, 54, 0.08);
    padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
    box-shadow: 0 8px 32px rgba(54, 54, 54, 0.12);
    z-index: 999;
    /* Slide-down animation */
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .header-nav.is-open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.15rem;
    width: 100%;
  }

  .nav-link {
    font-size: 1rem;
    font-weight: 500;
  }

  .nav-link.active::after {
    bottom: -3px;
  }

  /* Show hamburger */
  .mobile-menu-btn {
    display: flex;
  }

  /* Compact donate on mobile */
  .header-donate {
    padding: 0.5rem 1.1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  :root {
    --h-height: 60px;
  }

  .header-logo-img {
    height: 40px;
  }

  .lang-switcher {
    display: none; /* hide lang switcher on very small screens — accessible via nav */
  }

  .header-actions {
    gap: 0.75rem;
  }
}
