:root {
  --green: #009639;
  --green-dark: #007a30;
  --green-band: #e8f6ec;
  --text: #2d3436;
  --muted: #636e72;
  --border: #dfe6e1;
  --bg: #ffffff;
  --container-max: 1180px;
  --pad-inline: clamp(16px, 4vw, 40px);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.08);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Pantalla de carga al entrar o recargar (1,5 s, logo grande + spinner con logo pequeño) */
.page-preloader {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3.5vh, 32px);
}

.page-preloader__logo--main {
  width: min(72vw, 300px);
  height: auto;
  max-height: min(42vh, 280px);
  object-fit: contain;
}

.page-preloader-spinner {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
}

.page-preloader-spinner__ring {
  position: absolute;
  transform-box: fill-box;
  transform-origin: center;
  animation: page-preloader-spin 0.95s linear infinite;
}

.page-preloader-spinner__track {
  stroke: rgba(0, 150, 57, 0.22);
}

.page-preloader-spinner__arc {
  stroke: var(--green);
  stroke-dasharray: 88 240;
  stroke-dashoffset: 0;
  transform-origin: 60px 60px;
  transform: rotate(-90deg);
}

@keyframes page-preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

.page-preloader-spinner__mark {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.page-preloader-spinner__mark img {
  width: 40px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 20px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: max(8px, env(safe-area-inset-left, 0px));
  top: max(8px, env(safe-area-inset-top, 0px));
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--pad-inline);
  padding-right: var(--pad-inline);
}

/* ——— Cabecera: barra verde + franja blanca con sombra hacia el banner ——— */
.site-header {
  position: relative;
  background: transparent;
  z-index: 20;
}

.header-brand-bar {
  width: 100%;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 45, 28, 0.09);
  position: relative;
  z-index: 2;
}

/* Marca pegada a la izquierda, bajo «Ir a epm» (mismo inset izquierdo que el enlace verde) */
.header-brand-bar .header-main-row {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-inline), env(safe-area-inset-right, 0px));
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 12px;
  width: 100%;
}

.header-epm-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 12px 16px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(11px, 2.3vw, 13px);
  border-radius: 0 0 20px 0;
  line-height: 1.2;
  flex-shrink: 0;
  transition: filter 0.2s ease;
}

.header-epm-link:hover {
  filter: brightness(1.06);
}

.header-epm-link__icon {
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
}

.header-util-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 8px;
  background: var(--green);
  color: #fff;
  padding: 9px 16px 11px 14px;
  border-radius: 0 0 20px 20px;
  max-width: 100%;
}

.util-vsep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  margin: 0 2px;
}

.header-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 0 16px;
  box-sizing: border-box;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 2.2vw, 16px);
  text-decoration: none;
  color: inherit;
  flex-wrap: nowrap;
  min-width: 0;
}

.header-title {
  margin: 0;
  font-size: clamp(22px, 4.8vw, 32px);
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.header-sep {
  flex-shrink: 0;
  width: 1px;
  height: clamp(30px, 7vw, 40px);
  background: #b2bec3;
  align-self: center;
}

.header-epm-logo {
  height: clamp(32px, 7vw, 42px);
  width: auto;
  display: block;
}

.util-btn--greenbar {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.util-btn--greenbar:hover {
  background: rgba(255, 255, 255, 0.12);
}

.util-btn--greenbar.util-btn--on {
  background: #fff;
  color: var(--green);
  border-color: #fff;
  border-radius: 50%;
  min-width: 32px;
  width: 32px;
  padding: 0;
  font-size: 13px;
}

.header-util-cluster .util-btn--greenbar i.fa-solid {
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.util-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
}

.util-id-text {
  font-weight: 600;
  white-space: nowrap;
}

.util-select--greenbar {
  padding: 6px 30px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  appearance: none;
  cursor: default;
}

.util-select--greenbar option {
  color: #1a1a1a;
  background: #fff;
}

.header-ayuda {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
}

.header-ayuda:hover {
  color: var(--green-dark);
}

/* ——— Hero: banner a todo el ancho del viewport + copy arriba a la izquierda ——— */
.hero-benefits-stack {
  position: relative;
  width: 100%;
}

.hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #f5faf7;
  box-sizing: border-box;
  z-index: 1;
}

.hero-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-art {
  grid-column: 1;
  grid-row: 1;
  z-index: 0;
  width: 100%;
  min-width: 0;
  position: relative;
  min-height: clamp(280px, 44vw, 520px);
  max-height: min(82vh, 780px);
  overflow: hidden;
}

.hero-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
  align-self: start;
  justify-self: stretch;
  min-width: 0;
  padding: clamp(28px, 4.5vw, 52px) 0 clamp(20px, 3vw, 36px);
  pointer-events: none;
  text-align: left;
}

