/* ==========================================================================
   Estilos para Componentes de Historia
   ========================================================================== */

/* Sección de Indicadores */
.seccion-indicadores {
    background: linear-gradient(90deg, #00B1E0 0%, #1241B7 100%);
    position: relative;
    overflow: hidden;
}

.seccion-indicadores::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.indicador-card {
    color: #fff;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
}

.indicador-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}


.numero-indicador .numero {
    color: #fff;
    line-height: 1;
}

/* Ajuste especial para el primer indicador con "Fundada en" */
.indicador-card:first-child .numero-indicador .numero {
    font-size: 60px;
    line-height: 1.2;
}

/* Estilos específicos para el texto "Fundada en" */
.fundada-en-texto {
    display: block;
    font-size: 24px;
    font-weight: 300;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.fundada-en-texto::before,
.fundada-en-texto::after {
    content: none !important;
}

.titulo-indicador {
    font-size: 30px;

    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.descripcion-indicador {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Media queries para móvil - Layout 2+1 para indicadores */
/* Media Query específica para zoom 150% en Windows */
@media only screen and (min-width: 853px) and (max-width: 854px) {
    .historia-container {
        padding: 15px;
        max-width: 800px;
    }

    .historia-timeline {
        padding: 15px;
    }

    .timeline-item {
        padding: 15px;
        margin-bottom: 15px;
    }

    .timeline-year {
        font-size: 1.2rem;
    }

    .timeline-content {
        font-size: 0.9rem;
    }

    .historia-hero {
        padding: 30px 15px;
    }

    .historia-hero h1 {
        font-size: 2rem;
    }

    .historia-hero p {
        font-size: 1rem;
    }

    .historia-section {
        padding: 30px 15px;
    }

    .historia-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .historia-card h3 {
        font-size: 1.1rem;
    }

    .historia-card p {
        font-size: 0.9rem;
    }

    .historia-image {
        max-height: 200px;
    }
}

@media (max-width: 767.98px) {
    .seccion-indicadores .row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .seccion-indicadores .col-md-3.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 10px;
        margin-bottom: 20px;
    }

    /* El tercer indicador (y subsecuentes impares) se centran */
    .seccion-indicadores .col-md-3.col-sm-6:nth-child(3),
    .seccion-indicadores .col-md-3.col-sm-6:nth-child(5),
    .seccion-indicadores .col-md-3.col-sm-6:nth-child(7) {
        flex: 0 0 50%;
        max-width: 50%;
        margin-left: 25%;
        margin-right: 25%;
    }
}

/* Sección Timeline */
.seccion-timeline {
    background: #fff;
    position: relative;
}

.titulo-timeline {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.subtitulo-timeline {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(0, 94, 184, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
    padding: 0 2rem;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-content {
    background: rgba(244, 248, 250, 1);
    border-radius: 15px;
    box-shadow: 0px 10px 20px 0px rgba(0, 33, 105, 0.15);
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    width: 300px;
    height: 330px;
    margin: 0 auto;
}

.contenido-card-historia {
    padding-top: 25px;
    padding-left: 20px;
    padding-right: 20px;
}

.timeline-content img {
    border-radius: 13px 13px 0px 0px;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(0, 94, 184, 1);
    margin-bottom: 0.5rem;
    display: inline-block;
    border-radius: 20px;
    display: flex;
    justify-content: normal;
}


.timeline-description {
    color: #666;
    line-height: 1.6;
    font-size: 0.8rem;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    top: 2rem;
    width: 20px;
    height: 20px;
    background: #007bff;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
    z-index: 10;
}

.timeline-item.left .timeline-marker {
    right: -2.5rem;
}

.timeline-item.right .timeline-marker {
    left: -2.5rem;
}


/* Flechas de conexión */


.timeline-item.right .timeline-content::before {
    left: -30px;
    border-right-color: #fff;
}


/* Responsive Design */
@media (max-width: 768px) {
    .timeline-line {
        left: 2rem;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left;
        padding-left: 4rem;
        padding-right: 1rem;
    }

    .timeline-marker {
        left: 1.25rem !important;
        right: auto !important;
    }

    .timeline-content::before {
        left: -30px !important;
        right: auto !important;
        border-right-color: #fff !important;
        border-left-color: transparent !important;
    }


    .titulo-timeline {
        font-size: 2rem;
    }

    .numero-indicador .numero {
        font-size: 2.5rem;
    }

    .indicador-card {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-line {
        left: 1.5rem;
    }

    .timeline-marker {
        left: 0.75rem !important;
    }

    .titulo-timeline {
        font-size: 1.75rem;
    }


}

/* Animaciones adicionales */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.timeline-marker {
    animation: pulse 2s infinite;
}


/* Efectos de hover mejorados */
.timeline-content {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.indicador-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.historia-timeline .year {
    font-size: 1.25rem;
    font-weight: 700;
    color: #005eb8;
}

.historia-timeline .event-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.historia-timeline .event-description {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.historia-stats .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #005eb8;
}

.historia-stats .stat-label {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
}