.history-timeline {

    position: relative;
    padding: 140px 80px 10px;
    overflow: hidden;

}

/* LINEA */

.history-timeline::before {

    content: "";

    position: absolute;

    left: 50px;
    right: 50px;

    top: 370px;

    height: 1px;

    background: #111;

    z-index: 1;

}
/* SLIDE */

.history-timeline .swiper-slide {
    position: relative;
    height: 400px;
}
/* CARD */

.history-card {

    background: #003b7a;
    color: white;
	border: 2px solid #00A19A;
    border-radius: 22px;

    padding: 20px;

    max-width: 300px;

    position: absolute;

    left: 20%; /*Importante para situar los puntos y la caja */

    bottom: 225px;

    transform: translateX(-50%);

    min-height: 110px;

    width: 100%;

    transition:
        min-height .45s ease,
        transform .45s ease;

    z-index: 5;

}

/* FLECHA */

.history-card::after {

    content: "";

    position: absolute;

    bottom: -16px;
    left: 50%; /*Importante para situar los puntos y la caja */

    transform: translateX(-50%);

    border-width: 16px 16px 0;

    border-style: solid;

    border-color: #003b7a transparent transparent;

}

/* TITULO */

.history-card h3 {

    color: white;
    margin-bottom: 0;

    font-size: 1.375rem;


}

/* TEXTO */

.history-content {

    max-height: 0;

    overflow: hidden;

    opacity: 0;

    transition:
        all .45s ease;

}
.history-content p {

    font-size: 0.875rem;

}


/* TIMELINE SELECCIONADO */

.timeline-selected .history-card {
    min-height: 260px;
}

.timeline-selected .history-content {
    max-height: 300px;
    opacity: 1;
    margin-top: 10px;
}

.timeline-selected .history-dot {
    box-shadow:
        0 0 0 15px rgba(0, 213, 239, 0.15);
}


/* DOT */

.history-dot {

    width: 28px;
    height: 28px;

    border-radius: 50%;

    background: #003b7a;

    border: 4px solid #00d5ef;

    position: absolute;

	left: 20%; /*Importante para situar los puntos y la caja */

    top: 230px;

    transform: translate(-50%, -50%);

    z-index: 10;

}


/* YEAR */

.history-year {

    position: absolute;

    top: 285px;

   	left: 20%; /*Importante para situar los puntos y la caja */


    transform: translateX(-50%);

    font-weight: 700;

    color: #003b7a;

}

/* FLECHAS */

.timeline-prev,
.timeline-next {

    position: absolute;

    top: 358px;

    transform: translateY(-50%);

    z-index: 10;

    cursor: pointer;

    color: #003b7a;

    font-size: 64px;

}

.timeline-prev {

    left: 0;

}

.timeline-next {

    right: 0;

}

/* Los iconos nativos de Swiper */
.timeline-prev::after,
.timeline-next::after {
    font-family: swiper-icons;
    font-size: var(--swiper-navigation-size, 44px);
    text-transform: none !important;
    letter-spacing: 0;
    font-variant: initial;
    line-height: 1;
}

.timeline-prev::after {
    content: 'prev';
}

.timeline-next::after {
    content: 'next';
}

/* Opcional: personalizar color y tamaño */
.timeline-prev::after,
.timeline-next::after {
    color: #your-color;  /* Cambia por tu color */
    font-size: 30px;     /* Ajusta el tamaño */
}

/* Hover effect (opcional) */
.timeline-prev:hover::after,
.timeline-next:hover::after {
    color: #your-hover-color;
}



/* RESPONSIVE */

@media(max-width: 991px){

    .history-timeline {

        padding: 140px 40px 80px;

    }

    .history-card {

        max-width: 100%;

    }

}

/* ============================================
   RESPONSIVE - TABLET GRANDE (991px - 769px)
   ============================================ */
@media(max-width: 991px) {
    .history-timeline {
        padding: 140px 40px 80px;
    }

    .history-card {
        max-width: 80%;
        left: 50%; /* Centrado */
        bottom: 200px;
        min-height: 100px;
    }

    .history-dot {
        left: 50%; /* Centrado */
        top: 200px;
        width: 24px;
        height: 24px;
        border-width: 3px;
    }

    .history-year {
        left: 50%; /* Centrado */
        top: 250px;
        font-size: 1.1rem;
    }

    .history-timeline::before {
        left: 30px;
        right: 30px;
        top: 340px;
    }

    .history-timeline .swiper-slide {
        height: 380px;
    }

    .timeline-prev,
    .timeline-next {
        top: 330px;
        font-size: 48px;
    }
}

