/* ============================================================
   Solucion iSAT - Timeline horizontal conectado
   Inspirado en el estilo corporativo de objetivos.html
   ============================================================ */

/* Seccion */
.sol-section {
  padding: 0 0 4rem 0;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.sol-section.sol-dark {
  background: #0f172a; /* slate-900 */
}

/* Decoración de fondo para el modo oscuro */
.sol-bg-decor {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.1;
  color: #fff;
}
.sol-dark .sol-bg-decor {
  display: block;
}
.sol-bg-decor > i:nth-child(1) {
  position: absolute;
  top: 2.5rem;
  left: 2.5rem;
  font-size: 8rem;
}
.sol-bg-decor > i:nth-child(2) {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  font-size: 6rem;
}

/* Encabezado sin fondo */
.sol-header {
  padding: 3rem 2rem 2.5rem;
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
}
.sol-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.75rem;
}
.sol-dark .sol-eyebrow {
  color: #60a5fa; /* blue-400 */
}

.sol-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.sol-dark .sol-heading {
  color: #ffffff;
}

.sol-subtitle {
  font-size: 1.1rem;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.sol-dark .sol-subtitle {
  color: #e2e8f0; /* gray-200 */
}

.sol-description {
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.65;
  max-width: 42rem;
  margin: 0.5rem auto 0;
}
.sol-dark .sol-description {
  color: #9ca3af; /* gray-400 */
}

/* Banner interno detrás del texto (para emular el rediseño oscuro) */
.sol-dark .sol-header-inner {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin-top: 1rem;
}

/* Timeline */
.sol-timeline {
  position: relative;
  display: grid;
  /* La variable --sol-cols la inyecta el HTML segun el n. de pasos (por ej: 4) para que siempre quede centrado */
  grid-template-columns: repeat(var(--sol-cols, 5), minmax(0, 300px));
  justify-content: center;
  gap: 0;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Linea horizontal */
.sol-timeline__line {
  position: absolute;
  top: 2.75rem;
  /* Calcula matematicamente desde el centro del primer elemento hasta el centro del ultimo */
  left: calc(50% - (var(--sol-cols, 5) * 300px / 2) + 150px);
  right: calc(50% - (var(--sol-cols, 5) * 300px / 2) + 150px);
  /* Fallbacks seguros por si flex reduce mucho las cajas en pantallas medias */
  max-width: calc(100% - 4rem - (100% / var(--sol-cols, 5)));
  margin: 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #bfdbfe, #3b82f6, #1d4ed8, #3b82f6, #bfdbfe);
  z-index: 0;
}

/* Cada paso */
.sol-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0.75rem;
  position: relative;
  z-index: 1;
}
.sol-step__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* Burbuja del icono */
.sol-step__bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 18px rgba(37,99,235,0.35);
  border: 3px solid #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  z-index: 2;
}
.sol-dark .sol-step__bubble {
  border-color: #0f172a; /* matches bg */
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.sol-step:hover .sol-step__bubble {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 28px rgba(37,99,235,0.45);
}

/* Numero */
.sol-step__num {
  font-size: 0.68rem;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.1em;
  margin-top: 0.4rem;
  text-transform: uppercase;
}

/* Cuerpo */
.sol-step__body {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-top: 3px solid #3b82f6;
  border-radius: 0.875rem;
  padding: 1.25rem 1rem;
  width: 100%;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.sol-dark .sol-step__body {
  background: #1e293b; /* slate-800 */
  border-color: #334155; /* slate-700 */
}

.sol-step:hover .sol-step__body {
  box-shadow: 0 8px 24px rgba(37,99,235,0.1);
  transform: translateY(-2px);
}
.sol-dark .sol-step:hover .sol-step__body {
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.sol-step__img-wrap {
  width: 100%;
  height: 120px;
  background-color: #f1f5f9;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sol-dark .sol-step__img-wrap {
  background-color: rgba(51, 65, 85, 0.5); /* slate-700/50 */
}

.sol-step__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}
.sol-step__img-wrap:hover .sol-step__img {
  transform: scale(1.05); /* Efectito sutil pre-click */
}

.sol-step__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.sol-dark .sol-step__title {
  color: #ffffff;
}

.sol-step__desc {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.55;
}
.sol-dark .sol-step__desc {
  color: #9ca3af;
}

/* CTA */
.sol-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #2563eb;
  color: #ffffff;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}
.sol-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 8px 22px rgba(37,99,235,0.4);
  transform: translateY(-2px);
  color: #ffffff;
}

/* Responsive */
@media (max-width: 1100px) {
  .sol-timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 1rem;
  }
  .sol-timeline__line { display: none; }
}
@media (max-width: 700px) {
  .sol-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
  }
}
@media (max-width: 540px) {
  .sol-timeline { grid-template-columns: 1fr; gap: 1.5rem; }
}