/* Modal matrícula — compacto, header visible, pie en una fila */
#modalMatricula .modal-container.modal-matricula {
    position: relative;
    max-width: 760px !important;
    width: calc(100% - 1.2rem);
    max-height: min(94vh, 920px);
    padding: 0 !important;
    overflow: hidden;
    border-radius: 22px !important;
    border: none;
    box-shadow: 0 28px 70px rgba(122, 10, 28, 0.24);
    background: #fff !important;
}

#modalMatricula.modal-overlay {
    backdrop-filter: blur(8px);
    background: rgba(74, 5, 16, 0.5) !important;
}

:is(#modalMatricula, .mm-home) .mm-close {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 30;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #64748b;
    background: #f1f5f9;
}

:is(#modalMatricula, .mm-home) .mm-close:hover { color: #C8102E; }

:is(#modalMatricula, .mm-home) .mm-sheet {
    padding: 0.45rem 0.8rem 0.55rem;
    text-align: center;
    max-height: min(94vh, 920px);
    overflow-y: auto;
    background:
        radial-gradient(180px 110px at -8% 108%, rgba(236, 154, 166, 0.35), transparent 70%),
        radial-gradient(200px 120px at 108% -8%, rgba(236, 154, 166, 0.32), transparent 70%),
        #fffafa;
}

:is(#modalMatricula, .mm-home) .mm-headbar {
    display: grid;
    grid-template-columns: 72px 1fr minmax(90px, 120px);
    align-items: center;
    gap: 0.5rem;
    margin: 0 1.6rem 0.45rem 0;
    padding-top: 0.15rem;
}

:is(#modalMatricula, .mm-home) .mm-headbar__logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

:is(#modalMatricula, .mm-home) .mm-headbar__minedu {
    height: 26px;
    width: auto;
    max-width: 118px;
    object-fit: contain;
    justify-self: end;
}

:is(#modalMatricula, .mm-home) .mm-headbar__copy {
    min-width: 0;
    text-align: center;
}

:is(#modalMatricula, .mm-home) .mm-headbar__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
    color: #7a0a1c;
}

:is(#modalMatricula, .mm-home) .mm-headbar__title strong {
    color: #C8102E;
}

:is(#modalMatricula, .mm-home) .mm-headbar__sub {
    margin: 0.12rem 0 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    color: #334155;
}

:is(#modalMatricula, .mm-home) .mm-headbar__sub span {
    color: #b45309;
    font-weight: 800;
}

:is(#modalMatricula, .mm-home) .mm-facts {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0.35rem 0.4rem;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(122, 10, 28, 0.07);
}

:is(#modalMatricula, .mm-home) .mm-facts li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1 1 0;
    min-width: 0;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    padding: 0.2rem 0.4rem;
    border-right: 1px solid #e2e8f0;
}

:is(#modalMatricula, .mm-home) .mm-facts li:last-child { border-right: none; }

:is(#modalMatricula, .mm-home) .mm-facts li i {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
    background: #C8102E;
}

:is(#modalMatricula, .mm-home) .mm-facts__ico--red { background: #C8102E !important; }
:is(#modalMatricula, .mm-home) .mm-facts__ico--blue { background: #C8102E !important; }
:is(#modalMatricula, .mm-home) .mm-facts__ico--gold { background: #eab308 !important; color: #fff !important; }

:is(#modalMatricula, .mm-home) .mm-facts__mod {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.05rem;
    background: #fff;
    border: 1.5px solid #ec9aa6;
    border-radius: 12px;
    padding: 0.2rem 0.7rem;
    color: #7a0a1c;
}

:is(#modalMatricula, .mm-home) .mm-facts__mod small {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
}

:is(#modalMatricula, .mm-home) .mm-facts__mod strong {
    display: block;
    font-size: 13px;
    color: #C8102E;
}

:is(#modalMatricula, .mm-home) .mm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin: 0 0 0.35rem;
    text-align: center;
}

:is(#modalMatricula, .mm-home) .mm-col {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 24px rgba(122, 10, 28, 0.1);
}

:is(#modalMatricula, .mm-home) .mm-col__photo {
    position: relative;
    height: 156px;
    overflow: hidden;
}

:is(#modalMatricula, .mm-home) .mm-col__photo img,
:is(#modalMatricula, .mm-home) .mm-col__photo-fallback {
    width: 100%;
    height: 156px;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

:is(#modalMatricula, .mm-home) .mm-col__photo--phone img { object-position: center 48%; }

:is(#modalMatricula, .mm-home) .mm-col__photo-fallback {
    background: #C8102E;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

:is(#modalMatricula, .mm-home) .mm-col__head {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.55rem;
    text-align: left;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(130, 10, 28, 0.2) 18%, #C8102E);
}

:is(#modalMatricula, .mm-home) .mm-col__head i {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.18);
}

:is(#modalMatricula, .mm-home) .mm-col__head span {
    display: flex;
    flex-direction: column;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

:is(#modalMatricula, .mm-home) .mm-col__head strong {
    font-size: 11px;
    font-weight: 800;
}

:is(#modalMatricula, .mm-home) .mm-col__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 0.45rem;
    align-items: stretch;
}

:is(#modalMatricula, .mm-home) .mm-col__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    padding: 0.55rem 0.65rem 0.7rem;
    text-align: left;
}

:is(#modalMatricula, .mm-home) .mm-col__body--promo {
    background: #fffbeb;
}

:is(#modalMatricula, .mm-home) .mm-col--promo {
    outline: 1px solid #fde68a;
}

:is(#modalMatricula, .mm-home) .mm-col__body .mm-btn {
    align-self: stretch;
    width: 100% !important;
    margin-top: 0.45rem !important;
    padding: 0.42rem 0.5rem;
}

:is(#modalMatricula, .mm-home) .mm-sub {
    margin: 0;
    padding: 0.35rem 0.4rem;
    border-radius: 12px;
    background: #fffafa;
    outline: 1px solid #fbe3e6;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.4rem;
    text-align: left;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

:is(#modalMatricula, .mm-home) .mm-sub__info {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
}

:is(#modalMatricula, .mm-home) .mm-sub--promo {
    background: #fffbeb;
    outline-color: #fde68a;
}

:is(#modalMatricula, .mm-home) .mm-sub__kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #C8102E;
}

:is(#modalMatricula, .mm-home) .mm-sub__extra {
    margin: 0.06rem 0 0;
    font-size: 10px;
    font-weight: 600;
    color: #0f172a;
}

:is(#modalMatricula, .mm-home) .mm-sub__grupo {
    margin: 0.1rem 0 0;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

:is(#modalMatricula, .mm-home) .mm-sub__date {
    margin: 0.08rem 0 0;
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
}

:is(#modalMatricula, .mm-home) .mm-sub__popular {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #b45309;
}

:is(#modalMatricula, .mm-home) .mm-sub__popular i { color: #eab308; }

:is(#modalMatricula, .mm-home) .mm-sub__price {
    margin: 0.08rem 0 0;
    font-size: 13px;
    font-weight: 800;
    color: #C8102E;
}

:is(#modalMatricula, .mm-home) .mm-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    align-self: center;
    margin: 0 !important;
    border: none;
    border-radius: 8px;
    padding: 0.32rem 0.55rem;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    box-shadow: none;
}

:is(#modalMatricula, .mm-home) .mm-btn--red {
    background: linear-gradient(180deg, #e11d3a, #C8102E);
    box-shadow: 0 3px 8px rgba(200, 16, 46, 0.22);
}

:is(#modalMatricula, .mm-home) .mm-btn--blue {
    background: linear-gradient(180deg, #b5122b, #C8102E);
    box-shadow: 0 3px 8px rgba(200, 16, 46, 0.22);
}

:is(#modalMatricula, .mm-home) .mm-btn:hover { filter: brightness(1.05); }

:is(#modalMatricula, .mm-home) a.mm-btn {
    color: #fff;
    text-decoration: none;
}

.mm-home {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.15rem 1.1rem 1.1rem;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 55px rgba(122, 10, 28, 0.16);
    border: 1px solid #fbe3e6;
}

.mm-home .mm-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.55rem;
}

.mm-home .mm-col__photo,
.mm-home .mm-col__photo img,
.mm-home .mm-col__photo-fallback {
    height: 148px;
}

.mm-home .mm-col__head {
    padding: 0.28rem 0.4rem;
}
.mm-home .mm-col__head span { font-size: 9px; }
.mm-home .mm-col__head strong { font-size: 10px; }

.mm-home .mm-home__title {
    margin: 0 0 0.35rem;
    text-align: center;
    font-size: 1.65rem;
    font-weight: 800;
    color: #7a0a1c;
}

.mm-home .mm-home__lead {
    margin: 0 auto 0.7rem;
    text-align: center;
    font-size: 0.92rem;
    color: #475569;
    max-width: 36rem;
}

.mm-home .mm-home__niveles,
.mm-primaria-note {
    margin: 0 auto 0.85rem;
    text-align: center;
    font-size: 0.88rem;
    color: #334155;
    max-width: 40rem;
}
.mm-home .mm-home__niveles a,
.mm-primaria-note a {
    color: #C8102E;
    font-weight: 700;
    text-decoration: underline;
}
.mm-primaria-note {
    margin: 0.85rem 0 0;
    padding: 0 0.75rem 0.85rem;
}

.mm-home .mm-col__tag {
    margin: 0;
    padding: 0.4rem 0.45rem;
    border-radius: 0;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    line-height: 1.15;
}

.mm-home .mm-col__tag--menor { background: #C8102E; }
.mm-home .mm-col__tag--mayor { background: #C8102E; }

.mm-home .mm-col__body {
    align-items: center;
    text-align: center;
}

.mm-home .mm-col__body p {
    width: 100%;
}

.mm-home .mm-sub__extra {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    color: #C8102E;
}

.mm-home .mm-col__body .mm-btn {
    white-space: normal;
    font-size: 11px;
    line-height: 1.25;
    min-height: 2.4rem;
}

@media (max-width: 1100px) {
    .mm-home .mm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 640px) {
    .mm-home .mm-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 680px) {
    #modalMatricula .modal-container.modal-matricula {
        max-width: calc(100% - 0.6rem) !important;
    }

    :is(#modalMatricula, .mm-home) .mm-facts {
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }
    :is(#modalMatricula, .mm-home) .mm-facts li {
        flex: 1 1 42%;
        border-right: none;
        justify-content: flex-start;
    }
    #modalMatricula .mm-grid { grid-template-columns: 1fr; }
    :is(#modalMatricula, .mm-home) .mm-headbar {
        grid-template-columns: 52px 1fr;
        gap: 0.35rem 0.6rem;
        margin-right: 2.9rem;
    }
    :is(#modalMatricula, .mm-home) .mm-headbar__logo { width: 52px; height: 52px; }
    :is(#modalMatricula, .mm-home) .mm-headbar__copy { text-align: left; }
    :is(#modalMatricula, .mm-home) .mm-headbar__minedu {
        grid-column: 1 / -1;
        justify-self: start;
        height: 20px;
    }
    :is(#modalMatricula, .mm-home) .mm-headbar__title { font-size: 16px; }

    :is(#modalMatricula, .mm-home) .mm-col__photo,
    :is(#modalMatricula, .mm-home) .mm-col__photo img,
    :is(#modalMatricula, .mm-home) .mm-col__photo-fallback { height: 170px; }
}
