/* Home hero: marco editorial simetrico.
   Mantiene la paleta y fotografia aprobadas; solo corrige ancho, margenes y ejes. */
@media (min-width: 901px) {
  body[data-workori-page="home"] {
    --home-frame-max: 1360px;
    --home-frame-gutter: 24px;
    --home-content-max: 1296px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafb 48%, #eef6f7 100%);
    background-attachment: fixed;
  }

  body[data-workori-page="home"] .hero {
    width: min(var(--home-frame-max), calc(100% - (var(--home-frame-gutter) * 2)));
    margin-inline: auto;
  }

  body[data-workori-page="home"] .site-header {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    background: #ffffff;
    border-inline: 0;
    box-shadow:
      0 10px 30px rgba(15, 25, 43, 0.055),
      0 0 70px rgba(255, 255, 255, 0.72);
  }

  body[data-workori-page="home"] .header-inner,
  body[data-workori-page="home"] .hero-grid,
  body[data-workori-page="home"] .hero-signals {
    width: min(var(--home-content-max), calc(100% - 48px));
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
  }

  body[data-workori-page="home"] .hero {
    --hero-band-height: clamp(610px, 47vw, 690px);
    z-index: 2;
    border-inline: 0;
    border-radius: 0 0 18px 18px;
    box-shadow:
      0 10px 18px -12px rgba(15, 25, 43, 0.24),
      0 26px 52px -30px rgba(15, 25, 43, 0.2),
      0 0 80px rgba(255, 255, 255, 0.5);
    filter: drop-shadow(0 18px 16px rgba(15, 25, 43, 0.16));
    overflow: hidden;
  }

  body[data-workori-page="home"] .hero-copy {
    width: min(800px, 52%);
    margin-left: 0 !important;
    transform: none !important;
  }

  body[data-workori-page="home"] .hero-search {
    width: min(1120px, 168%);
  }

  /* Compensa el aire visual del retrato contra el margen izquierdo del copy. */
  body[data-workori-page="home"] .hero-photo {
    transform: translateX(30px) !important;
  }

  body[data-workori-page="home"] .hero-signal-band {
    border-top: 1px solid #d7e2ed;
    border-bottom: 1px solid #d7e2ed;
    background: #ffffff !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.96),
      inset 0 -1px 0 rgba(7, 95, 228, 0.035);
  }

  body[data-workori-page="home"] .hero-signal:first-child {
    border-left: 0;
  }

  body[data-workori-page="home"] .hero-signal:last-child {
    border-right: 0;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  body[data-workori-page="home"] {
    --home-frame-gutter: 18px;
  }

  body[data-workori-page="home"] .hero-copy {
    width: 50%;
  }

  body[data-workori-page="home"] .hero-search {
    width: min(820px, 188%);
  }
}

@media (min-width: 1500px) {
  body[data-workori-page="home"] {
    --home-frame-gutter: 32px;
  }
}

/* Flujo cromatico continuo: cada franja entrega el mismo tono a la siguiente. */
body[data-workori-page="home"] {
  --home-flow-white: #ffffff;
  --home-flow-mist: #eef6f7;
  --home-flow-middle: #f7fafb;
}

body[data-workori-page="home"] #projects,
body[data-workori-page="home"] #how-it-works,
body[data-workori-page="home"] #providers,
body[data-workori-page="home"] #contact,
body[data-workori-page="home"] .stats-section {
  background: linear-gradient(
    180deg,
    var(--home-flow-mist) 0%,
    var(--home-flow-mist) 8%,
    var(--home-flow-middle) 52%,
    var(--home-flow-white) 100%
  );
}

/* La salida del hero y la entrada de proyectos comparten el mismo tono.
   El solapamiento visual elimina la linea entre ambas franjas. */
body[data-workori-page="home"] #projects {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

body[data-workori-page="home"] #projects::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -22px 0 auto;
  height: 112px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(238, 246, 247, 0) 0%,
    var(--home-flow-mist) 22%,
    var(--home-flow-mist) 58%,
    rgba(238, 246, 247, 0) 100%
  );
}

body[data-workori-page="home"] #services,
body[data-workori-page="home"] #about,
body[data-workori-page="home"] #guides,
body[data-workori-page="home"] #mobile-apps {
  background: linear-gradient(
    180deg,
    var(--home-flow-white) 0%,
    var(--home-flow-middle) 46%,
    var(--home-flow-mist) 100%
  );
}

body[data-workori-page="home"] #mobile-apps[data-home-lock="pwa-apps"].pwa-apps-section {
  background: linear-gradient(
    180deg,
    var(--home-flow-white) 0%,
    var(--home-flow-middle) 46%,
    var(--home-flow-mist) 100%
  ) !important;
}

body[data-workori-page="home"] .site-footer {
  background: linear-gradient(
    180deg,
    var(--home-flow-white) 0%,
    var(--home-flow-middle) 52%,
    var(--home-flow-mist) 100%
  );
}

/* Estadisticas: bloque de confianza amplio, legible y alineado con la marca. */
body[data-workori-page="home"] .stats-section {
  padding-block: clamp(58px, 7vw, 92px);
}

