/* MatheComics — estilos globales + Hero
   Paleta y tipografía según brandbook: uploads/mathecomics-brandbook.md */

:root {
  --red: #E31E24;
  --navy: #0B1F3B;
  --yellow: #FFD400;
  --sky: #29ABE2;
  --white: #FFFFFF;
  --black: #111111;

  /* Acentos solo para íconos de categoría (pills de programa) */
  --green: #16A34A;
  --purple: #7C3AED;
  --orange: #F97316;
  --whatsapp: #25D366;

  --font-display: 'Anton', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* ---------- Animación: respeto a prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transition: opacity 1.3s ease, transform 1.3s ease;
}

.reveal--up    { transform: translateY(28px); }
.reveal--left  { transform: translateX(-36px); }
.reveal--right { transform: translateX(36px); }

.reveal.is-visible { opacity: 1; transform: var(--reveal-rest, none); }

.reveal-group > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group > .reveal:nth-child(2) { transition-delay: .16s; }
.reveal-group > .reveal:nth-child(3) { transition-delay: .32s; }
.reveal-group > .reveal:nth-child(4) { transition-delay: .48s; }
.reveal-group > .reveal:nth-child(5) { transition-delay: .64s; }
.reveal-group > .reveal:nth-child(6) { transition-delay: .8s; }

/* Los textos e hijos directos de cada bloque .reveal también entran con su propio
   fade + stagger, encima del deslizamiento del contenedor. */
.reveal > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.is-visible > * { opacity: 1; transform: none; }

.reveal > *:nth-child(1) { transition-delay: .1s; }
.reveal > *:nth-child(2) { transition-delay: .2s; }
.reveal > *:nth-child(3) { transition-delay: .3s; }
.reveal > *:nth-child(4) { transition-delay: .4s; }
.reveal > *:nth-child(5) { transition-delay: .5s; }
.reveal > *:nth-child(6) { transition-delay: .6s; }
.reveal > *:nth-child(7) { transition-delay: .7s; }
.reveal > *:nth-child(8) { transition-delay: .8s; }
.reveal > *:nth-child(9) { transition-delay: .9s; }
.reveal > *:nth-child(n+10) { transition-delay: 1s; }

/* ---------- CTA de WhatsApp: ícono con pulso + acentos animados ---------- */

.cta-wa {
  position: relative;
  display: flex !important;
  width: fit-content !important;
  margin-left: auto !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px !important;
  padding: 14px 20px !important;
  border-width: 3px !important;
  border-radius: 14px !important;
  box-shadow: 4px 4px 0 var(--navy) !important;
}

@media (min-width: 480px) {
  .cta-wa {
    gap: 14px;
    font-size: 17px !important;
    padding: 18px 30px !important;
    box-shadow: 5px 5px 0 var(--navy) !important;
  }
}

/* Orden visual: texto, luego flecha, luego ícono. */
.cta-wa__label { order: 1; }
.cta-wa__arrow { order: 2; }
.cta-wa__icon  { order: 3; }

.cta-wa__icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--whatsapp);
  border: 2px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cta-wa__icon svg { width: 20px; height: 20px; }

.cta-wa__icon::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--whatsapp);
  animation: wa-ping 3.6s cubic-bezier(0, 0, .2, 1) infinite;
}

@keyframes wa-ping {
  0%   { transform: scale(.85); opacity: .8; }
  75%, 100% { transform: scale(1.7); opacity: 0; }
}

.cta-wa__arrow {
  font-weight: 900;
  font-size: 1.2em;
  transition: transform .15s ease;
}

.cta-wa:hover .cta-wa__arrow { transform: translateX(4px); }

.cta-wa::before, .cta-wa::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--red);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: cta-spark 5.2s ease-in-out infinite;
  pointer-events: none;
}

.cta-wa::before { top: -14px; left: -14px; }
.cta-wa::after   { bottom: -14px; right: -14px; animation-delay: .5s; }

@keyframes cta-spark {
  0%, 100% { transform: scale(.75) rotate(0deg); opacity: .85; }
  50%      { transform: scale(1.1) rotate(15deg); opacity: 1; }
}

.svc--yellow .cta-wa::before, .svc--yellow .cta-wa::after { background: var(--yellow); }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background: #EDEDED;
  font-family: var(--font-body);
  color: var(--navy);
}

a { color: var(--navy); }
a:hover { color: var(--red); }

