/* =============================================================
   COMPONENTS — Elementos reutilizables
   Botones, tarjetas, píldoras, badges, modal.
   ============================================================= */

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .975rem;
  line-height: 1;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(101, 27, 174, .32);
}
.btn--primary:hover { box-shadow: 0 14px 30px rgba(101, 27, 174, .42); }

.btn--ghost {
  background: var(--surface);
  color: var(--brand-purple);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--brand-purple); background: var(--purple-50); }

.btn--light {
  background: #fff;
  color: var(--brand-purple);
}

.btn--whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 211, 102, .3);
}
.btn--whatsapp:hover { box-shadow: 0 14px 30px rgba(37, 211, 102, .4); }

.btn--sm { padding: .6rem 1.05rem; font-size: .875rem; }
.btn--block { width: 100%; }

/* Turquesa (para banners sobre fondo morado) */
.btn--teal {
  background: var(--brand-teal);
  color: #0e3b39;
  box-shadow: 0 8px 20px rgba(56, 217, 211, .28);
}
.btn--teal:hover { background: #25c3bd; box-shadow: 0 12px 26px rgba(56, 217, 211, .38); }

/* Delgado (menos alto) */
.btn--slim { padding: .55rem 1.35rem; font-size: .9rem; }

/* ---------- Píldoras / chips ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .95rem;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  font-weight: 600;
  background: var(--purple-100);
  color: var(--brand-purple);
  border: 1.5px solid transparent;
  transition: all .2s var(--ease);
  cursor: pointer;
}
.pill:hover { border-color: var(--brand-purple); }
.pill.is-active {
  background: var(--grad-brand);
  color: #fff;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge--teal { background: rgba(56, 217, 211, .18); color: var(--brand-teal-700); }
.badge--purple { background: var(--purple-100); color: var(--brand-purple); }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--purple-200);
}

.card__icon {
  width: 3.25rem; height: 3.25rem;
  display: grid; place-items: center;
  font-size: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(101, 27, 174, .1), rgba(56, 217, 211, .16));
  color: var(--brand-purple);
  margin-bottom: 1.1rem;
}
.card__icon svg { width: 1.7rem; height: 1.7rem; }
.card__title { font-size: 1.15rem; margin-bottom: .5rem; }
.card__text { font-size: .96rem; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.modal.is-open { display: flex; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 18, 51, .55);
  backdrop-filter: blur(4px);
  animation: fade .25s var(--ease);
}
.modal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop .28s var(--ease);
}
.modal__close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  font-size: 1.4rem;
  color: var(--purple-900);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.modal__close:hover { background: var(--purple-100); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Animación de entrada al hacer scroll (ver scripts/main.js) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   ÍCONOS SVG (reemplazan emojis) — tamaño/color por contexto
   ========================================================= */
.ic { display: inline-block; vertical-align: middle; flex: 0 0 auto; }

/* Tarjetas de dolencias (home) */
.pain-card__icon .ic { width: 1.55rem; height: 1.55rem; color: var(--brand-purple); }
/* Línea de confianza (home) */
.pain-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.pain-trust .ic { width: 1.15rem; height: 1.15rem; color: var(--brand-purple); }
/* Eyebrows con ícono */
.eyebrow .ic { width: 1rem; height: 1rem; }
/* Fases (escalera de recuperación, fondo oscuro) */
.zona-phase__ico { color: var(--brand-teal); }
.zona-phase__ico .ic { width: 1.9rem; height: 1.9rem; }
/* Áreas / causas (tarjetas con ícono) */
.zona-cause__ico .ic { width: 1.6rem; height: 1.6rem; color: var(--brand-purple); }
/* Bloque de ecografía (Medicina Física) */
.mf-eco__ico .ic { width: 2rem; height: 2rem; color: var(--brand-purple); }

/* =========================================================
   POP-UP DE PROMOCIÓN (banner al cargar)
   ========================================================= */
.promo-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1.25rem; }
.promo-modal[hidden] { display: none; }
.promo-modal__backdrop { position: absolute; inset: 0; background: rgba(20, 10, 40, .62); backdrop-filter: blur(2px); cursor: pointer; }
.promo-modal__box {
  position: relative; z-index: 1;
  width: min(720px, 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: promoIn .35s var(--ease);
}
.promo-modal__link { display: block; }
.promo-modal__link img { display: block; width: 100%; height: auto; }
.promo-modal__close {
  position: absolute; top: .65rem; right: .65rem; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--purple-950);
  border: none; cursor: pointer; padding: 0;
  display: grid; place-items: center;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.promo-modal__close svg { width: 18px; height: 18px; display: block; }
.promo-modal__close:hover { transform: scale(1.08); background: var(--purple-50); }
@keyframes promoIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
body.promo-open { overflow: hidden; }