.hero-copy-inner {
  max-width: min(36rem, 100%);
  pointer-events: auto;
}

/* Misma referencia que el header, desplazado unos px a la izquierda respecto al centrado */
.hero-copy .container.hero-copy-inner {
  margin-right: auto;
  margin-left: max(
    var(--pad-inline),
    calc((100vw - min(var(--container-max), 100vw)) / 2 - 20px)
  );
}

.hero-eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: clamp(13px, 2.5vw, 15px);
  font-weight: 500;
}

.hero-title {
  margin: 0 0 clamp(18px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-size: clamp(26px, 5.2vw, 42px);
  color: inherit;
}

.hero-title-line {
  display: block;
}

.hero-title-line--green {
  color: var(--green);
}

.hero-title-line--dark {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(13px, 2.5vw, 15px);
  box-shadow: 0 4px 16px rgba(0, 150, 57, 0.22);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 150, 57, 0.28);
}

.btn-pay {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 11px 22px;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: #fff;
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(13px, 2.5vw, 15px);
  overflow: hidden;
  animation: btn-pay-pulse 2.2s ease-in-out infinite;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-pay:hover {
  background: var(--green);
  color: #fff;
  animation: none;
  transform: translateY(-1px);
}

.btn-pay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  animation: btn-pay-shine 3.5s ease-in-out infinite;
  pointer-events: none;
}

.btn-pay:hover::after {
  animation: none;
  opacity: 0;
}

@keyframes btn-pay-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 150, 57, 0.28);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 150, 57, 0);
  }
}

@keyframes btn-pay-shine {
  0%,
  15% {
    transform: translateX(-120%);
  }
  40%,
  100% {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-pay,
  .btn-pay::after {
    animation: none;
  }
  .btn-primary:hover,
  .btn-pay:hover {
    transform: none;
  }
}

/* ——— Beneficios: por encima del banner, fondo transparente (se ve la ilustración) ——— */
.benefits--band {
  position: relative;
  z-index: 6;
  margin-top: clamp(-148px, -15vw, -96px);
  width: 100%;
  max-width: 100%;
  background: transparent;
  border-top: none;
  border-bottom: 1px solid rgba(205, 232, 216, 0.55);
  border-radius: 0;
  padding: clamp(26px, 3.8vw, 36px) 0 clamp(24px, 4.2vw, 36px);
  box-shadow: none;
}

.benefits-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

/* Título a la izquierda, sin halo/sombra blanca */
.benefits-title {
  width: 100%;
  max-width: 100%;
  margin: 0 0 clamp(18px, 2.6vw, 24px);
  padding-left: clamp(4px, 1.2vw, 14px);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--green);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-align: left;
  align-self: flex-start;
  box-sizing: border-box;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.benefit {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 1.55vw, 16px);
  min-width: 0;
  min-height: 3.5rem;
  padding: clamp(10px, 1.35vw, 16px) clamp(10px, 1.55vw, 16px);
  border-right: 1px solid rgba(213, 224, 219, 0.65);
  align-self: center;
}

.benefit:last-child {
  border-right: none;
}