img { max-width: 100%; display: block; }

.btn {
  display: inline-block;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--navy);
  background: var(--yellow);
  color: var(--navy);
}

/* ---------- Nav del sitio ---------- */

.sitenav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--navy);
  padding: 10px 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.sitenav::-webkit-scrollbar { display: none; }

.sitenav__link {
  flex-shrink: 0;
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  opacity: .85;
}

.sitenav__link:hover { color: var(--white); opacity: 1; background: rgba(255, 255, 255, .12); }

.sitenav__link--current {
  opacity: 1;
  background: rgba(255, 255, 255, .16);
}

.sitenav__link--cta {
  background: var(--yellow);
  color: var(--navy);
  opacity: 1;
  font-weight: 800;
}

.sitenav__link--cta:hover { background: var(--yellow); color: var(--navy); opacity: .9; }

@media (min-width: 860px) {
  .sitenav {
    justify-content: center;
    padding: 12px 24px;
    gap: 10px;
  }

  .sitenav__link { font-size: 14px; padding: 8px 16px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--red);
  font-family: var(--font-body);
}

.hero__media {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 31, 59, .15) 0%, rgba(227, 30, 36, .35) 70%, var(--red) 100%);
}

.hero__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 2;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__brand-logo {
  height: 42px;
  width: auto;
  flex-shrink: 0;
}

.hero__topbar .btn {
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 7px;
  box-shadow: none;
}

.hero__content-outer {
  position: relative;
}

.hero__content {
  position: relative;
  background: var(--red);
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1.4px, transparent 1.4px);
  background-size: 12px 12px;
  padding: 26px 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.hero__pill {
  align-self: center;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 7px 16px;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(11, 31, 59, .5);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  color: var(--white);
  font-size: 38px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    -2px -2px 0 var(--navy),
     2px -2px 0 var(--navy),
    -2px  2px 0 var(--navy),
     2px  2px 0 var(--navy),
     4px  4px 0 rgba(0, 0, 0, .3);
}

.hero__subtitle {
  margin: 0;
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.hero__cta-primary {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 3px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
  text-align: center;
}

.hero__cta-secondary {
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 31, 59, .55);
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  padding: 9px 10px;
}

.hero__badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero__badge-icon svg { width: 13px; height: 13px; }

.hero__badge-label {
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
}

/* ---------- Desktop ---------- */

@media (min-width: 860px) {
  .hero {
    height: 820px;
  }

  .hero__media {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .hero__scrim {
    background: linear-gradient(100deg,
      rgba(11, 31, 59, .88) 0%,
      rgba(227, 30, 36, .82) 32%,
      rgba(227, 30, 36, .45) 58%,
      rgba(227, 30, 36, .15) 78%,
      rgba(227, 30, 36, 0) 100%);
  }

  .hero__topbar {
    height: 76px;
    padding: 0 40px;
  }

  .hero__brand-logo { height: 58px; }

  .hero__topbar .btn {
    font-size: 14px;
    padding: 11px 22px;
    border-radius: 8px;
    box-shadow: 3px 3px 0 rgba(11, 31, 59, .6);
  }

  .hero__content-outer {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 0 0 40px;
  }

  .hero__content {
    width: 640px;
    max-width: min(640px, 88vw);
    background: none;
    background-image: none;
    padding: 0;
    align-items: flex-start;
    text-align: left;
    gap: 22px;
  }

  .hero__pill { align-self: flex-start; }

  .hero__title {
    font-size: 76px;
    line-height: .98;
    letter-spacing: .01em;
    text-shadow:
      -3px -3px 0 var(--navy),
       3px -3px 0 var(--navy),
      -3px  3px 0 var(--navy),
       3px  3px 0 var(--navy),
       7px  7px 0 rgba(0, 0, 0, .3);
  }

  .hero__subtitle {
    font-size: 22px;
    max-width: 560px;
  }

  .hero__ctas {
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 24px;
    margin-top: 6px;
  }

  .hero__cta-primary {
    width: auto;
    font-size: 19px;
    padding: 18px 34px;
    box-shadow: 5px 5px 0 var(--navy);
  }

  .hero__cta-secondary { font-size: 16px; }

  .hero__badges {
    display: flex;
    grid-template-columns: none;
    gap: 14px;
    width: auto;
    margin-top: 18px;
  }

  .hero__badge { padding: 10px 14px; }

  .hero__badge-icon { width: 30px; height: 30px; }
  .hero__badge-icon svg { width: 15px; height: 15px; }

  .hero__badge-label { font-size: 13px; }
}

/* ---------- Metodología ---------- */

.method {
  padding: 56px 24px;
  background: var(--white);
  text-align: center;
}

.method__intro {
  max-width: 640px;
  margin: 0 auto 36px;
}

.method__pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 7px 16px;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(11, 31, 59, .35);
}

