/* =============================================================
   Dentlion · navbar.css
   Header fijo + menú de escritorio + drawer móvil + WhatsApp flotante.
   ============================================================= */

/* Compensa la altura del header fijo en todas las páginas */
body { padding-top: var(--nav-h); }

.site-header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--nav-h); z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(16, 58, 99, 0.08);
  transition: box-shadow var(--t);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(10, 30, 60, 0.1); }

.nav {
  height: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

/* ---- Logo ---- */
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  color: var(--navy-800); letter-spacing: -0.02em;
}
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad-teal);
  box-shadow: 0 6px 16px rgba(14, 150, 165, 0.4);
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__name b { color: var(--teal-600); font-weight: 700; }

/* ---- Navegación de escritorio ---- */
.nav__links { display: none; }
.nav__cta   { display: none; }

@media (min-width: 900px) {
  .nav__links { display: flex; align-items: center; gap: 0.25rem; }
  .nav__link {
    position: relative; padding: 0.6rem 0.95rem; border-radius: var(--r-xs);
    font-family: var(--font-head); font-weight: 500; font-size: 0.95rem;
    color: var(--ink-soft);
    transition: color var(--t), background var(--t);
  }
  .nav__link:hover { color: var(--teal-700); background: var(--teal-50); }
  .nav__link[aria-current="page"] { color: var(--teal-700); }
  .nav__link[aria-current="page"]::after {
    content: ""; position: absolute; left: 0.95rem; right: 0.95rem; bottom: 2px;
    height: 2px; border-radius: 2px; background: var(--teal-600);
  }
  .nav__cta { display: inline-flex; }
}

/* ---- Botón hamburguesa ---- */
.nav__toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 11px; background: var(--teal-50); color: var(--teal-700);
}
@media (min-width: 900px) { .nav__toggle { display: none; } }

/* ---- Drawer móvil ---- */
.drawer {
  position: fixed; top: 0; right: 0;
  height: 100dvh; width: min(330px, 88vw);
  background: #fff; box-shadow: var(--sh-lg); z-index: var(--z-drawer);
  padding: calc(var(--nav-h) + 1rem) 1.5rem 1.5rem;
  transform: translateX(105%); transition: transform var(--t-slow);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.drawer.is-open { transform: none; }
.drawer__link {
  padding: 0.95rem 1rem; border-radius: var(--r-sm);
  font-family: var(--font-head); font-weight: 500; font-size: 1.05rem;
  color: var(--navy-800); transition: background var(--t), color var(--t);
}
.drawer__link[aria-current="page"], .drawer__link:hover {
  background: var(--teal-50); color: var(--teal-700);
}
.drawer__cta { margin-top: auto; }
.drawer__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--teal-50); color: var(--teal-700);
  display: grid; place-items: center;
}
.overlay {
  position: fixed; inset: 0; background: rgba(8, 24, 44, 0.5);
  z-index: var(--z-overlay); opacity: 0; pointer-events: none;
  transition: opacity var(--t);
}
.overlay.is-open { opacity: 1; pointer-events: auto; }
@media (min-width: 900px) { .drawer, .overlay { display: none; } }

/* ---- Botón WhatsApp flotante (siempre visible) ---- */
.wa-float {
  position: fixed; right: clamp(1rem, 4vw, 2rem); bottom: clamp(1rem, 4vw, 2rem);
  z-index: var(--z-float);
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--wa-500); color: #fff;
  font-family: var(--font-head); font-weight: 600;
  padding: 0.85rem 1.1rem; border-radius: var(--r-pill);
  box-shadow: var(--sh-cta);
  transition: transform var(--t), background var(--t);
}
.wa-float:hover { background: var(--wa-600); transform: translateY(-2px) scale(1.02); }
.wa-float svg { width: 24px; height: 24px; }
.wa-float__text { display: none; }
@media (min-width: 560px) { .wa-float__text { display: inline; } }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  animation: waPulse 2.4s infinite;
}
@keyframes waPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) { .wa-float::before { animation: none; } }
