/* ==========================================================================
   Útiles para Ellos RD — Hoja de estilos principal
   Implementa el Design System (docs/DESIGN-SYSTEM.md) sobre Bulma CSS.

   Índice
   1.  Tokens (variables)
   2.  Sobrescritura de Bulma
   3.  Base y tipografía
   4.  Utilidades
   5.  Navbar
   6.  Hero
   7.  Botones
   8.  Cards
   9.  Secciones de contenido
   10. Proceso / timeline
   11. Patrocinadores y paquetes
   12. Formularios
   13. KPIs y transparencia
   14. FAQ
   15. QR
   16. Footer
   17. Toasts y flotantes
   18. Animaciones
   19. Responsive
   20. Accesibilidad e impresión
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
  /* --- Marca --- */
  --upe-primary:        #1668B0;
  --upe-primary-dark:   #0B4F87;
  --upe-primary-light:  #E7F1FA;
  --upe-accent:         #FF7A18;
  --upe-accent-dark:    #E2620A;
  --upe-accent-light:   #FFF1E6;
  --upe-secondary:      #12B3A8;
  --upe-secondary-dark: #0E8F86;

  /* --- Semánticos --- */
  --upe-success: #2FA84F;
  --upe-warning: #FFC53D;
  --upe-danger:  #D42B2B;
  --upe-info:    #3A9BDC;

  /* --- Neutros --- */
  --upe-ink:       #0F1B2A;
  --upe-ink-soft:  #4A5A6A;
  --upe-ink-muted: #8194A6;
  --upe-line:      #E3E9F0;
  --upe-bg:        #F6F8FB;
  --upe-surface:   #FFFFFF;

  /* --- Gradientes --- */
  --upe-grad-hero:     linear-gradient(135deg, #0B4F87 0%, #1668B0 52%, #12B3A8 100%);
  --upe-grad-cta:      linear-gradient(135deg, #FF7A18 0%, #FFA13D 100%);
  --upe-grad-impact:   linear-gradient(120deg, #0F1B2A 0%, #0B4F87 100%);
  --upe-grad-soft:     linear-gradient(180deg, #FFFFFF 0%, #F6F8FB 100%);
  --upe-grad-progress: linear-gradient(90deg, #FF7A18 0%, #FFC53D 100%);

  /* --- Radios --- */
  --upe-radius-sm:   8px;
  --upe-radius:      14px;
  --upe-radius-lg:   24px;
  --upe-radius-full: 999px;

  /* --- Sombras --- */
  --upe-shadow-sm:  0 1px 2px rgba(15,27,42,.06), 0 2px 6px rgba(15,27,42,.05);
  --upe-shadow:     0 4px 12px rgba(15,27,42,.08), 0 12px 28px rgba(15,27,42,.06);
  --upe-shadow-lg:  0 12px 32px rgba(15,27,42,.12), 0 24px 60px rgba(15,27,42,.10);
  --upe-shadow-cta: 0 8px 20px rgba(255,122,24,.35);

  /* --- Espaciado --- */
  --upe-space-1: .5rem;   --upe-space-2: 1rem;    --upe-space-3: 1.5rem;
  --upe-space-4: 2rem;    --upe-space-5: 3rem;    --upe-space-6: 4.5rem;
  --upe-space-7: 7rem;
  --upe-section-y: clamp(3.5rem, 8vw, 7rem);

  /* --- Tipografía --- */
  --upe-font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --upe-font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --upe-font-script:  'Caveat', cursive;

  /* --- Movimiento --- */
  --upe-ease: cubic-bezier(.16, 1, .3, 1);
  --upe-navbar-h: 4rem;
}

/* ==========================================================================
   2. SOBRESCRITURA DE BULMA
   Bulma 1.x expone custom properties --bulma-*; las reasignamos para no
   tener que recompilar Sass.
   ========================================================================== */
:root {
  --bulma-primary:   var(--upe-primary);
  --bulma-link:      var(--upe-secondary);
  --bulma-info:      var(--upe-info);
  --bulma-success:   var(--upe-success);
  --bulma-warning:   var(--upe-warning);
  --bulma-danger:    var(--upe-danger);
  --bulma-text:      var(--upe-ink);
  --bulma-text-strong: var(--upe-ink);
  --bulma-radius:      var(--upe-radius-sm);
  --bulma-radius-large: var(--upe-radius);
  --bulma-family-primary: var(--upe-font-body);
  --bulma-family-secondary: var(--upe-font-display);

  /* Bulma 1.x calcula los tonos con HSL; fijamos los del primario */
  --bulma-primary-h: 207deg;
  --bulma-primary-s: 78%;
  --bulma-primary-l: 39%;
  --bulma-link-h: 176deg;
  --bulma-link-s: 82%;
  --bulma-link-l: 39%;
}

/* --------------------------------------------------------------------------
   Bloqueo del modo oscuro automático de Bulma
   --------------------------------------------------------------------------
   Bulma 1.x invierte todo su esquema de color con
   @media (prefers-color-scheme: dark). Este sitio está diseñado solo en claro:
   sin este bloqueo, los inputs quedan con fondo oscuro y texto oscuro
   (ilegibles) para todo visitante con el modo oscuro del sistema activado.

   La defensa principal es <html data-theme="light"> en header.php.
   Esto es el respaldo, por si ese atributo se pierde en alguna edición.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bulma-scheme-main:      #FFFFFF;
    --bulma-scheme-main-bis:  #FAFBFD;
    --bulma-scheme-main-ter:  var(--upe-bg);
    --bulma-scheme-invert:    var(--upe-ink);
    --bulma-background:       var(--upe-bg);
    --bulma-border:           var(--upe-line);
    --bulma-border-weak:      var(--upe-line);
    --bulma-text:             var(--upe-ink);
    --bulma-text-weak:        var(--upe-ink-soft);
    --bulma-text-strong:      var(--upe-ink);
    --bulma-body-background-color: var(--upe-surface);
    --bulma-body-color:       var(--upe-ink);
  }
}

/* Fondos explícitos en los elementos que Bulma tiñe según el esquema.
   Con esto, aunque falle todo lo anterior, el formulario sigue siendo legible. */
.input,
.textarea,
.select select,
.upe-card,
.upe-form-card,
.upe-nivel,
.upe-patro,
.upe-paquete,
.upe-kpi,
.upe-faq,
.upe-testimonio,
.upe-carta,
.upe-toast,
.upe-impact-card { background-color: var(--upe-surface); }

.table {
  background-color: var(--upe-surface);
  color: var(--upe-ink);
}
.table th { color: var(--upe-ink); }
.table td, .table th { border-color: var(--upe-line); }

/* ==========================================================================
   3. BASE Y TIPOGRAFÍA
   ========================================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--upe-navbar-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--upe-font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--upe-ink);
  background: var(--upe-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.title, .subtitle strong {
  font-family: var(--upe-font-display);
  color: var(--upe-ink);
}

.title { letter-spacing: -.015em; font-weight: 700; }
.title.is-1 { font-size: clamp(2.25rem, 6vw, 4rem);    line-height: 1.06; font-weight: 800; letter-spacing: -.02em; }
.title.is-2 { font-size: clamp(1.85rem, 4.2vw, 2.75rem); line-height: 1.14; }
.title.is-3 { font-size: clamp(1.5rem, 3vw, 2rem);     line-height: 1.2; }
.title.is-4 { font-size: 1.375rem; line-height: 1.25; }
.title.is-5 { font-size: 1.125rem; line-height: 1.35; font-weight: 600; }

.subtitle { font-family: var(--upe-font-body); color: var(--upe-ink-soft); font-weight: 400; }
.subtitle.is-4 { font-size: clamp(1.05rem, 2.4vw, 1.375rem); line-height: 1.55; }

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--upe-primary); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--upe-primary-dark); }

strong { font-weight: 600; color: var(--upe-ink); }

/* Etiqueta pequeña sobre los títulos de sección */
.upe-eyebrow {
  display: inline-block;
  font-family: var(--upe-font-display);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--upe-secondary);
  margin-bottom: .75rem;
  line-height: 1.2;
}
.upe-eyebrow--accent  { color: var(--upe-accent); }
.upe-eyebrow--light   { color: rgba(255,255,255,.82); }

/* Acento manuscrito. Uso muy restringido: máximo 8 palabras. */
.upe-script {
  font-family: var(--upe-font-script);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--upe-accent);
}

/* Ancho de lectura cómodo */
.upe-measure { max-width: 68ch; }
.upe-measure-center { max-width: 68ch; margin-left: auto; margin-right: auto; }

.upe-container-narrow { max-width: 780px; margin: 0 auto; }

/* ==========================================================================
   4. UTILIDADES
   ========================================================================== */
.upe-section     { padding: var(--upe-section-y) 0; position: relative; }
.upe-section--bg { background: var(--upe-bg); }
.upe-section--soft { background: var(--upe-grad-soft); }
.upe-section--dark {
  background: var(--upe-grad-impact);
  color: rgba(255,255,255,.88);
}
.upe-section--dark .title,
.upe-section--dark h2,
.upe-section--dark h3 { color: #fff; }
.upe-section--dark .subtitle { color: rgba(255,255,255,.75); }

.upe-text-accent    { color: var(--upe-accent) !important; }
.upe-text-secondary { color: var(--upe-secondary) !important; }
.upe-text-soft      { color: var(--upe-ink-soft) !important; }
.upe-text-muted     { color: var(--upe-ink-muted) !important; }

/* Resaltado tipo marcador sobre palabras clave del hero.
   Se implementa con background-image (no con un ::after posicionado) para que
   el resaltado pueda partirse en varias líneas: en un móvil de 375px la frase
   no cabe en una sola línea y con white-space:nowrap quedaba cortada.
   box-decoration-break:clone hace que cada línea reciba su propio marcador. */
.upe-highlight {
  background-image: linear-gradient(
    to bottom,
    transparent 58%,
    rgba(255, 122, 24, .34) 58%,
    rgba(255, 122, 24, .34) 94%,
    transparent 94%
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 .1em;
  border-radius: .12em;
}

/* Formas orgánicas decorativas de fondo */
.upe-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .08;
  pointer-events: none;
  z-index: 0;
}
.upe-blob--accent    { background: var(--upe-accent); }
.upe-blob--secondary { background: var(--upe-secondary); }

.upe-relative { position: relative; z-index: 1; }

/* Trampa para bots: invisible pero no display:none (algunos bots lo detectan) */
.upe-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Enlace de salto para lectores de pantalla */
.upe-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--upe-primary);
  color: #fff;
  padding: .85rem 1.5rem;
  border-radius: 0 0 var(--upe-radius-sm) 0;
  font-weight: 600;
}
.upe-skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   5. NAVBAR
   ========================================================================== */
.navbar.upe-navbar {
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: none;
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease;
  min-height: var(--upe-navbar-h);
}
.navbar.upe-navbar.is-scrolled {
  box-shadow: var(--upe-shadow-sm);
  border-bottom-color: var(--upe-line);
}

.upe-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .75rem;
}
.upe-brand__mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--upe-grad-hero);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(22,104,176,.3);
}
.upe-brand__text { line-height: 1.15; }
.upe-brand__name {
  font-family: var(--upe-font-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--upe-ink);
  letter-spacing: -.02em;
  display: block;
}
.upe-brand__tag {
  font-size: .68rem;
  color: var(--upe-ink-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

.upe-navbar .navbar-item {
  font-weight: 500;
  font-size: .95rem;
  color: var(--upe-ink-soft);
  transition: color .18s ease;
}
.upe-navbar .navbar-item:hover,
.upe-navbar .navbar-item.is-active {
  color: var(--upe-primary);
  background: transparent;
}

/* Barra de progreso de la meta, pegada al borde inferior del navbar */
.upe-navbar__progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 4px;
  width: 100%;
  background: var(--upe-line);
  overflow: hidden;
}
.upe-navbar__progress span {
  display: block;
  height: 100%;
  background: var(--upe-grad-progress);
  border-radius: 0 var(--upe-radius-full) var(--upe-radius-full) 0;
  transition: width 1.2s var(--upe-ease);
}

.navbar-burger { color: var(--upe-ink); height: var(--upe-navbar-h); width: var(--upe-navbar-h); }

/* ==========================================================================
   6. HERO
   ========================================================================== */
.upe-hero {
  position: relative;
  padding: calc(var(--upe-navbar-h) + 3rem) 0 4rem;
  background: var(--upe-grad-hero);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.upe-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.upe-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.upe-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(11,79,135,.95) 0%, rgba(22,104,176,.88) 45%, rgba(18,179,168,.72) 100%);
}

