/* =========================================================
   NÚMEROS FINOS · Trámites y gestiones (carrito)
   Selección múltiple → "Enviar pedido" abre WhatsApp con la lista.
   Reutiliza los tokens de styles.css.
   ========================================================= */

/* encabezado de página */
.page-head { padding: 3.2rem 0 1rem; position: relative; overflow: hidden; background: #fff; }
.page-head .section__sub { margin-top: 1.1rem; }

/* grupo de trámites */
.tram-group { margin-top: 2.8rem; }
.tram-group__label { font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--azul); }
.tram-group__title { font-size: 1.6rem; margin: .3rem 0 0; }
.tram-group__intro { font-family: var(--ff-txt); color: var(--gris); max-width: 62ch; margin: .7rem 0 0; line-height: 1.6; }

/* aclaración chica dentro de una tarjeta (p. ej. DDJJ mensuales vs anuales) */
.tram__hint { font-family: var(--ff-mono); font-size: .72rem; line-height: 1.4; color: var(--gris); margin: -.2rem 0 0; }

/* grilla de tarjetas */
.tram-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.4rem; }
@media (min-width: 560px) { .tram-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .tram-grid { grid-template-columns: repeat(3, 1fr); } }

/* tarjeta de trámite */
.tram {
  display: flex; flex-direction: column; gap: .6rem;
  background: #fff; border: 1px solid var(--gris-claro); border-radius: var(--radius);
  padding: 1.3rem 1.3rem; transition: border-color .18s ease, box-shadow .18s ease;
}
.tram.is-added { border-color: var(--azul); background: var(--gris-claro); box-shadow: 0 0 0 2px rgba(21, 13, 247, .12); }
.tram__icon { width: 34px; height: 34px; color: var(--azul); }
.tram__icon svg { width: 100%; height: 100%; display: block; }
.tram__name { font-family: var(--ff-txt); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.tram__desc { font-family: var(--ff-txt); font-size: .88rem; line-height: 1.5; color: var(--gris); margin: 0; }
.tram__price { font-family: var(--ff-mono); font-size: .82rem; color: var(--gris); margin-top: auto; }
.tram__price b { color: var(--negro); font-family: var(--ff-tit); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }

/* botón agregar/quitar */
.tram__btn {
  margin-top: .5rem; width: 100%; justify-content: center; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--ff-txt); font-weight: 700; font-size: .9rem;
  padding: .6rem 1rem; border-radius: 8px;
  border: 2px solid var(--azul); background: #fff; color: var(--azul);
  transition: background .15s ease, color .15s ease;
}
.tram__btn:hover { background: var(--gris-claro); }
.tram__btn:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.tram.is-added .tram__btn { background: var(--azul); color: #fff; }
.tram.is-added .tram__btn:hover { background: var(--azul-d); }

/* nota de precios */
.tram-note { font-family: var(--ff-mono); font-size: .78rem; color: var(--gris); max-width: 64ch; margin: 2.4rem auto 0; text-align: center; line-height: 1.5; }

/* --- Guías gratis (lead magnets descargables) --- */
.guias-group { margin-top: 3.6rem; padding-top: 2.8rem; border-top: 1px solid var(--gris-claro); }
.guia {
  display: flex; flex-direction: column; gap: .55rem;
  background: rgba(21, 13, 247, .03); border: 1px solid var(--gris-claro);
  border-radius: var(--radius); padding: 1.3rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.guia:hover { border-color: var(--azul); box-shadow: 0 8px 24px rgba(2, 2, 1, .07); transform: translateY(-2px); }
.guia__icon { width: 34px; height: 34px; color: var(--azul); }
.guia__icon svg { width: 100%; height: 100%; display: block; }
.guia__name { font-family: var(--ff-txt); font-weight: 700; font-size: 1rem; line-height: 1.25; margin: 0; }
.guia__desc { font-family: var(--ff-txt); font-size: .88rem; line-height: 1.5; color: var(--gris); margin: 0; }
.guia__btn {
  margin-top: auto; align-self: flex-start; padding: .5rem 0 0;
  font-family: var(--ff-txt); font-weight: 700; font-size: .9rem; color: var(--azul);
  background: none; border: 0; cursor: pointer; border-bottom: 2px solid transparent;
  transition: border-color .15s ease;
}
.guia__btn:hover { border-color: var(--azul); }
.guia__btn:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }

/* etiqueta oculta (accesibilidad) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- Modal de descarga de guía (lead) --- */
.lead-modal {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 1.25rem; background: rgba(2, 2, 1, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.lead-modal[hidden] { display: none; }
.lead-modal__box {
  position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: var(--radius);
  padding: 2rem 1.8rem 1.8rem; box-shadow: 0 30px 80px rgba(2, 2, 1, .4); max-height: 92vh; overflow-y: auto;
}
.lead-modal__close {
  position: absolute; top: .7rem; right: .7rem; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--gris); cursor: pointer; border-radius: 8px;
}
.lead-modal__close:hover { background: var(--gris-claro); color: var(--negro); }
.lead-modal__close svg { width: 20px; height: 20px; }
.lead-modal__title { font-size: 1.5rem; line-height: 1.1; margin: .2rem 0 0; }
.lead-modal__title span { color: var(--azul); }
.lead-modal__text { font-family: var(--ff-txt); font-size: .92rem; color: var(--gris); line-height: 1.55; margin: .7rem 0 0; }
.lead-modal__text a { color: var(--azul); font-weight: 700; text-decoration: underline; }

.lead-form { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.2rem; }
.lead-form__input {
  font-family: var(--ff-txt); font-size: 1rem; color: var(--negro);
  padding: .8rem 1rem; border: 2px solid var(--gris-claro); border-radius: 10px; background: #fff;
  transition: border-color .15s ease;
}
.lead-form__input::placeholder { color: #9a9a9a; }
.lead-form__input:focus { outline: none; border-color: var(--azul); }
.lead-form__check { display: flex; align-items: flex-start; gap: .5rem; font-family: var(--ff-txt); font-size: .85rem; color: var(--gris); line-height: 1.4; cursor: pointer; }
.lead-form__check input { margin-top: .2rem; accent-color: var(--azul); flex: none; }
.lead-form .btn { width: 100%; justify-content: center; margin-top: .2rem; }
.lead-form__msg { font-family: var(--ff-txt); font-size: .88rem; margin: 0; min-height: 1.1em; }
.lead-form__msg.is-ok { color: #0a7a3d; font-weight: 700; }
.lead-form__msg.is-err { color: #c02626; font-weight: 700; }
.lead-form__legal { font-family: var(--ff-mono); font-size: .64rem; line-height: 1.5; color: var(--gris); margin: 0; }

.lead-done { text-align: center; padding: .5rem 0; }
.lead-done__icon { width: 52px; height: 52px; margin: 0 auto 1rem; color: var(--azul); }
.lead-done__icon svg { width: 100%; height: 100%; }
.lead-done .btn { width: 100%; justify-content: center; margin-top: 1.2rem; }

/* --- Barra del carrito (fija abajo) --- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--negro); color: #fff;
  box-shadow: 0 -10px 34px rgba(2, 2, 1, .28);
  transform: translateY(110%); transition: transform .25s ease;
}
.cart-bar.show { transform: translateY(0); }
.cart-bar__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.cart-bar__info { font-family: var(--ff-mono); font-size: .86rem; color: rgba(255, 255, 255, .8); }
.cart-bar__count b { color: #fff; }
.cart-bar__total { color: #7f97ff; white-space: nowrap; }
.cart-bar__total b { font-family: var(--ff-tit); font-size: 1.2rem; color: #fff; }
.cart-bar .btn { white-space: nowrap; }
.cart-spacer { height: 84px; }

/* el WhatsApp flotante sube cuando aparece la barra del carrito, para no superponerse */
.cart-bar.show ~ .wa-float { bottom: 92px; }