.method__heading {
  font-family: var(--font-display);
  color: var(--navy);
  text-transform: uppercase;
  font-size: 30px;
  line-height: 1.1;
  margin: 16px 0 12px;
}

.method__arrow { color: var(--red); }

.method__subtitle {
  font-size: 15px;
  font-weight: 600;
  color: #3a3a3a;
  line-height: 1.4;
  margin: 0;
}

.method__steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.method__step {
  position: relative;
  background: #EDEDED;
  border: 3px solid var(--navy);
  border-radius: 16px;
  padding: 28px 20px 24px;
  text-align: left;
}

.method__photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center 18%;
  border: 3px solid var(--navy);
  border-radius: 10px;
  margin-bottom: 16px;
}

.method__step:nth-child(1) .method__photo { object-position: 38% 30%; }
.method__step:nth-child(2) .method__photo { object-position: 55% 20%; }
.method__step:nth-child(3) .method__photo { object-position: 42% 28%; }

.method__number {
  position: absolute;
  top: -18px;
  left: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--navy);
}

.method__step-title {
  font-family: var(--font-display);
  color: var(--navy);
  text-transform: uppercase;
  font-size: 20px;
  margin: 4px 0 8px;
}

.method__step-copy {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.45;
  margin: 0;
}

.method__cta-wrap {
  max-width: 420px;
  margin: 40px auto 0;
}

.method__cta {
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 12px;
  border: 3px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
}

/* ---------- Programas / Servicios ---------- */

.services {
  padding: 56px 24px;
  background: #EDEDED;
  text-align: center;
}

.services__intro {
  max-width: 640px;
  margin: 0 auto 36px;
}

.services__pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 7px 16px;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(11, 31, 59, .35);
}

.services__heading {
  font-family: var(--font-display);
  color: var(--navy);
  text-transform: uppercase;
  font-size: 30px;
  line-height: 1.1;
  margin: 16px 0 12px;
}

.services__subtitle {
  font-size: 15px;
  font-weight: 600;
  color: #3a3a3a;
  line-height: 1.4;
  margin: 0;
}

.services__guide {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: #EDEDED;
  border: 1.5px dashed var(--navy);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0 0;
  line-height: 1.5;
  text-align: center;
}

.services__guide strong { display: block; margin-bottom: 6px; }

.services__guide ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.services__guide strong { color: var(--red); }

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.services__card {
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: left;
  box-shadow: 6px 6px 0 var(--red);
  display: flex;
  flex-direction: column;
}

/* Cada tarjeta usa el mismo color que su sección en servicios.html */
.services__card--red {
  background: var(--red);
  border-color: var(--white);
  box-shadow: 6px 6px 0 var(--navy);
}
.services__card--red .services__card-title,
.services__card--red .services__card-copy { color: var(--white); }

.services__card--navy {
  background: var(--navy);
  border-color: var(--white);
  box-shadow: 6px 6px 0 var(--sky);
}
.services__card--navy .services__card-title,
.services__card--navy .services__card-copy { color: var(--white); }

.services__card--sky {
  background: var(--sky);
  box-shadow: 6px 6px 0 var(--navy);
}

.services__card--yellow {
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--red);
}

.services__card-pill {
  display: inline-block;
  align-self: flex-start;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--navy);
  margin-bottom: 14px;
}

.services__card-title {
  font-family: var(--font-display);
  color: var(--navy);
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1.1;
  margin: 0 0 10px;
}

.services__card-copy {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.45;
  margin: 0 0 16px;
}

.services__cta {
  align-self: flex-start;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 2.5px solid var(--navy);
  box-shadow: 3px 3px 0 var(--navy);
  margin-top: auto;
}

@media (min-width: 640px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }

  /* La 5ª tarjeta queda sola en su fila: se centra a lo ancho de las 2 columnas. */
  .services__card:nth-child(5) {
    grid-column: 1 / -1;
    max-width: calc(50% - 12px);
    margin: 0 auto;
  }
}

