/* /agencias — ESTILOS ESPECÍFICOS POR SECCIÓN
   Problemas, Servicios y Modelo sólo usan las tarjetas de base.css
   (Garantías tiene su propio bento en garantias.css). Aquí va lo propio de cada sección, agrupado por bloque para
   poder borrarlo junto con su componente cuando se sustituya. */

/* ── PROCESO (AgenciasProceso) ─────────────────────────────────────── */
.ag-proceso__timeline {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 760px;
  list-style: none;
}

.ag-proceso__timeline::before {
  content: '';
  position: absolute;
  top: 38px;
  bottom: 0;
  left: 17px;
  width: 1px;
  background: linear-gradient(var(--ag-accent), var(--ag-border-soft));
  pointer-events: none;
}

.ag-proceso__paso {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: clamp(12px, 2.5vw, 24px);
}

.ag-proceso__nodo {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: 20px;
  border: 1px solid rgba(200, 184, 149, calc(0.25 + 0.35 * var(--ag-proceso-luz-nodo, 1)));
  border-radius: 50%;
  background: #181611;
  box-shadow: 0 0 16px rgba(209, 138, 61, calc(0.22 * var(--ag-proceso-luz-nodo, 1)));
  color: var(--ag-accent-hover);
  font: 600 12px/1 'Courier New', Courier, monospace;
}

.ag-proceso__texto {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: clamp(16px, 3vw, 23px);
}

.ag-proceso__texto .ag-card__texto {
  font-size: 15px;
  line-height: 1.55;
}

.ag-proceso--horizontal .ag-proceso__escena {
  position: sticky;
  top: calc(var(--ag-nav-h) + 16px);
}

.ag-proceso--horizontal::after {
  content: '';
  display: block;
  height: var(--ag-proceso-recorrido, 440px);
}

.ag-proceso--horizontal .ag-proceso__ventana {
  overflow: clip;
}

.ag-proceso--horizontal .ag-encabezado {
  margin-bottom: 28px;
}

.ag-proceso--horizontal .ag-nota {
  max-width: none;
  margin-top: 18px;
}

.ag-proceso--horizontal .ag-proceso__timeline {
  --ag-proceso-ancho-paso: clamp(300px, 29vw, 350px);
  --ag-proceso-eje: 40px;
  display: flex;
  gap: 28px;
  width: max-content;
  max-width: none;
  transform: translateX(var(--ag-proceso-x, 0px));
}

.ag-proceso--horizontal .ag-proceso__timeline::before,
.ag-proceso--horizontal .ag-proceso__timeline::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(var(--ag-proceso-ancho-paso) - var(--ag-proceso-eje));
  bottom: auto;
  left: var(--ag-proceso-eje);
  width: auto;
  height: 1px;
  background: var(--ag-border);
  pointer-events: none;
}

.ag-proceso--horizontal .ag-proceso__timeline::after {
  background: linear-gradient(90deg, var(--ag-accent), #d18a3d);
  transform: scaleX(var(--ag-proceso-avance, 0));
  transform-origin: left center;
}

.ag-proceso--horizontal .ag-proceso__paso {
  flex: 0 0 var(--ag-proceso-ancho-paso);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr 36px 1fr;
  gap: 0;
  min-height: 326px;
}

.ag-proceso--horizontal .ag-proceso__nodo {
  grid-row: 2;
  margin: 0 0 0 calc(var(--ag-proceso-eje) - 18px);
}

.ag-proceso--horizontal .ag-proceso__texto {
  position: relative;
  grid-row: 1;
  align-self: end;
  margin-bottom: 18px;
  padding: 18px 23px;
}

.ag-proceso--horizontal .ag-proceso__texto::after {
  content: '';
  position: absolute;
  bottom: -19px;
  left: calc(var(--ag-proceso-eje) - 1px);
  width: 1px;
  height: 18px;
  background: var(--ag-border);
}

.ag-proceso--horizontal .ag-proceso__paso:nth-child(even) .ag-proceso__texto {
  grid-row: 3;
  align-self: start;
  margin: 18px 0 0;
}

.ag-proceso--horizontal .ag-proceso__paso:nth-child(even) .ag-proceso__texto::after {
  top: -19px;
  bottom: auto;
}

/* ── TESTIMONIO (AgenciasTestimonio) ───────────────────────────────── */
.ag-testimonio {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 24px;
  border-left: 2px solid var(--ag-accent);
}

.ag-testimonio__cita p {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.4;
  color: var(--ag-heading);
}

.ag-testimonio__autor {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.ag-testimonio__nombre {
  font-weight: 600;
  color: var(--ag-heading);
}

.ag-testimonio__cargo {
  color: var(--ag-muted);
}

/* ── ESTÁNDAR (AgenciasEstandar) → styles/agencias/estandar.css ─────── */

/* ── CIERRE (AgenciasCierre) ───────────────────────────────────────── */
.ag-cierre {
  text-align: center;
}

.ag-cierre .ag-h2 {
  margin: 0 auto;
}

.ag-cierre__texto {
  margin: 20px auto 0;
  max-width: 54ch;
  font-size: 1.0625rem;
  color: var(--ag-muted);
}

.ag-cierre__acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.ag-cierre__correo {
  margin-top: 20px;
  color: var(--ag-muted);
}

@media (max-width: 479px) {
  .ag-cierre__acciones .ag-btn {
    width: 100%;
  }
}

/* ── FOOTER (components/Footer.jsx + styles/footer.css, los de la home) ──
   Sólo lo necesario para que se vea igual que en la home. Las capas
   (z-index sobre el fondo fijo) están en base.css. */

/* Sin base propia: como en la home (donde deja ver ParticleBackground),
   detrás del footer se ve el fondo procedural, el mismo estado A que en
   el resto de la página. */

/* .ag-page img (base.css) gana en especificidad a .footer-logo-img y le
   pondría height: auto (el logo saldría a su tamaño natural). */
.ag-page .footer-logo-img {
  height: 64px;
  max-width: none;
}

/* En la home, styles/responsive.css (que esta página no carga) centra el
   texto del footer hasta 900px con la regla `footer { text-align: center }`. */
@media (max-width: 900px) {
  .ag-page .footer-root {
    text-align: center;
  }
}
