/* ════════════════════════════════════════════════════════
   home.css — Landing page CENECOMPUC
   Hero sin carrusel, stats bar, cómo funciona,
   bento grid servicios, testimonios.
   Mobile-first (360px), vanilla CSS, ~600 líneas.
   ════════════════════════════════════════════════════════ */

/* ============================================================
   1. HERO — Reemplazo del carrusel por placeholder estático
   ============================================================ */

/* Override: quitar el carrusel — ocultamos los elementos del carrusel */
.hero-carousel-viewport,
.hero-carousel-arrow,
.hero-carousel-dots {
  display: none !important;
}

.hero-carousel {
  padding: 0;
  gap: 0;
  min-height: auto;
}

/* Placeholder decorativo para el hero visual */
.hero-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 250px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, #eaf4fd 0%, #dcecf9 30%, #e6f3fc 60%, #d9eaf7 100%);
  border: 2px solid #d0e4f3;
  overflow: hidden;
  position: relative;
}

.hero-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(7, 130, 203, .15), transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(22, 200, 243, .12), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(6, 73, 149, .08), transparent 40%);
}

.hero-placeholder-inner {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--brand);
  text-align: center;
}

.hero-placeholder-inner svg {
  width: 80px;
  height: 80px;
  opacity: .55;
}

.hero-placeholder-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-2);
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .7;
}

/* Hero editorial — mantener lo que ya funciona, refinar */
.hero {
  padding: 40px 0 44px;
}

.hero-grid {
  gap: 36px;
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
}

.hero .lead {
  max-width: 46ch;
  font-size: .98rem;
}

.hero-badge {
  margin-bottom: 14px;
  padding: 7px 13px;
  font-size: 12px;
}

.hero-actions {
  margin-top: 22px;
}

/* Trust bar — más prominente */
.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 560px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #dce9f3;
}

.hero-trust span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #49647d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-trust b {
  color: var(--brand-2);
  font-size: 14px;
  line-height: 1;
}

/* ============================================================
   2. STATS BAR — Franja de confianza con 4 números
   ============================================================ */

.stats-section {
  padding: 0;
  margin-top: -2px;
}

.stats-bar {
  background: linear-gradient(135deg, #053f7f 0%, var(--brand-2) 48%, #0894c9 100%);
  box-shadow: 0 8px 32px rgba(6, 73, 149, .16);
  position: relative;
  overflow: hidden;
}

.stats-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, .08) 45%, transparent 68%);
  pointer-events: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, .12);
  padding: 0;
}

.stats-item {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 22px 12px;
  background: transparent;
  color: #fff;
  text-align: center;
  position: relative;
}

.stats-number {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}

.stats-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: .78;
}

/* ============================================================
   3. CÓMO FUNCIONA — 3 pasos con iconos
   ============================================================ */

.how-it-works {
  padding: 56px 0 48px;
  background:
    radial-gradient(circle at 50% -10%, rgba(22, 200, 243, .06), transparent 44%),
    #fff;
}

.how-it-works .section-head {
  justify-content: center;
  text-align: center;
  margin-bottom: 36px;
}

.how-it-works .section-head > div {
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 560px;
  margin: 0 auto;
}

.step-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.step-card:nth-child(1) .step-number {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(6, 73, 149, .2);
}

.step-card:nth-child(2) .step-number {
  background: linear-gradient(135deg, var(--brand-2), var(--cyan));
  box-shadow: 0 8px 18px rgba(7, 130, 203, .2);
}

.step-card:nth-child(3) .step-number {
  background: linear-gradient(135deg, #0e8f6a, var(--green));
  box-shadow: 0 8px 18px rgba(21, 168, 131, .2);
}

.step-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.step-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Conector entre pasos */
.steps-grid .step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 42px;
  top: 100%;
  width: 2px;
  height: 24px;
  background: linear-gradient(180deg, var(--brand-2), var(--cyan));
  opacity: .3;
}

/* ============================================================
   4. SERVICIOS — Bento grid de 6 servicios con iconos
   ============================================================ */

.services-grid-section {
  padding: 56px 0;
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.services-grid-section .section-head {
  justify-content: center;
  text-align: center;
  margin-bottom: 32px;
}

.services-grid-section .section-head > div {
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.bento-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  min-height: 170px;
}

.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #b8d4ee;
}

.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 2px 2px;
}