@media (min-width: 860px) {
  .services__heading { font-size: 44px; }
  .services__subtitle { font-size: 17px; }

  /* Grid de 6 columnas virtuales: cada tarjeta normal ocupa 2, así las 2
     tarjetas de la segunda fila se pueden centrar entre las de arriba. */
  .services__grid { grid-template-columns: repeat(6, 1fr); }
  .services__card { grid-column: span 2; }
  .services__card:nth-child(4) { grid-column: 2 / 4; }
  .services__card:nth-child(5) { grid-column: 4 / 6; max-width: none; margin: 0; }
}

/* ---------- Programa Start Smart ---------- */

.program {
  background: var(--navy);
  padding: 56px 24px;
}

.program__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  max-width: 1040px;
  margin: 0 auto;
}

.program__card {
  max-width: 560px;
  width: 100%;
  background: var(--red);
  border: 4px solid var(--white);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .25);
}

.program__flyer {
  margin: 0;
  max-width: 360px;
  width: 100%;
  transform: rotate(-2deg);
}

.program__flyer.reveal--right {
  --reveal-rest: rotate(-2deg);
  transform: translateX(36px) rotate(-2deg);
}

.program__flyer img {
  width: 100%;
  border: 4px solid var(--white);
  border-radius: 14px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .35);
}

.program__flyer-caption {
  margin-top: 14px;
  text-align: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  opacity: .85;
}

.program__flyer-caption a {
  color: var(--yellow);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.program__pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 7px 16px;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(11, 31, 59, .5);
  margin-bottom: 16px;
}

.program__title {
  font-family: var(--font-display);
  color: var(--white);
  text-transform: uppercase;
  font-size: 30px;
  line-height: 1.05;
  margin: 0 0 10px;
  text-shadow: -2px -2px 0 var(--navy), 2px -2px 0 var(--navy), -2px 2px 0 var(--navy), 2px 2px 0 var(--navy);
}

.program__subtitle {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 24px;
}

.program__features {
  list-style: none;
  padding: 0;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  max-width: 380px;
}

.program__features li {
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.program__features li::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--yellow);
  border-radius: 50%;
  border: 2px solid var(--navy);
}

.program__price {
  background: rgba(11, 31, 59, .3);
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 auto 24px;
  max-width: 380px;
  text-align: left;
}

.program__price-label {
  display: block;
  color: var(--yellow);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.program__price-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.program__price-chips span {
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 8px;
}

.program__price-note {
  display: block;
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  opacity: .85;
}

.program__cta {
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 12px;
  border: 3px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
}

/* ---------- Sucursal ---------- */

.branch {
  padding: 48px 24px;
  background: #EDEDED;
  display: flex;
  justify-content: center;
}

.branch__card {
  max-width: 420px;
  width: 100%;
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 6px 6px 0 var(--red);
}

.branch__pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .06em;
  padding: 6px 14px;
  border-radius: 6px;
  transform: rotate(-2deg);
}

.branch__title {
  font-family: var(--font-display);
  color: var(--navy);
  text-transform: uppercase;
  font-size: 26px;
  margin: 12px 0 8px;
}

.branch__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--navy);
  font-weight: 800;
  font-size: 16px;
  margin: 0 0 8px;
}

.branch__note {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin: 0 0 20px;
}

.branch__cta {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 2px solid var(--navy);
  text-decoration: none;
}

/* ---------- Cierre / contacto ---------- */

.closer {
  position: relative;
  background: var(--red);
  padding: 64px 24px;
  text-align: center;
  overflow: hidden;
}

.closer__halftone {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1.6px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: .5;
}

.closer__title {
  position: relative;
  font-family: var(--font-display);
  color: var(--white);
  text-transform: uppercase;
  font-size: 28px;
  margin: 0 0 24px;
  text-shadow: -2px -2px 0 var(--navy), 2px -2px 0 var(--navy), -2px 2px 0 var(--navy), 2px 2px 0 var(--navy);
}

