/*
|--------------------------------------------------------------------------
| HOME — NUEVE EJES, PIRÁMIDE 4 / 3 / 2
|--------------------------------------------------------------------------
| Complementa plan.css sin reemplazarlo.
*/

.plan__grid {
    align-items: stretch;
}

.plan__card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 320px;
    overflow: hidden;
    text-align: center;
    transition:
        transform .28s ease,
        box-shadow .28s ease,
        border-color .28s ease;
}

.plan__card-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.plan__card-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    margin-right: auto;
    margin-left: auto;
    transition: transform .28s ease;
}

.plan__card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 100%;
    min-height: 2.5rem;
    text-align: center;
    line-height: 1.15;
}

.plan__card-text {
    width: 100%;
    max-width: 18rem;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.plan__card-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 2.65rem;
    margin-top: auto;
    padding: .72rem 1rem;
    border: 2px solid #0057b8;
    border-radius: 999px;
    color: #0057b8;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    transition:
        transform .22s ease,
        color .22s ease,
        background-color .22s ease,
        border-color .22s ease;
}

.plan__card-more i {
    transition: transform .22s ease;
}

/* Infraestructura se mantiene en una sola línea en pantallas amplias. */
.plan__card:nth-child(8) .plan__card-title,
.plan__card:nth-child(8) .plan__card-keyword {
    white-space: nowrap;
}

.plan__card:nth-child(8) .plan__card-title {
    font-size: clamp(.82rem, 1.2vw, 1rem);
}

@media (hover: hover) and (pointer: fine) {
    .plan__card:hover {
        transform: translateY(-7px);
        border-color: rgba(0, 87, 184, .22);
        box-shadow: 0 22px 48px rgba(7, 59, 120, .13);
    }

    .plan__card:hover .plan__card-icon {
        transform: translateY(-3px) scale(1.07);
    }

    .plan__card:hover .plan__card-more {
        border-color: #ffad00;
        background: #ffad00;
        color: #0057b8;
        transform: translateY(-2px);
    }

    .plan__card:hover .plan__card-more i {
        transform: translateX(4px);
    }
}

/* PC: 4 / 3 / 2 perfectamente centrado. */
@media (min-width: 1024px) {
    .plan__grid {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 1.5rem;
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
    }

    .plan__card:nth-child(1) { grid-column: 1 / span 3; }
    .plan__card:nth-child(2) { grid-column: 4 / span 3; }
    .plan__card:nth-child(3) { grid-column: 7 / span 3; }
    .plan__card:nth-child(4) { grid-column: 10 / span 3; }

    .plan__card:nth-child(5) { grid-column: 2 / span 3; }
    .plan__card:nth-child(6) { grid-column: 5 / span 3; }
    .plan__card:nth-child(7) { grid-column: 8 / span 3; }

    .plan__card:nth-child(8) { grid-column: 4 / span 3; }
    .plan__card:nth-child(9) { grid-column: 7 / span 3; }
}

/* Tablet: tres columnas iguales. */
@media (min-width: 700px) and (max-width: 1023px) {
    .plan__grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
        width: 100%;
        margin: 0 auto;
    }

    .plan__card {
        min-height: 310px;
    }

    .plan__card:nth-child(8) .plan__card-title,
    .plan__card:nth-child(8) .plan__card-keyword {
        white-space: normal;
    }
}

/* Celular: una columna, CTA visible y centrado. */
@media (max-width: 699px) {
    .plan__grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        width: 100%;
        margin: 0 auto;
    }

    .plan__card {
        width: 100%;
        max-width: 100%;
        min-height: 330px;
    }

    .plan__card-more {
        width: 100%;
    }

    .plan__card:nth-child(8) .plan__card-title,
    .plan__card:nth-child(8) .plan__card-keyword {
        white-space: normal;
    }

    .plan__card:nth-child(8) .plan__card-title {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plan__card,
    .plan__card-icon,
    .plan__card-more,
    .plan__card-more i {
        transition: none !important;
    }
}

/* Apariciones modernas del Home. */
.home-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity .7s ease,
        transform .7s cubic-bezier(.22, 1, .36, 1);
    transition-delay: var(--home-delay, 0ms);
}

.home-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .home-reveal {
        opacity: 1;
        transform: none;
    }
}
