@charset "UTF-8";
/* ============================================================================
   Componentes – Colegio Demo
   ========================================================================== */

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: .98rem;
    min-height: var(--button-height); padding: 0 22px; border-radius: var(--button-radius);
    border: 1px solid transparent;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 65%, white); outline-offset: 3px; }
.btn--primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover, .btn--primary:active { background: var(--green-600); box-shadow: 0 9px 20px color-mix(in srgb, var(--green-600) 34%, transparent); }
.btn--accent { background: var(--accent); color: var(--green-900); box-shadow: 0 8px 24px rgba(242,192,13,.35); }
.btn--accent:hover, .btn--accent:active { background: var(--accent); box-shadow: 0 9px 20px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn--ghost:hover, .btn--ghost:active { background: rgba(255,255,255,.12); box-shadow: 0 8px 18px rgba(255,255,255,.14); }
.btn--outline { background: var(--surface); color: var(--ink-soft); border: 1.5px solid var(--green-600); }
.btn--outline:hover, .btn--outline:active { background: var(--surface); box-shadow: 0 8px 18px color-mix(in srgb, var(--green-600) 30%, transparent); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover, .btn[disabled]:hover { transform: none; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .84rem; gap: 7px; }
.btn--block { width: 100%; justify-content: center; }
.btn--danger { background: var(--danger-soft); color: var(--danger-ink); border: 1.5px solid var(--danger-soft); }
.btn--danger:hover, .btn--danger:active { background: var(--danger-soft); box-shadow: 0 8px 18px color-mix(in srgb, var(--danger) 28%, transparent); }

/* ---------- Iconos y botones de icono (acciones de fila: editar / eliminar) ---------- */
.ico { width: 16px; height: 16px; flex-shrink: 0; }
/* Botón redondo que solo lleva icono; el rótulo va en title + aria-label.
   40px = misma altura que un .btn--sm, para que casen en la misma fila. */
.btn--icon { width: 40px; height: 40px; padding: 0; gap: 0; justify-content: center; border-radius: var(--button-radius); flex-shrink: 0; }
.btn--icon .ico { width: 17px; height: 17px; }
.btn--icon:hover { transform: translateY(-2px); }
.btn--icon.btn--danger:hover, .btn--icon.btn--danger:active { background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger-ink); box-shadow: 0 8px 18px color-mix(in srgb, var(--danger) 28%, transparent); }
.btn--icon.btn--outline:hover, .btn--icon.btn--outline:active { background: var(--surface); border-color: var(--green-600); color: var(--ink-soft); box-shadow: 0 8px 18px color-mix(in srgb, var(--green-600) 30%, transparent); }

/* ---------- Navbar ---------- */
.nav {
    position: sticky; top: 0; z-index: 100;
    height: var(--nav-h);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--t-fast);
}
.nav.is-scrolled { box-shadow: var(--shadow-sm); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; }
.nav__brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav__logo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.nav__brand-text { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.12; }
.nav__brand-text strong { font-family: var(--font-head); font-size: .98rem; color: var(--ink); white-space: nowrap; letter-spacing: .01em; }
.nav__brand-text span { font-size: .72rem; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
@media (max-width: 1180px) { .nav__brand-text { display: none; } }
.nav__menu { display: flex; align-items: center; gap: 4px; }
.nav__link {
    padding: 10px 14px; border-radius: 10px; font-weight: 500; font-size: .96rem; color: var(--gray-700);
    transition: color var(--t-fast), background var(--t-fast);
}
.nav__link:hover { color: var(--ink-soft); background: var(--green-50); }
.nav__link.is-active { color: var(--ink-soft); font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
/* Botón de tema en la nav pública (claro/oscuro/sistema) */
.nav__tema {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
    display: inline-grid; place-items: center; font-size: 1.05rem; line-height: 1;
    background: var(--green-50); border: 1px solid var(--border); cursor: pointer;
    transition: background var(--t-fast), transform var(--t-fast);
}
.nav__tema:hover { background: var(--green-100); transform: translateY(-1px); }
.nav__tema:active { transform: translateY(0); }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 12px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav__toggle span { width: 22px; height: 2.4px; background: var(--green-800); border-radius: 2px; transition: var(--t-fast); }

@media (max-width: 1100px) {
    .nav__toggle { display: flex; }
    .nav__menu {
        position: fixed; inset: var(--nav-h) 0 auto 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--surface); padding: 12px var(--gutter) 18px;
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
        transform: translateY(-130%); transition: transform var(--t);
        /* Nunca más alto que la pantalla: se desplaza dentro de sí mismo. */
        max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h));
        overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    }
    .nav__menu.is-open { transform: translateY(0); }
    .nav__link { padding: 14px 12px; }
    .nav__cta-desktop { display: none; }
}