.upe-hero .title,
.upe-hero .subtitle { color: #fff; }
.upe-hero .subtitle { color: rgba(255,255,255,.9); }

.upe-hero__title { text-shadow: 0 2px 24px rgba(11,79,135,.35); }

.upe-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  padding: .45rem 1rem;
  border-radius: var(--upe-radius-full);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(6px);
}
.upe-hero__badge .upe-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--upe-warning);
  box-shadow: 0 0 0 0 rgba(255,197,61,.7);
  animation: upe-pulse 2.2s infinite;
}
@keyframes upe-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,197,61,.7); }
  70%  { box-shadow: 0 0 0 12px rgba(255,197,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,197,61,0); }
}

.upe-hero__ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

/* Tarjeta flotante de impacto rápido */
.upe-impact-card {
  background: rgba(255,255,255,.97);
  border-radius: var(--upe-radius-lg);
  padding: 1.9rem;
  box-shadow: var(--upe-shadow-lg);
  color: var(--upe-ink);
}
.upe-impact-card__label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--upe-ink-muted);
}
.upe-impact-card__big {
  font-family: var(--upe-font-display);
  font-size: clamp(2.4rem, 6vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--upe-primary);
  margin: .35rem 0 .1rem;
}
.upe-impact-card__of { font-size: .95rem; color: var(--upe-ink-soft); }