.closer__cta-wrap {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.closer__cta {
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 12px;
  border: 3px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
}

.closer__social {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
}

.closer__social a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.closer__social a:hover { color: var(--yellow); }

@media (min-width: 860px) {
  .method__heading { font-size: 48px; }
  .method__subtitle { font-size: 18px; }

  .method__steps {
    flex-direction: row;
    align-items: stretch;
    gap: 28px;
  }

  .method__step { flex: 1; }

  .program__inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 56px;
  }

  .program__card { text-align: left; }
  .program__title { font-size: 40px; }
  .program__subtitle { font-size: 17px; }
  .program__cta { font-size: 18px; padding: 17px 36px; }

  .program__flyer { max-width: 340px; flex-shrink: 0; }

  .closer__title { font-size: 40px; }
  .closer__cta { font-size: 18px; padding: 17px 36px; }
}

/* ---------- Galería (fotos sobrantes, decorativa hasta que existan secciones propias) ---------- */

.gallery {
  padding: 48px 24px 56px;
  background: #EDEDED;
  text-align: center;
}

.gallery__title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.gallery__strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery__photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 4px solid var(--navy);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--red);
  background: var(--white);
}

.gallery__photo:nth-child(odd)  { transform: rotate(-2.5deg); }
.gallery__photo:nth-child(even) { transform: rotate(2deg); }

@media (min-width: 860px) {
  .gallery__photo { width: 200px; height: 200px; }
}

/* ---------- Testimonios ---------- */

.testimonials {
  padding: 48px 24px 56px;
  background: var(--white);
  text-align: center;
}

.testimonials__intro {
  margin: 0 auto 32px;
}

.testimonials__pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 7px 16px;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(11, 31, 59, .35);
}

.testimonials__heading {
  font-family: var(--font-display);
  color: var(--navy);
  text-transform: uppercase;
  font-size: 28px;
  margin: 16px 0 0;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonials__card {
  margin: 0;
  background: #EDEDED;
  border: 3px solid var(--navy);
  border-radius: 16px;
  padding: 22px 20px;
  text-align: left;
  box-shadow: 5px 5px 0 var(--sky);
  display: flex;
  flex-direction: column;
}

.testimonials__stars {
  color: var(--yellow);
  text-shadow: -1px -1px 0 var(--navy), 1px -1px 0 var(--navy), -1px 1px 0 var(--navy), 1px 1px 0 var(--navy);
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.testimonials__card blockquote {
  margin: 0 0 16px;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  flex-grow: 1;
}

.testimonials__card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonials__name {
  font-weight: 800;
  font-size: 13px;
  color: var(--navy);
}

.testimonials__source {
  font-weight: 600;
  font-size: 11px;
  color: #666;
}

@media (min-width: 640px) {
  .testimonials__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .testimonials__heading { font-size: 36px; }
  .testimonials__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Página de Servicios ---------- */

.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;
}

.svc-header {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  text-align: center;
  padding-bottom: 32px;
}

.svc-header__cover {
  width: 100%;
  display: block;
  animation: cover-in 3.8s ease-in-out both;
}

@keyframes cover-in {
  0%   { opacity: 0; transform: scale(1.12); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.svc-jump {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 820px;
  margin: 28px auto 0;
  padding: 0 20px;
}

.svc-jump__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--white);
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  padding: 8px 14px 8px 10px;
  border-radius: 20px;
  transition: transform .15s ease;
}

.svc-jump__link:hover { transform: translateY(-2px); color: var(--white); }

.svc-jump__link svg { width: 14px; height: 14px; flex-shrink: 0; }

.svc-jump__link--red    { background: rgba(227, 30, 36, .55); }
.svc-jump__link--blue   { background: rgba(41, 171, 226, .55); }
.svc-jump__link--green  { background: rgba(22, 163, 74, .6); }
.svc-jump__link--purple { background: rgba(124, 58, 237, .6); }
.svc-jump__link--orange { background: rgba(249, 115, 22, .6); }
.svc-jump__link--navy   { background: rgba(11, 31, 59, .65); }

.svc-header__guide {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: calc(100% - 40px);
  margin: 18px auto 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .12);
  border: 1.5px dashed var(--white);
  border-radius: 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.svc-header__guide strong { display: block; color: var(--yellow); margin-bottom: 6px; }

.svc-header__guide ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.svc-header__infobar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 22px auto 0;
}

.svc-header__infobar span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
}

.svc-header__infobar svg { width: 15px; height: 15px; flex-shrink: 0; }

.svc {
  padding: 52px 20px;
  --svc-fg: var(--navy);
  --svc-accent: var(--red);
  --svc-chip-bg: rgba(11, 31, 59, .06);
}