/* ---------- Nav dropdowns ---------- */
.nav__item { position: relative; display: flex; align-items: center; }
.nav__drop-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav__drop-btn::after {
    content: ""; width: 6px; height: 6px; margin-top: -3px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); opacity: .55; transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav__item.is-open > .nav__drop-btn::after,
.nav__item:hover > .nav__drop-btn::after { transform: rotate(-135deg); opacity: 1; }
.nav__item.is-active > .nav__drop-btn { color: var(--ink-soft); font-weight: 600; }
.nav__panel {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-lg); padding: 8px; z-index: 60;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}
.nav__item:hover > .nav__panel,
.nav__item.is-open > .nav__panel { opacity: 1; visibility: visible; transform: translateY(0); }
/* Puente invisible que cubre el hueco entre el botón y el panel, para que el hover no se corte */
@media (min-width: 1101px) {
    .nav__panel::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
}
.nav__panel a {
    display: block; padding: 10px 14px; border-radius: 9px; white-space: nowrap;
    font-size: .92rem; font-weight: 500; color: var(--gray-700);
    transition: color var(--t-fast), background var(--t-fast);
}
.nav__panel a:hover { background: var(--green-50); color: var(--ink); }

@media (max-width: 1100px) {
    .nav__item { display: block; }
    .nav__drop-btn { width: 100%; padding: 14px 12px; font-size: .96rem; justify-content: space-between; }
    /* Caret visible en móvil: colapsado por defecto, rota al abrir. */
    .nav__drop-btn::after { display: inline-block; opacity: .6; }
    .nav__item.is-open > .nav__drop-btn::after { transform: rotate(-135deg); opacity: 1; }
    /* Submenús COLAPSADOS por defecto (acordeón): se abren al tocar el padre. */
    .nav__panel {
        position: static; min-width: 0; padding: 0 0 0 14px;
        border: none; box-shadow: none; transform: none;
        opacity: 1; visibility: visible; display: none;
    }
    .nav__item.is-open > .nav__panel { display: block; padding-bottom: 6px; }
    .nav__panel a { padding: 12px 10px; white-space: normal; font-size: .9rem; }
}

/* Anclajes: no quedar ocultos bajo el navbar fijo */
section[id], .plan[id] { scroll-margin-top: calc(var(--nav-h) + 18px); }

/* ---------- FAQ (acordeón) ---------- */
.faq { display: grid; gap: 12px; }
.faq__item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.faq__item { transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.faq__item:hover { border-color: var(--brand-link); box-shadow: var(--shadow-sm); }
.faq__item[open] { border-color: var(--brand-link); box-shadow: var(--shadow-md); }
.faq__item summary {
    list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--ink);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    transition: background var(--t-fast);
}
.faq__item summary:hover { background: var(--green-50); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: "+"; font-size: 1.4rem; line-height: 1; color: var(--ink-soft);
    transition: transform var(--t-fast);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 20px 18px; color: var(--gray-700); }
.faq__item p a { color: var(--ink-soft); font-weight: 600; text-decoration: underline; }