.upe-progress {
  height: 12px;
  background: var(--upe-line);
  border-radius: var(--upe-radius-full);
  overflow: hidden;
  margin: 1.1rem 0 .7rem;
}
.upe-progress__bar {
  height: 100%;
  width: 0;
  background: var(--upe-grad-progress);
  border-radius: var(--upe-radius-full);
  transition: width 1.6s var(--upe-ease);
}

.upe-impact-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--upe-ink-soft);
  font-weight: 500;
}

.upe-impact-card__foot {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--upe-line);
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .87rem;
  color: var(--upe-ink-soft);
}
.upe-impact-card__foot i { color: var(--upe-accent); font-size: 1.1rem; }

/* Barra de confianza bajo el hero */
.upe-trustbar {
  background: var(--upe-surface);
  border-bottom: 1px solid var(--upe-line);
  padding: 1.5rem 0;
}
.upe-trustbar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  text-align: center;
}
.upe-trustbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.upe-trustbar__item i { color: var(--upe-secondary); font-size: 1.35rem; }
.upe-trustbar__item strong {
  font-family: var(--upe-font-display);
  font-size: 1.15rem;
  color: var(--upe-ink);
  line-height: 1.1;
}
.upe-trustbar__item span { font-size: .8rem; color: var(--upe-ink-muted); }

/* ==========================================================================
   7. BOTONES
   ========================================================================== */
.button {
  font-family: var(--upe-font-display);
  font-weight: 600;
  border-radius: var(--upe-radius-full);
  transition: transform .18s ease, box-shadow .18s ease,
              filter .18s ease, background-color .18s ease, color .18s ease;
}
.button.is-large { font-size: 1.05rem; padding: 1.35rem 2rem; height: auto; }
.button .icon:first-child:not(:last-child) { margin-right: .45rem; }