.svc--red     { background: var(--red);  --svc-fg: var(--white); --svc-accent: var(--yellow); --svc-chip-bg: rgba(255, 255, 255, .15); }
.svc--navy    { background: var(--navy); --svc-fg: var(--white); --svc-accent: var(--sky);    --svc-chip-bg: rgba(255, 255, 255, .12); }
.svc--sky     { background: var(--sky);  --svc-fg: var(--navy);  --svc-accent: var(--navy);   --svc-chip-bg: rgba(11, 31, 59, .1); }
.svc--yellow  { background: var(--yellow); --svc-fg: var(--navy); --svc-accent: var(--red);   --svc-chip-bg: rgba(11, 31, 59, .08); }
.svc--light   { background: #EDEDED; }

.svc__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

/* Orden en móvil: título+descripción, fotos+beneficios, resto de detalles. */
.svc__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.svc__media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.svc__photos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.svc__photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 4px solid var(--navy);
  border-radius: 14px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .28);
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.6s ease, transform 1.6s ease;
}

.svc__media.is-visible .svc__photo { opacity: 1; transform: scale(1); }

.svc__photos img:nth-of-type(2) { transition-delay: .3s; }
.svc__photos img:nth-of-type(3) { transition-delay: .6s; }

.svc__photo--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(11, 31, 59, .08);
  border-style: dashed;
  box-shadow: none;
  color: var(--navy);
  opacity: .7;
}

.svc__photo--placeholder svg { width: 34px; height: 34px; }

.svc__photo--placeholder span {
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.svc__pill {
  display: inline-block;
  align-self: flex-start;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1.5px solid var(--navy);
  margin-bottom: 14px;
}

.svc--yellow .svc__pill { background: var(--navy); color: var(--yellow); border-color: var(--navy); }

.svc__title {
  font-family: var(--font-display);
  color: var(--svc-fg);
  text-transform: uppercase;
  font-size: 28px;
  line-height: 1.08;
  margin: 0 0 12px;
}

.svc__lead {
  color: var(--svc-fg);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.svc__subhead {
  color: var(--svc-fg);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 18px 0 10px;
  opacity: .9;
}

.svc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.svc__list li {
  color: var(--svc-fg);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.svc__list li::before {
  content: '';
  width: 11px;
  height: 11px;
  margin-top: 3px;
  flex-shrink: 0;
  background: var(--svc-accent);
  border-radius: 50%;
  border: 2px solid var(--svc-fg);
}

.svc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.svc__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--svc-chip-bg);
  color: var(--svc-fg);
  font-weight: 800;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--svc-fg);
}

.svc__meta span svg { width: 13px; height: 13px; flex-shrink: 0; }

.svc__photos { position: relative; }

.svc__benefits {
  margin-top: 4px;
  background: var(--svc-chip-bg);
  border: 1.5px dashed var(--svc-fg);
  border-radius: 12px;
  padding: 14px 16px;
}

.svc__benefits-label {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 7px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .3);
}

.svc__benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.svc__benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--svc-fg);
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.25;
}

.svc__benefit-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid rgba(255, 255, 255, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}

.svc__benefit-icon svg { width: 18px; height: 18px; }

/* Rotación de colores por ícono, como en el mockup */
.svc__benefit:nth-child(3n+1) .svc__benefit-icon { background: var(--sky); border-color: var(--navy); }
.svc__benefit:nth-child(3n+2) .svc__benefit-icon { background: var(--yellow); border-color: var(--navy); }
.svc__benefit:nth-child(3n+2) .svc__benefit-icon svg { stroke: var(--navy) !important; }
.svc__benefit:nth-child(3n)   .svc__benefit-icon { background: var(--red); border-color: var(--white); }

/* Variante de tarjetas blancas para Energiza, con íconos de color fijo por beneficio */
.svc__benefits--cards {
  background: transparent;
  border: none;
  padding: 0;
}

.svc__benefits--cards .svc__benefits-grid { gap: 12px; }

.svc__benefits--cards .svc__benefit {
  background: rgba(255, 255, 255, .92);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .12);
}

.svc__benefits--cards .svc__benefit--blue   .svc__benefit-icon { background: var(--sky); border-color: var(--navy); }
.svc__benefits--cards .svc__benefit--red    .svc__benefit-icon { background: var(--red); border-color: var(--white); }
.svc__benefits--cards .svc__benefit--orange .svc__benefit-icon { background: var(--orange); border-color: var(--white); }
.svc__benefits--cards .svc__benefit--green  .svc__benefit-icon { background: var(--green); border-color: var(--white); }
.svc__benefits--cards .svc__benefit--purple .svc__benefit-icon { background: var(--purple); border-color: var(--white); }

