:root {
  --fuente-principal: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-institucional: #0078d7;
  --color-texto: #1a2a3a;
}

.btn-3d {
  display: inline-block;
  font-size: 17px;
  font-weight: 450;
  font-family: var(--fuente-principal);
  border: 2px solid #000000;
  cursor: pointer;
  border-radius: 0.75em;
  background-color: #e8e8e8;
  color: #000000;
  padding: 0.75em 1.5em;
  margin: 10px;
  box-shadow: 0 4px 0px #000000;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-3d:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 0px #000000;
  background-color: #f0f0f0;
}

.btn-3d:active {
  transform: translateY(0px);
  box-shadow: 0 0px 0px #000000;
}

.heading-escolar {
  font-size: 28px;
  font-weight: 450;
  font-family: var(--fuente-principal);
  color: var(--color-texto);
  padding-left: 15px;
  border-left: 6px solid var(--color-institucional);
  margin-top: 20px;
  margin-bottom: 15px;
}

/* Contenedor principal */
.caib-cronograma {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: #1f2937;
  background-color: #f8fafc;
  padding: 32px;
  border-radius: 8px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Títulos */
.caib-title {
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 4px;
}

.caib-subtitle {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 24px;
}

/* Tarjetas */
.caib-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.caib-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.caib-card-header h3 {
  font-size: 20px;
  color: #1e3a8a;
  margin: 0;
}

.caib-badge {
  background-color: #e0f2fe;
  color: #0369a1;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

/* Línea de tiempo horizontal */
.timeline-container {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 20px;
  padding: 0 10px;
}

.timeline-line {
  position: absolute;
  top: 25px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: #e2e8f0;
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
  padding: 0 8px;
}

/* Círculos con iconos más grandes */
.step-icon {
  width: 50px;
  height: 50px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  font-size: 20px;
}

/* Textos de los pasos */
.step-info strong {
  display: block;
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 6px;
}

.step-date {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  margin-bottom: 6px;
}

.step-info p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Nota inferior */
.caib-footer-note {
  margin-top: 16px;
  color: #64748b;
  font-size: 13px;
}

/* --- Corrección del ancho y alineación de las líneas --- */
.timeline-container {
    position: relative;
    padding: 0 45px;
}

.timeline-line {
    position: absolute;
    top: 25px;
    left: 45px;
    right: 45px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

/* --- Corrección estricta del tope de la línea azul --- */
.timeline-progress {
    position: absolute;
    top: 25px;
    left: 45px;
    height: 4px;
    background: var(--color-institucional);
    z-index: 1;
    width: 0%;
    transition: width 0.5s ease;
}

/* La parte azul interna de la barra */
.timeline-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--color-institucional);
    width: var(--progress-width, 0%);
    transition: width 0.5s ease;
}

/* --- Estilos para estados dinámicos --- */
.timeline-step.completed .step-icon {
    background-color: var(--color-institucional);
    color: #ffffff;
    border-color: var(--color-institucional);
}

.timeline-step.active .step-icon {
    background-color: #e0f2fe;
    color: var(--color-institucional);
    border-color: var(--color-institucional);
    box-shadow: 0 0 0 4px rgba(0, 120, 215, 0.15);
	animation: caib-pulse 2s infinite ease-in-out;
}

.timeline-step.completed .step-info strong,
.timeline-step.active .step-info strong {
    color: var(--color-institucional);
}

/* --- Estilos para la bifurcación del flujo en paralelo (procesos simultáneos) --- */
.timeline-branch-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.timeline-branch {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.timeline-branch .step-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
    margin-bottom: 8px;
}

/* --- Estilos para el flujo bifurcado en esquema (ramas superior e inferior) --- */
.timeline-step.branched {
    position: relative;
}

/* --- Efecte de palpitació per a l'esfera activa --- */
@keyframes caib-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 120, 215, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0);
    }
}