/* ---------- Hero Carousel ---------- */
.hero { position: relative; overflow: hidden; background: var(--green-900); }
.hero__viewport { position: relative; }
.hero__track { display: flex; will-change: transform; transition: transform .7s cubic-bezier(.65,0,.35,1); }
.hero__track.is-dragging { transition: none; cursor: grabbing; }
.hero__slide {
    position: relative; flex: 0 0 100%; min-height: clamp(540px, 78vh, 760px);
    display: flex; align-items: center;
}
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
/* Copia desenfocada de fondo: rellena todo el banner sin dejar franjas vacías */
.hero__bg img.hero__bg-blur {
    width: 100%; height: 100%; object-fit: cover;
    filter: blur(34px) brightness(.55) saturate(1.15);
    transform: scale(1.18);
}
/* Copia nítida en primer plano: se ve COMPLETA (sin recortar texto/rostros) */
.hero__bg img.hero__bg-main {
    position: absolute; inset: 0; margin: auto;
    width: 100%; height: 100%; object-fit: contain;
}
.hero__bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(8,30,16,.94) 0%, rgba(8,30,16,.82) 38%, rgba(8,30,16,.35) 72%, rgba(8,30,16,.15) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 640px; color: #fff; padding: 40px 0; }
.hero__eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--yellow-300);
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
    padding: 7px 16px; border-radius: 100px; margin-bottom: 22px;
}
.hero__title { color: #fff; font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: 1.08; }
.hero__title .accent { color: var(--yellow-400); }
.hero__subtitle { margin: 20px 0 32px; font-size: 1.12rem; color: rgba(255,255,255,.86); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Animación de contenido por slide activo. El estado inicial oculto (opacity:0)
   SOLO se declara cuando hay movimiento permitido: si el visitante pide «reducir
   movimiento», la animación de entrada no corre y, sin esta guarda, el texto se
   quedaría invisible para siempre (imagen sin títulos). Con la guarda, en ese
   caso el contenido conserva su opacidad por defecto (visible). */
@media (prefers-reduced-motion: no-preference) {
    .hero__slide .hero__eyebrow,
    .hero__slide .hero__title,
    .hero__slide .hero__subtitle,
    .hero__slide .hero__cta { opacity: 0; transform: translateY(26px); }
    .hero__slide.is-active .hero__eyebrow { animation: heroIn .6s .15s forwards; }
    .hero__slide.is-active .hero__title { animation: heroIn .6s .28s forwards; }
    .hero__slide.is-active .hero__subtitle { animation: heroIn .6s .42s forwards; }
    .hero__slide.is-active .hero__cta { animation: heroIn .6s .56s forwards; }
}
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* Controles */
.hero__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
    color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px);
    transition: background var(--t-fast);
}
.hero__arrow:hover { background: rgba(255,255,255,.28); }
.hero__arrow--prev { left: 22px; }
.hero__arrow--next { right: 22px; }
.hero__dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; }
.hero__dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,.4); transition: var(--t-fast); position: relative;
}
.hero__dot.is-active { background: var(--yellow-400); width: 30px; border-radius: 100px; }

@media (max-width: 700px) {
    .hero__arrow { display: none; }
    .hero__slide { min-height: 600px; }
}

/* ---------- Cards de programas ---------- */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.cards > * { flex: 1 1 300px; max-width: 360px; }

/* Variante 5 en una sola línea (sección "Nuestros programas") */
.cards--5 { grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cards--5 .card { padding: 22px; }
.cards--5 .card__icon { width: 50px; height: 50px; }
@media (max-width: 1100px) { .cards--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .cards--5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 470px)  { .cards--5 { grid-template-columns: 1fr; } }

/* Variante 3 columnas (6 programas → 2 filas simétricas) */
.cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .cards--3 { grid-template-columns: 1fr; } }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 28px; box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t);
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card__icon {
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
    background: var(--green-50); color: var(--brand-link); margin-bottom: 18px; font-size: 1.5rem;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: .96rem; flex: 1; }
.card__link { margin-top: 18px; font-weight: 600; color: var(--ink-soft); display: inline-flex; gap: 6px; align-items: center; }
.card__link:hover { gap: 10px; }

/* ---------- Banda de estadísticas ---------- */
.stats { background: linear-gradient(120deg, var(--green-800), var(--green-600)); color: #fff; position: relative; overflow: hidden; }
.stats__grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.stats__value { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--yellow-400); }
.stats__label { font-size: .92rem; color: rgba(255,255,255,.85); margin-top: 4px; }

/* ---------- Features (¿por qué elegirnos?) ---------- */
.features { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.features > * { flex: 1 1 300px; max-width: 340px; }
.feature { text-align: center; padding: 16px; }
.feature__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--green-50); color: var(--brand-link); font-size: 1.6rem; }