/* CTA principal: el único naranja del sitio */
.button.is-donar {
  background: var(--upe-grad-cta);
  color: #fff;
  border: 0;
  font-weight: 700;
  box-shadow: var(--upe-shadow-cta);
}
.button.is-donar:hover,
.button.is-donar:focus {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 26px rgba(255,122,24,.42);
}
.button.is-donar:active { transform: translateY(0); }
.button.is-donar.is-loading::after { border-color: transparent transparent #fff #fff; }

/* Secundario sobre fondo claro */
.button.is-primary.is-outlined {
  background: transparent;
  border: 2px solid var(--upe-primary);
  color: var(--upe-primary);
}
.button.is-primary.is-outlined:hover {
  background: var(--upe-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* Secundario sobre el hero (fondo oscuro) */
.button.is-hero-ghost {
  background: rgba(255,255,255,.14);
  border: 2px solid rgba(255,255,255,.5);
  color: #fff;
  backdrop-filter: blur(6px);
}
.button.is-hero-ghost:hover,
.button.is-hero-ghost:focus {
  background: #fff;
  border-color: #fff;
  color: var(--upe-primary-dark);
  transform: translateY(-2px);
}

.button.is-whatsapp { background: #25D366; color: #fff; border: 0; font-weight: 700; }
.button.is-whatsapp:hover { background: #1EBE5B; color: #fff; transform: translateY(-2px); }

/* Foco visible obligatorio */
.button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--upe-primary);
  outline-offset: 3px;
}

/* ==========================================================================
   8. CARDS
   ========================================================================== */
.upe-card {
  background: var(--upe-surface);
  border: 1px solid var(--upe-line);
  border-radius: var(--upe-radius-lg);
  box-shadow: var(--upe-shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .25s var(--upe-ease), box-shadow .25s var(--upe-ease);
}
.upe-card:hover { transform: translateY(-6px); box-shadow: var(--upe-shadow-lg); }
.upe-card__body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }

.upe-icon-box {
  width: 54px; height: 54px;
  border-radius: var(--upe-radius);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}
.upe-icon-box--accent    { background: var(--upe-accent-light);  color: var(--upe-accent-dark); }
.upe-icon-box--primary   { background: var(--upe-primary-light); color: var(--upe-primary); }
.upe-icon-box--secondary { background: #E4F7F5;                  color: var(--upe-secondary-dark); }
.upe-icon-box--success   { background: #E6F6EB;                  color: var(--upe-success); }
.upe-icon-box--danger    { background: #FBE9E9;                  color: var(--upe-danger); }

/* --- Cards del problema --- */
.upe-problema__cifra {
  font-family: var(--upe-font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--upe-accent);
}
.upe-problema__titulo {
  font-family: var(--upe-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--upe-ink);
  margin: .35rem 0 .7rem;
}

/* --- Cards de nivel de donación --- */
.upe-nivel {
  position: relative;
  background: var(--upe-surface);
  border: 2px solid var(--upe-line);
  border-radius: var(--upe-radius-lg);
  padding: 1.75rem 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
  transition: transform .25s var(--upe-ease), box-shadow .25s var(--upe-ease),
              border-color .2s ease;
}
.upe-nivel:hover { transform: translateY(-6px); box-shadow: var(--upe-shadow); border-color: var(--upe-accent); }
.upe-nivel.is-selected {
  border-color: var(--upe-accent);
  background: var(--upe-accent-light);
  box-shadow: var(--upe-shadow);
}
.upe-nivel.is-destacado { border-color: var(--upe-accent); box-shadow: var(--upe-shadow); }

.upe-nivel__badge {
  position: absolute;
  top: -.8rem; left: 50%;
  transform: translateX(-50%);
  background: var(--upe-grad-cta);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: var(--upe-radius-full);
  white-space: nowrap;
  box-shadow: var(--upe-shadow-cta);
}
.upe-nivel__icon { font-size: 1.8rem; color: var(--upe-accent); margin-bottom: .8rem; }
.upe-nivel__monto {
  font-family: var(--upe-font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--upe-ink);
}
.upe-nivel__titulo {
  font-family: var(--upe-font-display);
  font-weight: 700;
  color: var(--upe-primary);
  margin: .5rem 0 .3rem;
}
.upe-nivel__equiv { font-size: .92rem; color: var(--upe-ink-soft); font-weight: 500; }
.upe-nivel__detalle {
  font-size: .82rem;
  color: var(--upe-ink-muted);
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 1px solid var(--upe-line);
  line-height: 1.5;
}

/* ==========================================================================
   9. SECCIONES DE CONTENIDO
   ========================================================================== */
.upe-section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.upe-section-head .title { margin-bottom: .9rem; }
.upe-section-head .subtitle { font-size: 1.12rem; }

.upe-photo {
  border-radius: var(--upe-radius-lg);
  overflow: hidden;
  box-shadow: var(--upe-shadow);
  position: relative;
}
.upe-photo img { display: block; width: 100%; height: auto; }
.upe-photo--caption::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15,27,42,.72) 100%);
  pointer-events: none;
}
.upe-photo__caption {
  position: absolute;
  left: 1.5rem; right: 1.5rem; bottom: 1.4rem;
  color: #fff;
  font-size: .92rem;
  line-height: 1.45;
  z-index: 1;
  text-shadow: 0 1px 8px rgba(15,27,42,.5);
}

/* Cita de maestra/directora */
.upe-testimonio {
  background: var(--upe-surface);
  border: 1px solid var(--upe-line);
  border-radius: var(--upe-radius-lg);
  padding: 2rem 1.75rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--upe-shadow-sm);
  position: relative;
}
.upe-testimonio::before {
  content: '\201C';
  position: absolute;
  top: .2rem; left: 1.3rem;
  font-family: Georgia, serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--upe-accent);
  opacity: .22;
}
.upe-testimonio__texto {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--upe-ink);
  font-style: italic;
  flex: 1;
  position: relative;
  z-index: 1;
}
.upe-testimonio__autor {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--upe-line);
}
.upe-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--upe-font-display);
  font-weight: 700;
  font-size: .92rem;
  flex-shrink: 0;
}
.upe-testimonio__nombre { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.upe-testimonio__cargo  { font-size: .8rem; color: var(--upe-ink-muted); line-height: 1.4; }

/* ==========================================================================
   10. PROCESO / TIMELINE
   ========================================================================== */
.upe-proceso { position: relative; }
.upe-proceso__linea {
  position: absolute;
  top: 34px; left: 12%; right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--upe-line) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.upe-paso { text-align: center; position: relative; z-index: 1; }
.upe-paso__circulo {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin: 0 auto 1.2rem;
  background: var(--upe-surface);
  border: 3px solid var(--upe-line);
  position: relative;
  transition: transform .3s var(--upe-ease), border-color .3s ease;
}
.upe-paso:hover .upe-paso__circulo { transform: scale(1.08); }
.upe-paso__circulo--accent    { border-color: var(--upe-accent);    color: var(--upe-accent); }
.upe-paso__circulo--secondary { border-color: var(--upe-secondary); color: var(--upe-secondary); }
.upe-paso__circulo--primary   { border-color: var(--upe-primary);   color: var(--upe-primary); }
.upe-paso__circulo--success   { border-color: var(--upe-success);   color: var(--upe-success); }

.upe-paso__num {
  position: absolute;
  top: -6px; right: -6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--upe-ink);
  color: #fff;
  font-family: var(--upe-font-display);
  font-size: .78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.upe-paso__titulo {
  font-family: var(--upe-font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .5rem;
}
.upe-paso__texto { font-size: .93rem; color: var(--upe-ink-soft); line-height: 1.6; }

/* ==========================================================================
   11. PATROCINADORES Y PAQUETES
   ========================================================================== */
.upe-patro {
  background: var(--upe-surface);
  border: 1px solid var(--upe-line);
  border-radius: var(--upe-radius-lg);
  padding: 1.6rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--upe-shadow-sm);
  transition: transform .25s var(--upe-ease), box-shadow .25s var(--upe-ease);
}
.upe-patro:hover { transform: translateY(-5px); box-shadow: var(--upe-shadow); }

.upe-patro__head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.upe-patro__logo {
  width: 52px; height: 52px;
  border-radius: var(--upe-radius);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--upe-font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.upe-patro__nombre { font-family: var(--upe-font-display); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.upe-patro__sector { font-size: .78rem; color: var(--upe-ink-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.upe-tag-encaje {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .7rem;
  border-radius: var(--upe-radius-full);
  margin-bottom: .8rem;
}
.upe-tag-encaje--muy-alto { background: #E6F6EB; color: #1E7A38; }
.upe-tag-encaje--alto     { background: var(--upe-primary-light); color: var(--upe-primary-dark); }
.upe-tag-encaje--medio-alto { background: #FFF6E0; color: #A8770A; }
.upe-tag-encaje--medio    { background: var(--upe-bg); color: var(--upe-ink-soft); }

.upe-patro__porque { font-size: .9rem; color: var(--upe-ink-soft); line-height: 1.6; flex: 1; }
.upe-patro__gancho {
  margin-top: 1rem;
  padding: .85rem 1rem;
  background: var(--upe-accent-light);
  border-left: 3px solid var(--upe-accent);
  border-radius: 0 var(--upe-radius-sm) var(--upe-radius-sm) 0;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--upe-ink);
}
.upe-patro__gancho strong { color: var(--upe-accent-dark); }

/* --- Paquetes --- */
.upe-paquete {
  background: var(--upe-surface);
  border: 2px solid var(--upe-line);
  border-radius: var(--upe-radius-lg);
  padding: 1.9rem 1.6rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .25s var(--upe-ease), box-shadow .25s var(--upe-ease);
}
.upe-paquete:hover { transform: translateY(-6px); box-shadow: var(--upe-shadow); }
.upe-paquete.is-destacado {
  border-color: var(--upe-accent);
  box-shadow: var(--upe-shadow);
}
.upe-paquete__nivel {
  font-family: var(--upe-font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.upe-paquete__monto {
  font-family: var(--upe-font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--upe-ink);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: .5rem 0 .15rem;
}
.upe-paquete__mochilas { font-size: .88rem; color: var(--upe-ink-soft); font-weight: 500; }
.upe-paquete__lista {
  list-style: none;
  margin: 1.3rem 0 1.5rem;
  padding: 1.3rem 0 0;
  border-top: 1px solid var(--upe-line);
  flex: 1;
}
.upe-paquete__lista li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: .7rem;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--upe-ink-soft);
}
.upe-paquete__lista li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0; top: .1rem;
  color: var(--upe-success);
  font-size: .8rem;
}

/* --- Carta modelo --- */
.upe-carta {
  background: var(--upe-surface);
  border: 1px solid var(--upe-line);
  border-radius: var(--upe-radius-lg);
  overflow: hidden;
  box-shadow: var(--upe-shadow);
}
.upe-carta__head {
  background: var(--upe-bg);
  border-bottom: 1px solid var(--upe-line);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.upe-carta__asunto { font-size: .9rem; color: var(--upe-ink-soft); }
.upe-carta__asunto strong { display: block; color: var(--upe-ink); font-size: .95rem; }
.upe-carta__cuerpo {
  padding: 1.75rem;
  max-height: 460px;
  overflow-y: auto;
  font-family: var(--upe-font-body);
  font-size: .92rem;
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--upe-ink-soft);
  background:
    linear-gradient(var(--upe-surface) 30%, rgba(255,255,255,0)),
    linear-gradient(rgba(255,255,255,0), var(--upe-surface) 70%) 0 100%,
    radial-gradient(farthest-side at 50% 0, rgba(15,27,42,.08), transparent),
    radial-gradient(farthest-side at 50% 100%, rgba(15,27,42,.08), transparent) 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 32px, 100% 32px, 100% 12px, 100% 12px;
  background-attachment: local, local, scroll, scroll;
}
.upe-carta__cuerpo mark {
  background: var(--upe-accent-light);
  color: var(--upe-accent-dark);
  padding: .05em .35em;
  border-radius: 4px;
  font-weight: 600;
}

/* ==========================================================================
   12. FORMULARIOS
   ========================================================================== */
.upe-form-card {
  background: var(--upe-surface);
  border-radius: var(--upe-radius-lg);
  box-shadow: var(--upe-shadow-lg);
  padding: clamp(1.6rem, 4vw, 2.75rem);
  border: 1px solid var(--upe-line);
}

.field:not(:last-child) { margin-bottom: 1.35rem; }

.label {
  font-family: var(--upe-font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--upe-ink);
  margin-bottom: .45rem;
}
.label .required { color: var(--upe-danger); }

.input, .textarea, .select select {
  font-family: var(--upe-font-body);
  border-radius: var(--upe-radius-sm);
  border: 1.5px solid var(--upe-line);
  box-shadow: none;
  color: var(--upe-ink);
  font-size: 16px; /* Evita el zoom automático de iOS */
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--upe-ink-muted); }

.input:hover, .textarea:hover, .select select:hover { border-color: #C9D6E3; }

.input:focus, .textarea:focus, .select select:focus,
.input.is-focused, .textarea.is-focused {
  border-color: var(--upe-primary);
  box-shadow: 0 0 0 3px rgba(22,104,176,.18);
}

.input.is-danger, .textarea.is-danger, .select select.is-danger {
  border-color: var(--upe-danger);
}
.input.is-danger:focus, .textarea.is-danger:focus {
  box-shadow: 0 0 0 3px rgba(212,43,43,.16);
}
.input.is-success, .textarea.is-success, .select select.is-success {
  border-color: var(--upe-success);
}

.help.is-danger {
  color: var(--upe-danger);
  font-size: .82rem;
  font-weight: 500;
  margin-top: .35rem;
  display: flex;
  align-items: flex-start;
  gap: .35rem;
}
.help.is-danger::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  flex-shrink: 0;
}

.control.has-icons-left .icon { color: var(--upe-ink-muted); z-index: 4; }
.control.has-icons-left .input:focus ~ .icon { color: var(--upe-primary); }

/* Grupo de montos rápidos */
.upe-montos { display: flex; flex-wrap: wrap; gap: .55rem; }
.upe-monto-chip {
  flex: 1 1 auto;
  min-width: 84px;
  padding: .65rem .5rem;
  text-align: center;
  border: 1.5px solid var(--upe-line);
  border-radius: var(--upe-radius-sm);
  background: var(--upe-surface);
  font-family: var(--upe-font-display);
  font-weight: 600;
  font-size: .92rem;
  color: var(--upe-ink-soft);
  cursor: pointer;
  transition: all .18s ease;
}
.upe-monto-chip:hover { border-color: var(--upe-accent); color: var(--upe-accent-dark); }
.upe-monto-chip.is-active {
  background: var(--upe-accent);
  border-color: var(--upe-accent);
  color: #fff;
  box-shadow: var(--upe-shadow-cta);
}

/* Equivalencia dinámica bajo el monto */
.upe-equivalencia {
  margin-top: .7rem;
  padding: .75rem 1rem;
  background: var(--upe-accent-light);
  border-radius: var(--upe-radius-sm);
  font-size: .88rem;
  color: var(--upe-accent-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.upe-equivalencia i { font-size: 1.1rem; }

/* Nota de privacidad bajo el botón de envío */
.upe-form-nota {
  font-size: .8rem;
  color: var(--upe-ink-muted);
  text-align: center;
  margin-top: .9rem;
  line-height: 1.5;
}

/* Mensaje de resultado del formulario */
.upe-form-resultado { margin-top: 1.25rem; }
.upe-form-resultado .notification { border-radius: var(--upe-radius); font-size: .93rem; }

/* ==========================================================================
   13. KPIs Y TRANSPARENCIA
   ========================================================================== */
.upe-stat { text-align: center; padding: 1rem .5rem; }
.upe-stat__number {
  font-family: var(--upe-font-display);
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--upe-accent);
}
.upe-stat__label {
  font-size: .92rem;
  color: rgba(255,255,255,.78);
  margin-top: .5rem;
  font-weight: 500;
}
.upe-section:not(.upe-section--dark) .upe-stat__label { color: var(--upe-ink-soft); }

.upe-kpi {
  background: var(--upe-surface);
  border: 1px solid var(--upe-line);
  border-radius: var(--upe-radius);
  padding: 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.upe-kpi__head { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.upe-kpi__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--upe-primary-light);
  color: var(--upe-primary);
  font-size: .95rem;
  flex-shrink: 0;
}
.upe-kpi__nombre { font-size: .87rem; font-weight: 600; color: var(--upe-ink-soft); line-height: 1.3; }
.upe-kpi__valor {
  font-family: var(--upe-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--upe-ink);
  line-height: 1.1;
}
.upe-kpi__meta { font-size: .78rem; color: var(--upe-ink-muted); margin-top: .2rem; }
.upe-kpi__barra {
  height: 6px;
  background: var(--upe-line);
  border-radius: var(--upe-radius-full);
  overflow: hidden;
  margin-top: .9rem;
}
.upe-kpi__barra span { display: block; height: 100%; border-radius: var(--upe-radius-full); width: 0; transition: width 1.2s var(--upe-ease); }
.upe-kpi--superado  .upe-kpi__barra span { background: var(--upe-success); }
.upe-kpi--en-curso  .upe-kpi__barra span { background: var(--upe-accent); }
.upe-kpi--atencion  .upe-kpi__barra span { background: var(--upe-warning); }
.upe-kpi--superado  .upe-kpi__icon { background: #E6F6EB; color: var(--upe-success); }
.upe-kpi--atencion  .upe-kpi__icon { background: #FFF6E0; color: #A8770A; }

/* Barra de desglose del peso donado */
.upe-desglose { margin: 2rem 0 1.5rem; }
.upe-desglose__barra {
  display: flex;
  height: 42px;
  border-radius: var(--upe-radius-sm);
  overflow: hidden;
  box-shadow: var(--upe-shadow-sm);
}
.upe-desglose__seg {
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--upe-font-display);
  font-weight: 700;
  font-size: .82rem;
  transition: filter .18s ease;
  min-width: 0;
}
.upe-desglose__seg:hover { filter: brightness(1.1); }
.upe-desglose__leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 1.1rem;
  justify-content: center;
}
.upe-desglose__item { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--upe-ink-soft); }
.upe-desglose__punto { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }

/* Listas de aprendizajes */
.upe-aprendizaje { list-style: none; margin: 0; padding: 0; }
.upe-aprendizaje li {
  position: relative;
  padding: 0 0 0 2.1rem;
  margin-bottom: 1.15rem;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--upe-ink-soft);
}
.upe-aprendizaje li::before {
  position: absolute;
  left: 0; top: .15rem;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .7rem;
}
.upe-aprendizaje--ok li::before   { content: '\f00c'; background: #E6F6EB; color: var(--upe-success); }
.upe-aprendizaje--mejorar li::before { content: '\f0e7'; background: #FFF6E0; color: #A8770A; }

/* ==========================================================================
   14. FAQ
   ========================================================================== */
.upe-faq { border: 1px solid var(--upe-line); border-radius: var(--upe-radius); overflow: hidden; background: var(--upe-surface); }
.upe-faq + .upe-faq { margin-top: .75rem; }
.upe-faq__q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 1.15rem 3.25rem 1.15rem 1.4rem;
  font-family: var(--upe-font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--upe-ink);
  cursor: pointer;
  position: relative;
  line-height: 1.45;
  transition: background-color .18s ease;
}
.upe-faq__q:hover { background: var(--upe-bg); }
.upe-faq__q::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 1.4rem; top: 50%;
  transform: translateY(-50%);
  font-size: .78rem;
  color: var(--upe-primary);
  transition: transform .25s var(--upe-ease);
}
.upe-faq.is-open .upe-faq__q::after { transform: translateY(-50%) rotate(180deg); }
.upe-faq__a { display: none; padding: 0 1.4rem 1.4rem; font-size: .95rem; line-height: 1.7; color: var(--upe-ink-soft); }

/* ==========================================================================
   15. QR
   ========================================================================== */
.upe-qr-box {
  background: var(--upe-surface);
  border-radius: var(--upe-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--upe-shadow-lg);
  display: inline-block;
  text-align: center;
}
.upe-qr-box img { display: block; width: 100%; max-width: 240px; height: auto; border-radius: var(--upe-radius-sm); }
.upe-qr-box__code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--upe-ink);
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--upe-line);
}

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
.upe-footer { background: var(--upe-ink); color: rgba(255,255,255,.72); padding: 4rem 0 0; }
.upe-footer a { color: rgba(255,255,255,.72); }
.upe-footer a:hover { color: var(--upe-accent); }
.upe-footer__titulo {
  font-family: var(--upe-font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.1rem;
}
.upe-footer__lista { list-style: none; margin: 0; padding: 0; }
.upe-footer__lista li { margin-bottom: .6rem; font-size: .92rem; }
.upe-footer__brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.upe-footer__brand .upe-brand__name { color: #fff; }
.upe-footer__desc { font-size: .92rem; line-height: 1.65; max-width: 34ch; }
.upe-footer__redes { display: flex; gap: .6rem; margin-top: 1.3rem; }
.upe-footer__redes a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  display: grid; place-items: center;
  color: #fff;
  font-size: 1rem;
  transition: background-color .18s ease, transform .18s ease;
}
.upe-footer__redes a:hover { background: var(--upe-accent); transform: translateY(-3px); color: #fff; }
.upe-footer__legal {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}
.upe-footer__qr {
  background: #fff;
  padding: .6rem;
  border-radius: var(--upe-radius-sm);
  display: inline-block;
  line-height: 0;
}
.upe-footer__qr img { width: 104px; height: 104px; display: block; }

/* ==========================================================================
   17. TOASTS Y FLOTANTES
   ========================================================================== */
.upe-toast-zona {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-width: min(380px, calc(100vw - 2.5rem));
  pointer-events: none;
}
.upe-toast {
  background: var(--upe-surface);
  border-left: 4px solid var(--upe-success);
  border-radius: var(--upe-radius-sm);
  box-shadow: var(--upe-shadow-lg);
  padding: .95rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .92rem;
  line-height: 1.5;
  pointer-events: auto;
}
.upe-toast--error { border-left-color: var(--upe-danger); }
.upe-toast--info  { border-left-color: var(--upe-primary); }
.upe-toast i { font-size: 1.1rem; flex-shrink: 0; margin-top: .12rem; }
.upe-toast--exito i { color: var(--upe-success); }
.upe-toast--error i { color: var(--upe-danger); }
.upe-toast--info  i { color: var(--upe-primary); }

/* Botón flotante de WhatsApp */
.upe-wa-flotante {
  position: fixed;
  bottom: 1.25rem; left: 1.25rem;
  z-index: 55;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(37,211,102,.42);
  transition: transform .2s var(--upe-ease);
}
.upe-wa-flotante:hover { transform: scale(1.08); color: #fff; }

/* ==========================================================================
   18. ANIMACIONES
   ========================================================================== */
.upe-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--upe-ease), transform .6s var(--upe-ease);
  will-change: opacity, transform;
}
.upe-reveal.is-visible { opacity: 1; transform: none; }

/* Retrasos escalonados para grillas */
.upe-reveal[data-delay="1"] { transition-delay: .08s; }
.upe-reveal[data-delay="2"] { transition-delay: .16s; }
.upe-reveal[data-delay="3"] { transition-delay: .24s; }
.upe-reveal[data-delay="4"] { transition-delay: .32s; }

/* ==========================================================================
   19. RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 1023px) {
  /* Bulma deja el .container a todo el ancho por debajo de 1024px, sin
     márgenes laterales: el texto queda pegado al borde de la pantalla.
     Le devolvemos aire. */
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }

  .upe-proceso__linea { display: none; }

  /* El menú móvil ocupa la pantalla y los enlaces se agrandan */
  .upe-navbar .navbar-menu.is-active {
    box-shadow: var(--upe-shadow-lg);
    padding: 1rem 0 1.5rem;
    max-height: calc(100vh - var(--upe-navbar-h));
    overflow-y: auto;
  }
  .upe-navbar .navbar-menu.is-active .navbar-item {
    font-size: 1.15rem;
    padding: .85rem 1.25rem;
    font-weight: 600;
  }
}

