/* =============================================================
   megaprofe-historia-ia.css
   ============================================================= */

/* ---------- HERO SIN IMAGEN ---------- */
.mp-historia-ia-hero-inner,
.mp-historia-ia-hero-copy {
    position: relative;
    z-index: 1;
    text-align: center;
}

.mp-historia-ia-hero-copy .mp-title,
.mp-historia-ia-hero-copy .mp-text {
    margin-right: auto;
    margin-left: auto;
}

/* ---------- CONTENIDO EDITORIAL ---------- */
.mp-historia-ia-content {
    background: #FFFFFF;
}

.mp-historia-ia-intro {
    max-width: 960px;
}

.mp-historia-ia-intro p,
.mp-historia-ia-event-copy p {
    color: var(--mp-muted);
    font-size: var(--mp-text-body);
    line-height: 1.75;
}

.mp-historia-ia-intro p {
    margin: 0 0 16px;
}

.mp-historia-ia-intro p:last-child {
    margin-bottom: 0;
}

.mp-historia-ia-heading {
    margin-top: clamp(48px, 7vw, 80px);
}

.mp-historia-ia-heading .mp-section-title {
    font-size: var(--mp-title-section);
}

/* ---------- CRONOLOGÍA ---------- */
.mp-historia-ia-timeline {
    position: relative;
    display: grid;
    gap: 22px;
    margin: 42px 0 0;
    padding: 0 0 0 72px;
    list-style: none;
    counter-reset: mp-history;
}

.mp-historia-ia-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 22px;
    width: 4px;
    background: linear-gradient(var(--mp-dark), var(--mp-primary));
    border-radius: 999px;
}

.mp-historia-ia-event {
    position: relative;
    counter-increment: mp-history;
}

.mp-historia-ia-event::before {
    content: counter(mp-history);
    position: absolute;
    top: 50%;
    left: -72px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #FFFFFF;
    background: var(--mp-dark);
    border: 4px solid #FFFFFF;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.mp-historia-ia-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: clamp(22px, 4vw, 36px);
    align-items: center;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(17, 24, 73, 0.08);
}

.mp-historia-ia-figure {
    position: relative;
    margin: 0;
}

.mp-historia-ia-figure img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 7px;
}

.mp-historia-ia-figure figcaption {
    position: absolute;
    top: 8px;
    left: -8px;
    padding: 6px 9px;
    color: #FFFFFF;
    background: var(--mp-primary);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.mp-historia-ia-event-copy h3 {
    margin: 0;
    color: var(--mp-text);
    font-size: clamp(1.16rem, 2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.35;
}

.mp-historia-ia-event-copy p {
    margin: 10px 0 0;
}

@media (max-width: 680px) {
    .mp-historia-ia-intro,
    .mp-historia-ia-heading {
        text-align: center;
    }

    .mp-historia-ia-timeline {
        gap: 26px;
        margin-top: 32px;
        padding-left: 0;
    }

    .mp-historia-ia-timeline::before,
    .mp-historia-ia-event::before {
        display: none;
    }

    .mp-historia-ia-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
        text-align: center;
    }

    .mp-historia-ia-figure {
        width: min(100%, 240px);
        margin: 0 auto;
    }
}
