/* ==========================================================
   CSS PARA LÍNEA DE TIEMPO (experiences.css) - DEFINITIVO
   ========================================================== */
html, body {
    height: auto !important;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-y: scroll !important; /* Fuerza la barra de desplazamiento vertical */
}

body {
    background-color: #f4f6f8;
    color: #222222;
}

.experiences-body {
    max-width: 1050px;
    margin: 0 auto;
    /* Subimos el padding superior a 120px para dar espacio al menú fijo en escritorio */
    padding: 120px 20px 40px 20px;
    box-sizing: border-box;
    width: 100%;
    overflow: visible;
}

/* ==========================================================
   ESTILO DE CABECERA AZUL CON BARRA AMARILLA
   ========================================================== */
.section-header-blue {
    background-color: #0b2545;
    padding: 18px 24px;
    border-radius: 8px;
    margin-bottom: 35px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

    .section-header-blue h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        font-family: 'Montserrat', sans-serif;
        color: #ffffff;
        display: flex;
        align-items: center;
        gap: 12px;
    }

        .section-header-blue h2::before {
            content: "";
            display: inline-block;
            width: 4px;
            height: 22px;
            background-color: #f7c331; /* Barra amarilla corporativa */
            border-radius: 2px;
        }

/* Cuadrícula de 3 columnas (Izquierda | Línea central | Derecha) */
.experiences-grid {
    display: grid;
    grid-template-columns: 1fr 6px 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    padding-top: 25px;
    overflow: visible;
}

/* Tarjeta de experiencia base */
.experience {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    margin-bottom: 35px;
    box-sizing: border-box;
}

/* ==========================================================
   NÚMEROS EN UNA SOLA DIRECCIÓN (Esquina superior izquierda)
   ========================================================== */
.experience-number {
    position: absolute;
    top: -18px;
    left: -18px;
    right: auto;
    background-color: #0b2545 !important;
    color: #ffffff !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 99;
}

/* Línea vertical central */
.line {
    background-color: #cbd5e1;
    width: 4px;
    height: 100%;
    justify-self: center;
    border-radius: 2px;
}

/* Textos internos */
.experience-date {
    font-size: 13px;
    color: #0b2545;
    font-weight: 700;
    margin-bottom: 6px;
    margin-left: 0;
}

.experience-company {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111111;
}

.experience-position {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333333;
}

.experience-description {
    font-size: 13px;
    line-height: 1.5;
    color: #555555;
    word-break: break-word;
}

.empty {
    grid-column: span 1;
}

/* ==========================================================
   DISEÑO RESPONSIVE PARA MÓVILES (< 768px) - 1 SOLA COLUMNA
   ========================================================== */
@media (max-width: 768px) {
    html, body {
        overflow-y: auto !important;
    }

    /* Espacio superior para móviles */
    .experiences-body {
        padding-top: 110px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* FORZAMOS UNA SOLA COLUMNA */
    .experiences-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 25px !important;
        padding-top: 20px !important;
    }

    .line,
    .empty {
        display: none !important;
    }

    .experience {
        width: 100% !important;
        margin-top: 20px !important;
        margin-bottom: 10px !important;
        box-sizing: border-box !important;
    }

    /* Posición corregida para que el círculo nunca se corte */
    .experience-number {
        top: -16px !important;
        left: 15px !important;
        right: auto !important;
    }

    .experience-date {
        margin-left: 0 !important;
    }
}