@media screen and (max-width: 768px) {
  body { font-size: 16px; }

  .upe-hero { padding: calc(var(--upe-navbar-h) + 2rem) 0 3rem; text-align: center; }
  .upe-hero__ctas { flex-direction: column; }
  .upe-hero__ctas .button { width: 100%; justify-content: center; }
  .upe-hero__badge { margin-left: auto; margin-right: auto; }

  .upe-impact-card { margin-top: 2.25rem; }

  .upe-section-head { margin-bottom: 2.5rem; }

  .upe-desglose__seg { font-size: .7rem; }
  .upe-desglose__barra { height: 36px; }

  .upe-carta__cuerpo { font-size: .85rem; padding: 1.25rem; max-height: 340px; }

  .upe-wa-flotante { width: 50px; height: 50px; font-size: 1.4rem; bottom: 1rem; left: 1rem; }
  .upe-toast-zona { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; }

  .upe-testimonio { padding: 1.75rem 1.35rem 1.35rem; }
}

/* Los segmentos muy estrechos del desglose ocultan su texto */
@media screen and (max-width: 560px) {
  .upe-desglose__seg[data-pct="2"],
  .upe-desglose__seg[data-pct="4"] { font-size: 0; }
}

/* ==========================================================================
   20. ACCESIBILIDAD E IMPRESIÓN
   ========================================================================== */

/* Respeta la preferencia del sistema de reducir el movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .upe-reveal { opacity: 1; transform: none; }
}

/* Modo de alto contraste */
@media (prefers-contrast: more) {
  :root { --upe-ink-soft: #2C3A47; --upe-ink-muted: #55677A; --upe-line: #B9C6D3; }
  .upe-card, .upe-patro, .upe-kpi, .upe-nivel { border-width: 2px; }
}

@media print {
  .upe-navbar, .upe-wa-flotante, .upe-toast-zona,
  .upe-hero__media, .button { display: none !important; }
  .upe-hero { background: none; color: #000; padding-top: 1rem; }
  .upe-hero .title, .upe-hero .subtitle { color: #000; }
  body { font-size: 11pt; }
  .upe-section { padding: 1.5rem 0; page-break-inside: avoid; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #555; }
}