/* ---------- Testimonios ---------- */
.testimonials { background: var(--green-900); color: #fff; }
.testimonials h2 { color: #fff; }
.testi-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.testi {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--r-lg); padding: 28px;
}
.testi__quote { font-size: 1rem; color: rgba(255,255,255,.9); margin-bottom: 18px; }
.testi__who { display: flex; align-items: center; gap: 12px; }
.testi__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--green-600); }
.testi__name { font-weight: 700; }
.testi__role { font-size: .84rem; color: var(--yellow-300); }

/* ---------- Novedades (creativos promocionales) ---------- */
.novedades { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .novedades { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .novedades { grid-template-columns: 1fr; } }
.novedad {
    position: relative; display: block; border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); background: var(--green-50); aspect-ratio: 1/1;
    transition: transform var(--t), box-shadow var(--t);
}
.novedad:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.novedad img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t); }
.novedad:hover img { transform: scale(1.04); }
.novedad__caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px;
    color: #fff; font-weight: 600; font-size: .92rem;
    background: linear-gradient(transparent, rgba(8,30,16,.85));
}

/* ---------- Noticias (tarjetas del blog público) ---------- */
.noticias-grid { display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .noticias-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .noticias-grid { grid-template-columns: 1fr; } }
.noticia-card {
    display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t);
    color: inherit;
}
.noticia-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.noticia-card__img { aspect-ratio: 16/10; overflow: hidden; background: var(--green-50); }
.noticia-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t); }
.noticia-card:hover .noticia-card__img img { transform: scale(1.04); }
.noticia-card__body { padding: 18px 18px 22px; flex: 1; display: flex; flex-direction: column; }
.noticia-card__fecha { font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--brand-link); }
.noticia-card__titulo { margin: 8px 0 8px; font-size: 1.05rem; line-height: 1.35; }
.noticia-card__resumen { font-size: .9rem; color: var(--gray-600, #5b6b63); margin: 0; }

/* ---------- Página /noticias (listado completo) ---------- */
.noticias-lista { display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .noticias-lista { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .noticias-lista { grid-template-columns: 1fr; } }

/* ---------- Página de detalle de una noticia ---------- */
.noticia-detalle { max-width: 760px; margin: 0 auto; }
.noticia-detalle__img { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow-sm); }
.noticia-detalle__img img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.noticia-detalle__fecha { font-size: .82rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--brand-link); }
.noticia-detalle__cuerpo { font-size: 1.02rem; line-height: 1.8; color: var(--gray-700, #33413a); }
.noticia-detalle__cuerpo p { margin: 0 0 1.2em; }
.noticia-detalle__volver { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; }

/* ---------- CTA final ---------- */
.cta-band {
    background: linear-gradient(120deg, var(--green-700), var(--green-500));
    border-radius: var(--r-xl); padding: clamp(36px, 6vw, 64px); text-align: center; color: #fff;
    box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); margin: 12px auto 28px; max-width: 50ch; }

/* ---------- Footer ---------- */
.footer { background: var(--green-900); color: rgba(255,255,255,.8); padding-top: 64px; }
.footer__grid { display: grid; gap: 40px; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; padding-bottom: 40px; }
.footer h4 { color: #fff; margin-bottom: 18px; font-size: 1rem; }
.footer a { color: rgba(255,255,255,.75); transition: color var(--t-fast); }
.footer a:hover { color: var(--yellow-400); }
.footer__links li { margin-bottom: 10px; }
.footer__brand { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.footer__brand img { width: 52px; height: 52px; border-radius: 50%; }
.footer__brand strong { color: #fff; display: block; font-family: var(--font-head); }
.footer__contact li { display: flex; gap: 10px; margin-bottom: 12px; font-size: .92rem; }
.footer__social { display: flex; gap: 10px; margin-top: 16px; }
.footer__social a, .footer__social span { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #fff; transition: background var(--t-fast); }
.footer__social a:hover { background: var(--green-600); }
.footer__social .is-soon { opacity: .45; cursor: default; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; text-align: center; font-size: .85rem; }
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
    /* Apilado sobre el chatbot (ambos abajo-derecha en el sitio público). */
    position: fixed; right: 22px; bottom: 92px; z-index: 90;
    width: 58px; height: 58px; border-radius: 50%;
    background: #25d366; color: #fff; display: grid; place-items: center;
    box-shadow: 0 12px 30px rgba(37,211,102,.45);
    animation: waPulse 2.4s infinite;
}
.wa-float:hover { transform: scale(1.06); }
@keyframes waPulse { 0%,100% { box-shadow: 0 12px 30px rgba(37,211,102,.45);} 50% { box-shadow: 0 12px 38px rgba(37,211,102,.7);} }

/* ---------- Formulario / Contacto ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: start; }
@media (max-width: 880px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-grid > * { min-width: 0; }
.contact-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}
@media (max-width: 540px) {
    .contact-fields { grid-template-columns: 1fr; }
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--gray-700); }
.field input, .field select, .field textarea {
    width: 100%; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: var(--r-sm);
    font-family: inherit; font-size: .98rem; background: var(--surface); transition: border-color var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border: 2px solid var(--brand-terra); box-shadow: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field--honeypot { position: absolute; left: -9999px; }
/* Banners sólidos con los mismos colores de los modales de confirmación
   (verde/ámbar/rojo) y texto blanco. */
.alert {
    padding: 14px 44px 14px 18px; border-radius: var(--r-sm); margin-bottom: 20px;
    font-size: .95rem; font-weight: 600; position: relative; color: #fff; border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .10);
}
.alert--ok    { background: #00a65a; }
.alert--warn  { background: #f39c12; }
.alert--error { background: #dd4b39; }
/* Informativo: mismo tono índigo de la marca (se usa, p. ej., al elegir sección). */
.alert--info  { background: var(--info, var(--green-700)); }
.alert--warn code { background: rgba(255, 255, 255, .25); padding: 1px 5px; border-radius: 4px; color: #fff; }

/* X para cerrar el alerta (la inyecta catalogo-ui en panel.js). Crece un poco
   al pasar el mouse SIN desplazarse de su sitio. */
.alert__close {
    position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
    width: 22px; height: 22px; border: 0; background: none; cursor: pointer;
    color: currentColor; opacity: .6; font-size: 20px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 4px; transition: opacity .2s ease, transform .2s ease;
}
.alert__close:hover, .alert__close:focus-visible {
    opacity: 1; transform: translateY(-50%) scale(1.25); outline: none;
}
/* Desvanecimiento suave al autocerrarse (a los 5 s) o al pulsar la X. */
.alert.is-hiding {
    opacity: 0; transform: translateY(-8px);
    transition: opacity .45s ease, transform .45s ease;
}

/* =========================================================
   LOADER DE PUNTOS PARA BOTONES (Guardar / Actualizar)
   Se inyecta desde panel.js al enviar el formulario. Hereda
   el color del texto del botón (currentColor).
========================================================= */
.cat-spinner {
    position: relative; display: inline-block; width: 18px; height: 18px;
    margin-right: 9px; vertical-align: -3px;
}
.cat-spinner i {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    transform-origin: 50% 50%; animation: cat-spin-fade .9s linear infinite;
}
.cat-spinner i::before {
    content: ''; display: block; width: 4px; height: 4px; margin: 0 auto;
    border-radius: 50%; background: currentColor;
}
.cat-spinner i:nth-child(1) { transform: rotate(0deg);   animation-delay: -.788s; }
.cat-spinner i:nth-child(2) { transform: rotate(45deg);  animation-delay: -.675s; }
.cat-spinner i:nth-child(3) { transform: rotate(90deg);  animation-delay: -.563s; }
.cat-spinner i:nth-child(4) { transform: rotate(135deg); animation-delay: -.450s; }
.cat-spinner i:nth-child(5) { transform: rotate(180deg); animation-delay: -.338s; }
.cat-spinner i:nth-child(6) { transform: rotate(225deg); animation-delay: -.225s; }
.cat-spinner i:nth-child(7) { transform: rotate(270deg); animation-delay: -.113s; }
.cat-spinner i:nth-child(8) { transform: rotate(315deg); animation-delay:  0s; }
@keyframes cat-spin-fade { 0% { opacity: 1; } 100% { opacity: .2; } }

.btn.is-loading { cursor: progress; pointer-events: none; opacity: .92; }

/* =========================================================
   MODAL DE CONFIRMACIÓN (Activar / Deshabilitar / Eliminar)
   Reutilizable: lo maneja panel.js a partir de data-confirm.
========================================================= */
.cmodal {
    position: fixed; inset: 0; z-index: 1000; display: none;
    align-items: center; justify-content: center; padding: 16px;
    width: 100vw; min-height: 0; box-sizing: border-box; overflow-y: auto;
    background: rgba(15, 30, 20, .5);
}
.cmodal.is-open { display: flex; }
.cmodal__box {
    background: var(--surface); width: min(100%, calc(100vw - 32px)); max-width: 460px; border-radius: 14px;
    margin: auto;
    overflow: hidden; box-shadow: 0 18px 45px rgba(0, 0, 0, .3);
    transform: translateY(8px); animation: cmodal-in .18s ease forwards;
}
@media (max-width: 768px) {
    .cmodal__box { margin-left: 5px; }
}
@keyframes cmodal-in { to { transform: translateY(0); } }
.cmodal__head {
    padding: 15px 22px; color: #fff; font-weight: 700; font-size: 18px;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.cmodal__head-x {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: #fff; font-size: 24px; line-height: 1;
    cursor: pointer; opacity: .85; transition: transform .2s ease, opacity .2s ease;
}
.cmodal__head-x:hover { opacity: 1; transform: translateY(-50%) scale(1.2); }
.cmodal__body { padding: 28px 24px 6px; text-align: center; }
.cmodal__ico { font-size: 76px; line-height: 1; display: block; margin-bottom: 14px; }
.cmodal__ico-svg { display: block; width: 84px; height: 84px; margin-inline: auto; }
.cmodal__q { font-size: 19px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.cmodal__name { color: var(--muted); font-size: 14px; font-weight: 600; }
.cmodal__foot {
    padding: 14px 24px 26px; display: flex; gap: 12px; justify-content: center;
}
.cmodal__btn {
    width: 118px; min-width: 118px; min-height: 42px;
    border: 0; border-radius: var(--button-radius, 10px); padding: 10px 12px; font-size: 14px;
    font-weight: 700; cursor: pointer; color: #fff; transition: transform .2s ease, box-shadow .2s ease;
}
.cmodal__btn:hover,
.cmodal__btn:focus-visible { transform: translateY(-2px); }
.cmodal__btn--cancel { background: var(--gray-200); color: var(--text); }
.cmodal--success .cmodal__head, .cmodal__btn--success { background: var(--confirm-success); }
.cmodal--warn    .cmodal__head, .cmodal__btn--warn    { background: var(--confirm-warn); }
.cmodal--danger  .cmodal__head, .cmodal__btn--danger  { background: var(--confirm-danger); }
.cmodal__btn--success:hover, .cmodal__btn--success:focus-visible { box-shadow: 0 8px 18px color-mix(in srgb, var(--ok) 35%, transparent); }
.cmodal__btn--warn:hover, .cmodal__btn--warn:focus-visible { box-shadow: 0 8px 18px color-mix(in srgb, var(--warn) 35%, transparent); }
.cmodal__btn--danger:hover, .cmodal__btn--danger:focus-visible { box-shadow: 0 8px 18px color-mix(in srgb, var(--danger) 35%, transparent); }
.cmodal__btn--cancel:hover, .cmodal__btn--cancel:focus-visible { box-shadow: 0 8px 18px color-mix(in srgb, var(--muted) 28%, transparent); }
.cmodal--success .cmodal__ico { color: var(--confirm-success); }
.cmodal--warn    .cmodal__ico { color: var(--confirm-warn); }
.cmodal--danger  .cmodal__ico { color: var(--confirm-danger); }
.contact-aside { background: var(--green-800); color: #fff; border-radius: var(--r-lg); padding: 32px; }
.contact-aside h3 { color: #fff; }
.contact-aside li { display: flex; gap: 12px; margin: 16px 0; font-size: .95rem; color: rgba(255,255,255,.88); }

/* ---------- Page hero (interior) ---------- */
.page-hero {
    background: linear-gradient(120deg, var(--green-800), var(--green-600));
    color: #fff; padding: clamp(48px, 8vw, 90px) 0 clamp(40px, 6vw, 70px); text-align: center;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.88); max-width: 60ch; margin: 14px auto 0; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--yellow-300); }

/* ---------- Listas con check ---------- */
.check-list li { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.check-list li::before {
    content: "";
    flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; margin-top: 1px;
    background-color: var(--green-50);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b7a32' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center; background-size: 13px;
}

/* ---------- Pricing / programas detalle ---------- */
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.plan--featured { border: 2px solid var(--green-500); position: relative; }
.plan__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--green-900); font-weight: 700; font-size: .78rem; padding: 5px 16px; border-radius: 100px; }
.plan h3 { margin-bottom: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.media-card { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--green-50); aspect-ratio: 4/3; }
.media-card img { width: 100%; height: 100%; object-fit: cover; }

/* ── Distintivos (badge) y botones VER/DESCARGAR de los recursos del aula ────
   Compartidos por la gestión (docente/admin) y la lectura del alumno. */
.nodo__badge {
    flex-shrink: 0; font-size: .66rem; font-weight: 800; letter-spacing: .4px;
    padding: 2px 7px; border-radius: 5px; color: #fff; line-height: 1.5;
}
.nodo__badge--pdf   { background: #d7263d; }
.nodo__badge--word  { background: #2563eb; }
.nodo__badge--excel { background: #15803d; }
.nodo__badge--ppt   { background: #ea580c; }
.nodo__badge--img   { background: #0d9488; }
.nodo__badge--video { background: #7c3aed; }
.nodo__badge--link  { background: #475569; }
.nodo__badge--doc   { background: #64748b; }
.nodo__acts { display: inline-flex; gap: 6px; flex-shrink: 0; }
.nodo__btn {
    font-size: .76rem; font-weight: 600; color: var(--ink-soft); text-decoration: none;
    padding: 3px 10px; border: 1px solid var(--green-300); border-radius: 999px; white-space: nowrap;
}
.nodo__btn:hover { background: var(--green-50); }
.contenido-row__dl { margin-right: 6px; }

/* ── Tarjeta resumen de la persona gestionada (submódulos de estudiante/docente) ── */
.res-card {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    max-width: 1140px; margin: 0 auto 18px; padding: 16px 20px;
    background: linear-gradient(135deg, var(--green-50, #eefaf3), #ffffff);
    border: 1px solid var(--green-200, #cdeadd); border-left: 5px solid var(--green-600, #16a34a);
    border-radius: var(--r-md, 12px); box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.res-card__avatar {
    flex: 0 0 60px; width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: var(--green-100, #d7f0e2); color: var(--green-800, #14532d);
    font-weight: 800; font-size: 1.2rem;
}
.res-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.res-card__avatar.has-emoji { color: #fff; font-size: 1.5rem; }
.res-card__data { flex: 1 1 420px; min-width: 260px; }
.res-card__name { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.res-card__name strong { font-size: 1.08rem; color: var(--green-900, #14311f); }
.res-card__rol {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    background: var(--green-600, #16a34a); color: #fff; padding: 2px 10px; border-radius: 999px;
}
.res-card__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 18px; margin: 0; }
.res-card__grid dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #6b7a72); font-weight: 700; }
.res-card__grid dd { margin: 0; font-size: .92rem; color: var(--text); font-weight: 600; }
.res-card__back { flex: 0 0 auto; align-self: flex-start; }

/* Barra de navegación entre submódulos (Editar · Tarjetas · Pagos · Secciones) */
.sub-nav { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; max-width: 1140px; margin: 0 auto 20px; }
.sub-nav a {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 128px; height: 42px; padding: 8px 14px;
    border: 2.5px solid var(--border, #d9e2dc); border-radius: 999px; background: var(--surface);
    color: var(--text); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.sub-nav a:hover, .sub-nav a:focus-visible {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--brand-link, var(--green-600));
    box-shadow: var(--shadow-md);
    outline: none;
}
.sub-nav a.is-active { background: var(--surface); border-color: var(--brand-link, var(--green-600)); color: var(--text); box-shadow: var(--shadow-sm); }