/* ============================================
   RESPONSIVE - TABLET PEQUEÑA (768px - 577px)
   ============================================ */
@media(max-width: 768px) {
    .history-timeline {
        padding: 120px 30px 60px;
    }

    .history-card {
        max-width: 85%;
        left: 50%;
        bottom: 160px;
        padding: 16px;
        min-height: 90px;
        border-radius: 18px;
    }

    .history-card h3 {
        font-size: 1.2rem;
    }

    .history-content p {
        font-size: 0.8rem;
    }

    .history-dot {
        left: 50%;
        top: 160px;
        width: 20px;
        height: 20px;
        border-width: 3px;
    }

    .history-year {
        left: 50%;
        top: 200px;
        font-size: 1rem;
    }

    .history-timeline::before {
        left: 20px;
        right: 20px;
        top: 280px;
    }

    .history-timeline .swiper-slide {
        height: 340px;
    }

    .history-card::after {
        bottom: -14px;
        border-width: 14px 14px 0;
    }

    .timeline-selected .history-card {
        min-height: 220px;
    }

    .timeline-prev,
    .timeline-next {
        top: 270px;
        font-size: 36px;
    }

    .timeline-prev::after,
    .timeline-next::after {
        font-size: 24px;
    }
}

/* ============================================
   RESPONSIVE - MÓVIL (576px - 376px)
   ============================================ */
@media(max-width: 576px) {
    .history-timeline {
        padding: 100px 15px 50px;
    }

    .history-card {
        max-width: 92%;
        left: 50%;
        bottom: 130px;
        padding: 14px;
        min-height: 80px;
        border-radius: 14px;
    }

    .history-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .history-content p {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }

    .history-dot {
        left: 50%;
        top: 130px;
        width: 18px;
        height: 18px;
        border-width: 3px;
    }

    .history-year {
        left: 50%;
        top: 165px;
        font-size: 0.9rem;
    }

    .history-timeline::before {
        left: 15px;
        right: 15px;
        top: 230px;
    }

    .history-timeline .swiper-slide {
        height: 240px !important;
    }

    .history-card::after {
        bottom: -12px;
        border-width: 12px 12px 0;
    }

    .timeline-selected .history-card {
        min-height: 200px;
    }

    .timeline-selected .history-content {
        max-height: 250px;
    }

    .timeline-prev,
    .timeline-next {
        top: 220px;
        font-size: 28px;
        padding: 0 5px;
    }

    .timeline-prev::after,
    .timeline-next::after {
        font-size: 18px;
    }
}

/* ============================================
   RESPONSIVE - MÓVIL MUY PEQUEÑO (375px - 320px)
   ============================================ */
@media(max-width: 375px) {
    .history-timeline {
        padding: 40px 10px 40px;
    }

    /* CARD - Aumentamos el bottom para que suba */
    .history-card {
        max-width: 95%;
        left: 50%;
        bottom: 85px; /* Aumentado de 50px a 120px */
        padding: 12px;
        min-height: 70px;
        border-radius: 12px;
    }

    .history-card h3 {
        font-size: 1rem;
    }

    .history-content p {
        font-size: 0.7rem;
    }

    /* DOT - Subimos el dot */
    .history-dot {
        left: 50%;
        top: 180px; /* Aumentado de 50px a 120px */
        width: 16px;
        height: 16px;
        border-width: 2px;
    }

    /* YEAR - Subimos el año */
    .history-year {
        left: 50%;
        top: 215px; /* Aumentado de 75px a 145px */
        font-size: 0.8rem;
    }

    /* LINEA - La bajamos para que quede debajo de la card */
    .history-timeline::before {
        left: 10px;
        right: 10px;
        top: 220px; /* Aumentado de 150px a 220px */
    }

    /* SLIDE - Aumentamos la altura para dar espacio */
    .history-timeline .swiper-slide {
        height: 280px; /* Aumentado de 200px a 280px */
    }

    .history-card::after {
        bottom: -10px;
        border-width: 10px 10px 0;
    }

    .timeline-selected .history-card {
        min-height: 180px;
    }

    /* FLECHAS - Las bajamos también */
    .timeline-prev,
    .timeline-next {
        top: 218px; /* Aumentado de 140px a 210px */
        font-size: 22px;
        padding: 0 3px;
    }

    .timeline-prev::after,
    .timeline-next::after {
        font-size: 16px;
    }
}