.svc__tagline {
  position: relative;
  margin: 20px 14px 8px;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 15px;
  line-height: 1.35;
  padding: 16px 20px;
  clip-path: polygon(0% 4%, 3% 0%, 97% 2%, 100% 6%, 99% 92%, 96% 100%, 4% 98%, 1% 94%);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .3);
  transform: rotate(-1deg);
}

.svc__tagline::before, .svc__tagline::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--white);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: cta-spark 4.8s ease-in-out infinite;
}

.svc__tagline::before { top: -14px; left: -14px; }
.svc__tagline::after  { bottom: -14px; right: -14px; animation-delay: .4s; }

/* ---------- Capacitaciones para empresas: segmento propio, banner compacto ---------- */

.svc-empresas {
  background: var(--navy);
  padding: 36px 20px;
  text-align: center;
}

.svc-empresas__pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .3);
}

.svc-empresas__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto;
}

.svc-empresas__media {
  position: relative;
  width: 100%;
  max-width: 260px;
  flex-shrink: 0;
  margin-bottom: 26px;
}

.svc-empresas__photo {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border: 4px solid var(--yellow);
  border-radius: 14px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .3);
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.6s ease, transform 1.6s ease;
}

.svc-empresas__inner.is-visible .svc-empresas__photo { opacity: 1; transform: scale(1); }

.svc-empresas__photo--round {
  position: absolute;
  right: -16px;
  bottom: -22px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .3);
  transition-delay: .35s;
}

.svc-empresas__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--white);
  font-size: 19px;
  margin: 0 0 8px;
}

.svc-empresas__copy {
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  max-width: 520px;
  margin: 0 0 18px;
}

.svc-empresas__copy strong { color: var(--yellow); }

.svc-empresas__cta {
  display: inline-flex;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  background: var(--yellow);
  color: var(--navy);
  border: 3px solid var(--white);
  border-radius: 12px;
  padding: 14px 26px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
  margin-top: 4px;
}

@media (min-width: 640px) {
  .svc__benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .svc-empresas { padding: 40px 48px; }

  .svc-empresas__inner {
    flex-direction: row;
    text-align: left;
    gap: 28px;
  }

  .svc-empresas__text { flex: 1; }
  .svc-empresas__copy { margin-bottom: 0; }
  .svc-empresas__cta { margin-top: 14px; }
  .svc-empresas__media { margin-bottom: 0; }
}

.svc__price {
  background: var(--svc-chip-bg);
  border: 1.5px dashed var(--svc-fg);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 22px;
}

.svc__price-label {
  display: block;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--svc-fg);
  margin-bottom: 8px;
}

.svc__price-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.svc__price-chips span {
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1.5px solid var(--navy);
}

.svc__price-note {
  display: block;
  color: var(--svc-fg);
  font-size: 12px;
  font-weight: 600;
  opacity: .9;
}

.svc__cta {
  display: inline-block;
  align-self: flex-start;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 12px;
  border: 3px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
  background: var(--yellow);
  color: var(--navy);
}

.svc--yellow .svc__cta {
  background: var(--red);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
}

@media (min-width: 860px) {
  .svc-header { padding-bottom: 40px; }

  .svc-jump__link { font-size: 13px; padding: 9px 18px 9px 12px; }

  .svc-header__infobar {
    flex-direction: row;
    justify-content: center;
    gap: 18px;
  }

  .svc-header__infobar-sep {
    width: 1.5px;
    height: 16px;
    background: rgba(255, 255, 255, .4);
  }

  .svc { padding: 72px 32px; }

  .svc__inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 56px;
    grid-template-areas:
      "media head"
      "media text";
  }

  .svc--reverse .svc__inner {
    grid-template-areas:
      "head media"
      "text media";
  }

  .svc__head  { grid-area: head; }
  .svc__media { grid-area: media; }
  .svc__text  { grid-area: text; }

  .svc__photos { flex-direction: row; }
  .svc__photo { flex: 1 1 0; min-width: 0; height: 260px; }

  .svc__title { font-size: 38px; }
  .svc__lead { font-size: 16px; }
}
