/* ============================================
   HISTORIA PAGE STYLES
   Estilos específicos para la página de Historia
   ============================================ */

/* Hero Section */
.historia-hero {
    height: 30vh;
    background: linear-gradient(rgba(25, 54, 96, 0.2), rgba(25, 54, 96, 0.2)),
        url('../img/banner_historia.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    margin-top: 120px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(25, 54, 96, 0.85), rgba(45, 74, 115, 0.75));
}

.historia-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.historia-hero h1 {
    font-size: 4em;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.historia-hero p {
    font-size: 1.5em;
    color: var(--primary-yellow);
    font-weight: 600;
}

/* Historia Intro Section */
.historia-intro {
    padding: 80px 0;
    background: white;
}

.intro-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.intro-text h2 {
    color: var(--primary-blue);
    font-size: 2em;
    margin-bottom: 30px;
    line-height: 1.4;
}

.highlight-year {
    color: var(--primary-red);
    font-weight: 800;
    font-size: 1.2em;
}

.intro-text p {
    font-size: 1.15em;
    line-height: 1.9;
    color: var(--dark-gray);
    text-align: justify;
}

.intro-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(25, 54, 96, 0.2);
    height: 400px;
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.intro-image:hover img {
    transform: scale(1.05);
}

/* Madre María Pacis Section */
.madre-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.madre-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 50px;
    align-items: center;
}

.madre-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(25, 54, 96, 0.3);
    border: 5px solid white;
}

.madre-image img {
    width: 100%;
    height: auto;
    display: block;
}

.madre-text p {
    font-size: 1.2em;
    line-height: 1.9;
    color: var(--dark-gray);
    text-align: justify;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* Legacy Section */
.legacy-section {
    padding: 80px 0;
    background: white;
}

.legacy-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.legacy-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(25, 54, 96, 0.2);
    height: 350px;
}

.legacy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.legacy-text p {
    font-size: 1.15em;
    line-height: 1.9;
    color: var(--dark-gray);
    text-align: justify;
}

/* Timeline Section */
.timeline-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--light-gray) 0%, white 100%);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 40px 0;
}

/* Central Line */
.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-blue), var(--light-blue));
    top: 80px;
    bottom: 120px;
    left: 50%;
    margin-left: -2px;
}

/* Timeline Items */
.timeline-item {
    padding: 30px 0;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left {
    left: 0;
    padding-right: 60px;
}

.timeline-item.right {
    left: 50%;
    padding-left: 60px;
}

/* Timeline Content */
.timeline-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 10px 40px rgba(25, 54, 96, 0.2);
    transform: translateY(-5px);
}

/* Timeline Icon */
.timeline-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px white, 0 0 0 8px var(--primary-blue);
    z-index: 10;
}

.timeline-item.left .timeline-icon {
    right: -90px;
}

.timeline-item.right .timeline-icon {
    left: -90px;
}

.timeline-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Timeline Year */
.timeline-year {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(226, 22, 31, 0.3);
}

.timeline-content h3 {
    color: var(--primary-blue);
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.timeline-content p {
    color: var(--dark-gray);
    line-height: 1.8;
    font-size: 1.05em;
    text-align: justify;
}

/* Timeline Final */
.timeline-final {
    position: relative;
    margin-top: 60px;
    padding-top: 40px;
}

.timeline-final::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-yellow);
    border-radius: 50%;
    top: 0;
    left: 50%;
    margin-left: -10px;
    box-shadow: 0 0 0 4px white, 0 0 0 8px var(--primary-blue);
    animation: pulse-final 2s infinite;
}

@keyframes pulse-final {

    0%,
    100% {
        box-shadow: 0 0 0 4px white, 0 0 0 8px var(--primary-blue), 0 0 0 12px rgba(25, 54, 96, 0);
    }

    50% {
        box-shadow: 0 0 0 4px white, 0 0 0 8px var(--primary-blue), 0 0 0 12px rgba(25, 54, 96, 0.5);
    }
}

.final-content {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 40px rgba(25, 54, 96, 0.3);
}

.final-text {
    font-size: 1.2em;
    line-height: 1.9;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.final-images {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding: 0 20px;
}

.final-images img {
    width: 100%;
    max-width: 800px;
    height: 350px;
    object-fit: cover;
    border-radius: 15px;
    border: 4px solid white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 968px) {

    .intro-content,
    .madre-content,
    .legacy-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .madre-content {
        grid-template-columns: 1fr;
    }

    .madre-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .intro-image {
        height: 350px;
    }

    .legacy-image {
        height: 300px;
    }

    /* Timeline Mobile */
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 100px;
        padding-right: 20px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
        padding-left: 100px;
        padding-right: 20px;
    }

    .timeline-item.left .timeline-icon,
    .timeline-item.right .timeline-icon {
        left: 0;
        right: auto;
    }

    .timeline-content {
        margin-left: 0;
    }

    .final-images {
        justify-content: center;
    }

    .final-images img {
        height: 250px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .historia-hero {
        height: 50vh;
        margin-top: 90px;
    }

    .historia-hero h1 {
        font-size: 2.5em;
    }

    .historia-hero p {
        font-size: 1.2em;
    }

    .historia-intro,
    .madre-section,
    .legacy-section {
        padding: 60px 0;
    }

    .intro-text h2 {
        font-size: 1.6em;
    }

    .intro-text p,
    .madre-text p,
    .legacy-text p {
        font-size: 1.05em;
    }

    .madre-text p {
        padding: 30px;
    }

    .timeline-section {
        padding: 60px 0;
    }

    .timeline-content {
        padding: 25px;
    }

    .timeline-content h3 {
        font-size: 1.3em;
    }

    .timeline-icon {
        width: 50px;
        height: 50px;
        position: relative;
        left: auto;
        right: auto;
        margin-bottom: 15px;
    }

    .timeline-item.left .timeline-icon,
    .timeline-item.right .timeline-icon {
        position: absolute;
        left: -25px;
        right: auto;
        top: 30px;
    }

    .final-content {
        padding: 35px;
    }

    .final-text {
        font-size: 1.05em;
    }

    .final-images img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .historia-hero h1 {
        font-size: 2em;
    }

    .intro-image,
    .legacy-image {
        height: 250px;
    }

    .timeline-item {
        padding-left: 90px;
        padding-right: 15px;
    }

    .timeline-item.left,
    .timeline-item.right {
        padding-left: 90px;
        padding-right: 15px;
    }

    .timeline::before {
        left: 25px;
    }

    .timeline-content {
        padding: 20px;
        margin-left: 0;
    }

    .final-images img {
        height: 200px;
        max-width: 100%;
    }
}