/* Colores por tarjeta */
.bento-card:nth-child(1)::before { background: var(--brand); }
.bento-card:nth-child(2)::before { background: var(--brand-2); }
.bento-card:nth-child(3)::before { background: var(--cyan); }
.bento-card:nth-child(4)::before { background: var(--amber); }
.bento-card:nth-child(5)::before { background: var(--green); }
.bento-card:nth-child(6)::before { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.bento-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.bento-card:nth-child(1) .bento-icon { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.bento-card:nth-child(2) .bento-icon { background: linear-gradient(135deg, var(--brand-2), var(--cyan)); }
.bento-card:nth-child(3) .bento-icon { background: linear-gradient(135deg, #0e7aaa, var(--cyan)); }
.bento-card:nth-child(4) .bento-icon { background: linear-gradient(135deg, #c88712, var(--amber)); color: #2b1d00; }
.bento-card:nth-child(5) .bento-icon { background: linear-gradient(135deg, #128f72, var(--green)); }
.bento-card:nth-child(6) .bento-icon { background: linear-gradient(135deg, var(--brand), #0a5eaa); }

.bento-icon svg {
  width: 22px;
  height: 22px;
}

.bento-card h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 800;
}

.bento-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bento-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-2);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: gap .2s ease;
}

.bento-card:hover .bento-link {
  gap: 6px;
}

/* ============================================================
   5. TESTIMONIOS — 3 cards con avatares placeholder
   ============================================================ */

.testimonials-section {
  padding: 56px 0 48px;
  background:
    radial-gradient(circle at 0% 100%, rgba(7, 130, 203, .05), transparent 40%),
    #fff;
}

.testimonials-section .section-head {
  justify-content: center;
  text-align: center;
  margin-bottom: 32px;
}

.testimonials-section .section-head > div {
  margin: 0 auto;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
}

.testimonial-card {
  display: grid;
  gap: 16px;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  color: var(--amber);
}

.testimonial-stars svg {
  width: 18px;
  height: 18px;
}

.testimonial-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  font-style: italic;
  position: relative;
  padding-left: 18px;
}

.testimonial-text::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -4px;
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-2);
  opacity: .4;
  line-height: 1;
  font-style: normal;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.testimonial-card:nth-child(1) .testimonial-avatar { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.testimonial-card:nth-child(2) .testimonial-avatar { background: linear-gradient(135deg, var(--green), #0e8f6a); }
.testimonial-card:nth-child(3) .testimonial-avatar { background: linear-gradient(135deg, var(--amber), #d4911a); color: #2b1d00; }

.testimonial-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.testimonial-role {
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   6. PORTALES — Ajustes sutiles para las 3 cards de portal
   Mantener todo lo bueno, refinar espaciado
   ============================================================ */

.portal-paths {
  padding-top: 56px;
  padding-bottom: 56px;
}

.portal-paths .section-head {
  margin-bottom: 32px;
}

/* ============================================================
   7. CTA BAND — Texto actualizado, mantener diseño
   ============================================================ */

.cta-band {
  margin: 0 0 56px;
}

.cta-band p {
  max-width: 44ch;
}

/* ============================================================
   8. RESPONSIVE — Media queries
   ============================================================ */

/* Tablet: 600px+ */
@media (min-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stats-item {
    padding: 26px 14px;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
    gap: 16px;
  }

  .step-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    text-align: center;
    justify-items: center;
  }

  .step-number {
    margin-bottom: 4px;
  }

  .steps-grid .step-card:not(:last-child)::after {
    left: auto;
    top: 42px;
    right: -20px;
    width: 40px;
    height: 2px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }
}

/* Desktop: 920px+ */
@media (min-width: 920px) {
  .hero {
    padding: 48px 0 52px;
  }

  .hero-grid {
    gap: 54px;
  }

  .hero-placeholder {
    min-height: 378px;
  }

  .hero-placeholder-inner svg {
    width: 100px;
    height: 100px;
  }

  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  /* Bento: la primera card destacada ocupa 2 columnas */
  .bento-card:first-child {
    grid-column: span 2;
    grid-template-columns: auto 1fr;
    grid-auto-flow: column;
    align-items: center;
    gap: 20px;
    padding: 28px 26px;
  }

  .bento-card:first-child .bento-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .bento-card:first-child .bento-icon svg {
    width: 28px;
    height: 28px;
  }

  .step-card {
    padding: 26px 22px;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
}

/* Ajustes para pantallas muy pequeñas (360px) */
@media (max-width: 380px) {
  .hero-trust {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-trust span {
    font-size: 12px;
  }

  .stats-item {
    padding: 18px 10px;
  }

  .stats-number {
    font-size: 1.5rem;
  }

  .stats-label {
    font-size: 10px;
  }

  .bento-card {
    padding: 18px 16px;
    min-height: 150px;
  }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .step-card,
  .bento-card,
  .testimonial-card {
    transition: none !important;
  }
}