body[data-workori-page="home"] .stats-grid {
  gap: clamp(14px, 1.8vw, 24px);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body[data-workori-page="home"] .stats-grid article {
  position: relative;
  display: flex;
  min-height: 246px;
  padding: 30px 22px 26px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(7, 95, 228, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    0 18px 44px rgba(15, 25, 43, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

body[data-workori-page="home"] .stats-grid img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(7, 95, 228, 0.13));
}

body[data-workori-page="home"] .stats-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #075fe4, #00a99d);
  opacity: 0.78;
}

body[data-workori-page="home"] .stats-grid strong {
  font-size: clamp(2.25rem, 4vw, 3.35rem);
  line-height: 1;
  color: #0753bd;
}

body[data-workori-page="home"] .stats-grid span {
  max-width: 18ch;
  font-size: 0.98rem;
  line-height: 1.45;
  color: #52647a;
}

@media (min-width: 768px) and (max-width: 1000px) {
  body[data-workori-page="home"] .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Recupera el ritmo vertical de componentes que también usan `.container`.
   El ajuste genérico de tablet define solo padding horizontal y, por cascada,
   anulaba el padding superior e inferior de estas dos franjas. */
body[data-workori-page="home"] .feature-band .feature-grid {
  padding: clamp(24px, 3vw, 34px) clamp(22px, 3vw, 34px);
  align-items: center;
}

body[data-workori-page="home"] .provider-cta .cta-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.8fr) auto;
  align-items: center;
  column-gap: clamp(24px, 3vw, 40px);
  row-gap: 24px;
  padding: clamp(38px, 4vw, 52px) clamp(28px, 4.5vw, 64px);
}

body[data-workori-page="home"] .provider-cta .cta-grid > div {
  display: grid;
  align-content: center;
  gap: 16px;
}

body[data-workori-page="home"] .provider-cta .cta-grid h2,
body[data-workori-page="home"] .provider-cta .cta-grid p {
  margin: 0;
}

body[data-workori-page="home"] .provider-cta .cta-grid h2 {
  line-height: 1.16;
}

body[data-workori-page="home"] .provider-cta .cta-grid p {
  line-height: 1.55;
}

body[data-workori-page="home"] .provider-cta .cta-grid ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-workori-page="home"] .provider-cta .cta-grid li {
  position: relative;
  padding-left: 28px;
  line-height: 1.4;
}

body[data-workori-page="home"] .provider-cta .cta-grid li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05em;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
}

body[data-workori-page="home"] .provider-cta .cta-grid .btn {
  min-height: 56px;
  padding-inline: 28px;
  justify-self: center;
  white-space: nowrap;
}

@media (min-width: 769px) and (max-width: 1050px) {
  body[data-workori-page="home"] .provider-cta .cta-grid {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.78fr);
  }

  body[data-workori-page="home"] .provider-cta .cta-grid .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  body[data-workori-page="home"] .feature-band .feature-grid {
    padding: 22px 16px;
  }

  body[data-workori-page="home"] .provider-cta .cta-grid {
    grid-template-columns: 1fr;
    padding: 26px 18px;
  }

  body[data-workori-page="home"] .provider-cta .cta-grid ul {
    display: none;
  }

  body[data-workori-page="home"] .provider-cta .cta-grid .btn {
    width: 100%;
    justify-self: stretch;
  }
}

/* Acciones contextuales del índice: reemplazan únicamente los enlaces sueltos
   de los encabezados sin alterar la estructura ni las tarjetas de las secciones. */
body[data-workori-page="home"] .section-context-action {
  --context-accent: #075fe4;
  --context-icon-bg: linear-gradient(135deg, #e8f1ff, #ddf8f5);
  display: grid;
  min-width: 248px;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border: 1px solid color-mix(in srgb, var(--context-accent) 18%, transparent);
  border-radius: 16px;
  color: #0f1f3d;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--context-accent) 9%, transparent);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body[data-workori-page="home"] .section-context-action:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--context-accent) 34%, transparent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--context-accent) 14%, transparent);
}

body[data-workori-page="home"] .section-context-action:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--context-accent) 24%, transparent);
  outline-offset: 3px;
}

body[data-workori-page="home"] .section-context-action__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--context-accent);
  background: var(--context-icon-bg);
  font-size: 1.15rem;
  font-weight: 800;
}

body[data-workori-page="home"] .section-context-action__copy {
  display: block;
  min-width: 0;
}

body[data-workori-page="home"] .section-context-action__copy small,
body[data-workori-page="home"] .section-context-action__copy strong {
  display: block;
}

body[data-workori-page="home"] .section-context-action__copy small {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-workori-page="home"] .section-context-action__copy strong {
  color: #0f1f3d;
  font-size: 0.88rem;
  line-height: 1.25;
}

body[data-workori-page="home"] .section-context-action__arrow {
  color: var(--context-accent);
  font-size: 1.15rem;
  font-weight: 900;
  transition: transform 180ms ease;
}

body[data-workori-page="home"] .section-context-action:hover .section-context-action__arrow {
  transform: translateX(3px);
}

body[data-workori-page="home"] .section-context-action--providers {
  --context-accent: #087d75;
  --context-icon-bg: linear-gradient(135deg, #e6faf8, #edf5ff);
}

body[data-workori-page="home"] .section-context-action--resources {
  --context-accent: #a36116;
  --context-icon-bg: linear-gradient(135deg, #fff4dc, #eef6ff);
}

@media (max-width: 768px) {
  body[data-workori-page="home"] .section-context-action {
    width: 100%;
    min-width: 0;
    margin-top: 4px;
  }
}
