/* ─── Site Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(24, 25, 25, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--ease-normal), box-shadow var(--ease-normal);
}
.site-header.scrolled {
  background: rgba(24, 25, 25, 0.98);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: 68px;
  position: relative;
}

/* ─── Logo ───────────────────────────────────────────────────── */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--ease-fast);
}
.site-logo:hover { opacity: 0.85; }

.logo-mark {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo-separator {
  width: 1px;
  height: 18px;
  background: var(--color-border);
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

/* ─── Nav ────────────────────────────────────────────────────── */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease-fast), background var(--ease-fast);
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-text-primary);
  background: var(--color-bg-subtle);
}
.nav-link--urgent {
  color: var(--color-urgent);
  font-weight: 600;
}
.nav-link--urgent:hover,
.nav-link--urgent.active {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-urgent);
}

/* Teléfono del menú: solo visible en el menú móvil desplegado */
.nav-list-phone { display: none; }

/* ─── Header actions ─────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  transition: opacity var(--ease-fast);
}
.header-phone:hover { opacity: 0.8; }

.header-phone-icon {
  width: 18px;
  height: 18px;
  color: var(--color-whatsapp);
  flex-shrink: 0;
}
.header-phone-number {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
  transition: color var(--ease-fast);
}
.header-phone:hover .header-phone-number {
  color: var(--color-text-primary);
}

/* ─── Hamburger ──────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--ease-fast);
}
.nav-toggle:hover { background: var(--color-bg-hover); }

.toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform var(--ease-normal),
    opacity   var(--ease-normal),
    width     var(--ease-normal);
}
.nav-toggle.is-open .toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .toggle-bar:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.is-open .toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile nav ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background: rgba(24, 25, 25, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    padding: 0 var(--space-6);
    transition: max-height var(--ease-slow), padding var(--ease-slow);
  }
  .site-nav.is-open {
    max-height: 420px;
    padding: var(--space-4) var(--space-6) var(--space-6);
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
  .nav-link {
    width: 100%;
    padding: var(--space-3) var(--space-2);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }

  /* Teléfono en mobile nav */
  .nav-list-phone {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-2) var(--space-2);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-2);
    color: var(--color-whatsapp);
    font-size: var(--text-sm);
    font-weight: 500;
  }
  .nav-list-phone svg { width: 16px; height: 16px; }
}

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