.benefit-icon {
  width: clamp(44px, 7.5vw, 54px);
  height: clamp(44px, 7.5vw, 54px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}

.benefit-icon img {
  width: 100%;
  height: 100%;
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.benefit-text {
  margin: 0;
  font-size: clamp(13.5px, 1.35vw, 16px);
  line-height: 1.32;
  color: #1a1d1f;
  font-weight: 600;
  text-align: left;
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.92),
    0 1px 1px rgba(255, 255, 255, 0.85);
}

/* ——— Socios: franja a todo el ancho del viewport + una línea en escritorio ——— */
.partners {
  padding: clamp(20px, 3vw, 32px) 0 clamp(28px, 4vw, 44px);
  background: #fff;
}

.partners-strip {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(var(--pad-inline), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-inline), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  margin-bottom: clamp(24px, 4vw, 36px);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.partners-inline {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  width: 100%;
  min-width: max-content;
}

.partners-line {
  flex: 1 1 0;
  min-width: clamp(20px, 3vw, 48px);
  height: 1px;
  background: var(--border);
  align-self: center;
}

.logos-intro {
  flex: 0 0 auto;
  margin: 0;
  width: auto;
  max-width: none;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: clamp(20px, 1.8125vw, 24px);
  color: #555555;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: nowrap;
}

.logos-intro strong {
  color: #2a2a2a;
  font-weight: 700;
}

.logo-card-row {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
}

.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 64px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8e4;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.logo-card:hover {
  box-shadow: 0 4px 14px rgba(0, 150, 57, 0.1);
  border-color: #cde8d8;
}

.logo-card img {
  max-width: 100%;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-card--essa {
  width: 128px;
  padding: 6px 12px;
}

.logo-card--essa img {
  max-height: 34px;
  max-width: 100%;
}

.site-footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding-top: clamp(16px, 2.5vw, 22px);
  border-top: 1px solid var(--border);
  font-size: clamp(10px, 1.9vw, 12px);
  color: #889096;
}

.footer-left-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  flex: 1 1 220px;
}

.footer-vigilado {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.footer-superservicios-logo {
  display: block;
  height: clamp(22px, 4vw, 28px);
  width: auto;
  flex-shrink: 0;
}

.footer-vigilado__line {
  font-weight: 600;
  color: #636e72;
}

.footer-update {
  color: #889096;
}

.footer-terms {
  flex: 0 0 auto;
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-terms:hover {
  color: var(--green-dark);
}

.footer-copy {
  flex: 1 1 auto;
  text-align: right;
  min-width: min(100%, 200px);
}

.fab-help {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: #1d4ed8;
  box-shadow: 0 4px 18px rgba(29, 78, 216, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.fab-help::after {
  content: "?";
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.fab-help:hover {
  transform: scale(1.05);
}

@media (max-width: 960px) {
  .hero-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .hero-copy {
    align-self: start;
    padding: clamp(18px, 3.5vw, 28px) 0 clamp(20px, 4vw, 32px);
  }

  .hero-copy-inner {
    max-width: none;
  }

  .hero-copy .container.hero-copy-inner {
    margin-left: var(--pad-inline);
  }

  .hero-art {
    min-height: clamp(220px, 48vw, 340px);
    max-height: min(48vh, 400px);
  }

  .hero-illustration {
    object-position: center 50%;
    transform: none;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit {
    border-right: none;
    border-bottom: 1px solid #d5e0db;
    padding: clamp(10px, 2vw, 14px) clamp(10px, 2vw, 16px);
  }

  .benefit:nth-child(odd) {
    border-right: 1px solid #d5e0db;
  }

  .benefit:nth-child(even) {
    border-right: none;
  }

  .benefits-grid .benefit:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .benefits--band {
    margin-top: clamp(-72px, -12vw, -48px);
  }

  .partners-strip {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    padding-left: var(--pad-inline);
    padding-right: var(--pad-inline);
    overflow-x: visible;
  }

  .partners-inline {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 0;
    width: 100%;
  }

  .partners-line {
    display: none;
  }

  .logos-intro {
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .logo-card-row {
    justify-content: center;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

@media (max-width: 560px) {
  .header-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .header-epm-link {
    align-self: flex-start;
    border-radius: 0 0 16px 16px;
  }

  .header-util-cluster {
    justify-content: center;
    border-radius: 0 0 16px 16px;
  }

  .header-main-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-brand {
    flex-wrap: wrap;
  }

  .header-ayuda {
    align-self: flex-end;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .benefit:nth-child(odd) {
    border-right: none;
  }

  .benefits-grid .benefit {
    border-right: none;
    border-bottom: 1px solid #d5e0db;
  }

  .benefits-grid .benefit:last-child {
    border-bottom: none;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 12px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-pay {
    width: auto;
    flex: 0 1 auto;
    justify-content: center;
  }

  .site-footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copy {
    text-align: left;
    width: 100%;
  }
}
