/* ==========================================================================
   yamitim.com · Menú y pie compartidos por todas las páginas
   Carga después de base.css. Los destinos de los enlaces están en
   assets/js/enlaces.js (un solo lugar). Mobile first (375 px) → escritorio.
   ========================================================================== */

:root {
  --nav-h: 68px;
  --wa-green: #25D366;
  --wa-green-hover: #1EBE5A;
}

/* Botón pequeño (barra superior) */
.btn--sm {
  min-height: 44px;
  padding: .6rem 1rem;
  font-size: .9375rem;
  letter-spacing: .01em;
}

/* Botón de WhatsApp con su verde oficial (texto oscuro por contraste) */
.btn--wa {
  --btn-bg: var(--wa-green);
  --btn-fg: #0B241D;
  --btn-fill: var(--wa-green-hover);
}
.btn--wa .wa { width: 22px; height: 22px; flex: none; }

/* ---------- Menú ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-scrolled, .nav.is-open {
  background: rgba(244, 243, 239, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
  max-width: calc(var(--maxw) + 8rem);
  margin-inline: auto;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand { display: flex; align-items: center; min-height: 44px; flex: none; }
.nav__logo { width: 52px; height: 52px; mix-blend-mode: multiply; }

/* Botón hamburguesa (solo celular) */
.nav__toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
}
.nav__bars { position: relative; width: 24px; height: 2px; background: currentColor; transition: background-color .2s; }
.nav__bars::before, .nav__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform .35s var(--ease);
}
.nav__bars::before { transform: translateY(-7px); }
.nav__bars::after { transform: translateY(7px); }
.nav.is-open .nav__bars { background: transparent; }
.nav.is-open .nav__bars::before { transform: rotate(45deg); }
.nav.is-open .nav__bars::after { transform: rotate(-45deg); }

/* Lista de enlaces: en el celular es un panel que se despliega */
.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list li { max-width: none; }
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 0 1px no-repeat;
  transition: background-size .4s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { background-size: 100% 1px; }

@media (max-width: 899px) {
  .nav__panel {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    background: var(--paper);
    box-shadow: 0 1px 0 var(--line), 0 30px 40px -30px rgba(16, 47, 39, .4);
    padding: .75rem var(--gutter) 1.75rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s linear .4s;
  }
  .nav.is-open .nav__panel { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav__list { display: grid; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__link { width: 100%; min-height: 56px; font-size: 1.125rem; background: none; }
  /* Extraordinarias: botón al final de la lista */
  .nav__list .nav__cta-item { order: 10; border-bottom: 0; padding-top: 1.25rem; }
  .nav__cta-item .btn { width: 100%; min-height: 56px; font-size: 1rem; }
  /* Sin JS: el menú se muestra abierto, en línea, debajo del logo */
  html:not(.js) .nav { position: absolute; }
  html:not(.js) .nav__toggle { display: none; }
  html:not(.js) .nav__panel { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0; background: none; }
  html:not(.js) .nav__inner { height: auto; flex-wrap: wrap; padding-block: .5rem; }
  html:not(.js) .nav__list { display: flex; flex-wrap: wrap; gap: 0 1rem; }
  html:not(.js) .nav__list li { border: 0; }
  html:not(.js) .nav__link { min-height: 44px; font-size: 1rem; width: auto; }
  html:not(.js) .nav__list .nav__cta-item { padding-top: 0; }
}
@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__list { display: flex; align-items: center; gap: 1.9rem; }
  .nav__cta-item .btn { padding-inline: 1.15rem; }
}
/* Mientras el menú del celular está abierto la página no se desplaza */
html.nav-open, html.nav-open body { overflow: hidden; }

/* Marca visible de contenido pendiente (no se inventa nada) */
.pending {
  display: inline-block;
  padding: .35rem .6rem;
  border: 1px dashed var(--gold-deep);
  border-radius: 4px;
  background: rgba(176, 138, 79, .08);
  color: var(--ink);
  font-size: .9375rem;
  line-height: 1.4;
}
