/* =====================================================
   ICE - Páginas de cada modalidad del Secundario (plantilla secundario/_modalidad.php)
   Se carga después de css/estilo-index.css (tokens, header, footer, .reveal)
   y css/estilo-plan.css (línea de tiempo del plan de estudio).

   El verde es el color de esta sección en el sitio.

   Índice
   1. Portada
   2. Presentación y modalidad
   3. Ventajas
   4. Testimonios
   5. Responsive
   ===================================================== */

.mod {
    --verde: #539324;
    --verde-600: #3f7a1a;
    --verde-900: #10240a;
    --lima: #afc557;
}

/* ---------- 1. Portada ---------- */
.mod-hero {
    --solape: clamp(90px, 8vw, 120px);         /* cuánto se monta el video sobre la sección siguiente */
    position: relative;
    display: flow-root;
    padding: clamp(48px, 6vw, 96px) 0 0;
    color: #fff;
    background: var(--verde-900);
}
.mod-hero__fondo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mod-hero__fondo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 100% 30%;
}
.mod-hero__velo {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(16, 36, 10, .94) 0%, rgba(31, 68, 15, .82) 28%, rgba(31, 68, 15, .28) 50%, rgba(83, 147, 36, 0) 72%);
}
.mod-hero__puntos {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1.3px, transparent 1.3px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 60%);
    mask-image: linear-gradient(100deg, #000 0%, transparent 60%);
}
.mod-hero__orbe {
    position: absolute;
    top: -240px; right: -140px;
    width: 620px; height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(175, 197, 87, .38) 0%, rgba(175, 197, 87, 0) 68%);
}

.mod-hero__grid { position: relative; max-width: 1300px; }
.mod-hero__texto { max-width: 560px; }

.mod-hero__titulo {
    font-family: var(--fuente-titulo);
    font-size: clamp(2.4rem, 5.4vw, 4.6rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.03em;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
    animation: aparecer .9s var(--ease) backwards;
}
.mod-hero__acento {
    display: block;
    color: var(--lima);
    background: linear-gradient(90deg, var(--lima) 0%, #e3f0a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.mod-hero__nombre {
    display: inline-block;
    margin-top: clamp(18px, 2.4vw, 28px);
    padding: 8px 26px 10px;
    font-family: var(--fuente-titulo);
    font-size: clamp(1.5rem, 3.2vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--verde-900);
    background: var(--lima);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
    animation: aparecer .9s .1s var(--ease) backwards;
}
.mod-hero__publico {
    max-width: 30ch;
    margin-top: clamp(20px, 2.6vw, 30px);
    padding-left: 18px;
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    font-weight: 300;
    line-height: 1.4;
    border-left: 5px solid var(--lima);
    text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
    animation: aparecer .9s .2s var(--ease) backwards;
}

.mod-boton {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    margin-top: 32px;
    padding: 15px 30px;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--azul);
    background: var(--naranja);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(241, 155, 36, .4);
    transition: background .25s, color .25s, transform .25s var(--ease);
    animation: aparecer .9s .3s var(--ease) backwards;
}
.mod-boton--movil { display: none; }
.mod-boton i { font-size: .85em; transition: transform .25s var(--ease); }
.mod-boton:hover { color: #fff; background: var(--verde-600); transform: translateY(-3px); }
.mod-boton:hover i { transform: translateX(6px); }

/* El video queda a caballo entre la portada y la sección siguiente */
.mod-hero__video-caja {
    position: relative;
    z-index: 3;
    max-width: 1300px;
    margin-top: clamp(32px, 3.6vw, 48px);
    margin-bottom: calc(-1 * var(--solape));
}
/* Alineado a la izquierda, bajo el texto: así las personas de la foto quedan siempre a la vista */
.mod-hero__video { position: relative; isolation: isolate; width: min(100%, 580px); animation: aparecer 1s .25s var(--ease) backwards; }
.mod-hero__video::before {                     /* marco lima desplazado detrás del video */
    content: '';
    position: absolute;
    inset: 22px -20px -20px 22px;
    z-index: -1;
    border: 3px solid var(--lima);
    border-radius: var(--radio-l);
    opacity: .85;
}

.mod-video {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: var(--radio-l);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.mod-video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- 2. Presentación y modalidad ---------- */
.mod-seccion { padding: clamp(56px, 7vw, 104px) 0; }
.mod-hero + .mod-seccion { --solape: clamp(90px, 8vw, 120px); padding-top: calc(var(--solape) + clamp(48px, 6vw, 88px)); }
.mod-seccion--tenue { background: var(--tinte); }

.mod-dos {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
    max-width: 1300px;
}

.mod-titulo {
    margin-bottom: 28px;
    font-family: var(--fuente-titulo);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
    color: var(--azul);
}
.mod-titulo::after {
    content: '';
    display: block;
    width: 56px;
    height: 5px;
    margin-top: 16px;
    background: var(--verde);
    border-radius: 999px;
}
.mod-titulo--centro { margin-bottom: clamp(36px, 5vw, 60px); text-align: center; }
.mod-titulo--centro::after { margin-left: auto; margin-right: auto; }

.mod-parrafo { font-size: clamp(1.02rem, 1.5vw, 1.15rem); line-height: 1.85; color: var(--suave); }
.mod-parrafo + .mod-parrafo { margin-top: 18px; }

.mod-tarjeta {
    position: relative;
    padding: clamp(28px, 4vw, 48px);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(150deg, var(--verde-900) 0%, #1f4a12 55%, var(--verde-600) 100%);
    border-radius: var(--radio-l);
    box-shadow: var(--sombra-l);
}
.mod-tarjeta::before {
    content: '';
    position: absolute;
    top: -140px; right: -100px;
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(175, 197, 87, .35) 0%, rgba(175, 197, 87, 0) 68%);
    pointer-events: none;
}
.mod-tarjeta p { position: relative; line-height: 1.75; color: rgba(255, 255, 255, .92); }
.mod-tarjeta p + p { margin-top: 16px; }
.mod-tarjeta__etiqueta {
    margin-bottom: 22px !important;
    padding-bottom: 20px;
    font-family: var(--fuente-titulo);
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 700;
    color: #fff !important;
    border-bottom: 2px solid rgba(175, 197, 87, .5);
}
.mod-tarjeta__etiqueta span { display: block; margin-top: 4px; font-size: 1.35em; font-weight: 800; color: var(--lima); }

/* ---------- 3. Ventajas ---------- */
.mod-ventajas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}
.mod-ventajas li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--texto);
    background: #fff;
    border: 1px solid var(--linea);
    border-radius: var(--radio-m);
    box-shadow: var(--sombra-s);
    transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.mod-ventajas li:hover { transform: translateY(-4px); border-color: rgba(83, 147, 36, .6); box-shadow: var(--sombra-m); }
.mod-ventajas i { flex-shrink: 0; font-size: 1.7rem; color: var(--verde); }

/* ---------- 4. Testimonios ---------- */
.mod-testimonios {
    position: relative;
    padding: clamp(64px, 8vw, 112px) 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 0%, rgba(175, 197, 87, .22) 0%, rgba(175, 197, 87, 0) 42%),
        linear-gradient(160deg, var(--verde-900) 0%, #1c4211 55%, var(--verde-600) 100%);
}
.mod-titulo--claro { color: #fff; }
.mod-titulo--claro::after { background: var(--lima); }

.mod-testimonios__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2.4vw, 32px);
}
.mod-testimonios .mod-video { box-shadow: 0 24px 60px rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .16); }
.mod-testimonios__cta { display: flex; justify-content: center; margin-top: clamp(36px, 5vw, 56px); }
.mod-testimonios__cta .mod-boton { margin-top: 0; animation: none; }

/* ---------- 5. Responsive ---------- */
@media (max-width: 1100px) {
    .mod-dos { grid-template-columns: 1fr; }
    .mod-testimonios__grid { grid-template-columns: repeat(2, 1fr); }
    .mod-testimonios__grid .mod-video:last-child { grid-column: 1 / -1; max-width: 560px; justify-self: center; width: 100%; }
}

@media (max-width: 767px) {
    /* Portada en móvil: texto centrado arriba, la foto debajo (surge del verde) y el video
       apenas montado sobre su borde inferior, casi todo colgando hacia la sección siguiente */
    .mod-hero {
        --foto: clamp(280px, 82vw, 400px);       /* alto de la foto */
        --entra: 44px;                           /* cuánto del video se apoya sobre la foto */
        --solape: calc((100vw - 36px) * .5625 - var(--entra));
        padding-top: 36px;
    }
    .mod-hero__texto { max-width: none; }
    .mod-hero__fondo img {
        top: auto; bottom: 0; height: var(--foto);
        object-position: 82% 20%;
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
    }
    .mod-hero__velo { display: none; }
    .mod-hero__puntos { -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 60%); mask-image: linear-gradient(180deg, #000 0%, transparent 60%); }
    .mod-hero__titulo { text-align: center; }
    .mod-hero__nombre { display: table; margin-left: auto; margin-right: auto; }
    .mod-hero__publico { padding: 0; text-align: center; border-left: 0; margin-left: auto; margin-right: auto; }
    .mod-boton { justify-content: center; width: 100%; }
    .mod-boton--escritorio { display: none; }
    .mod-boton--movil { display: inline-flex; position: relative; z-index: 2; margin-top: 30px; }   /* debajo del video, por encima de su sombra */
    .mod-hero__video-caja { margin-top: calc(var(--foto) - var(--entra)); }
    .mod-hero__video { width: 100%; }
    .mod-hero__video::before { inset: 14px -10px -14px 14px; }
    /* el botón (54px + 30px de aire) también cuelga fuera de la portada */
    .mod-hero { --solape: calc((100vw - 36px) * .5625 - var(--entra) + 84px); }
    .mod-hero + .mod-seccion { --solape: calc((100vw - 36px) * .5625 - 44px + 84px); }

    .mod-titulo { text-align: center; }
    .mod-titulo::after { margin-left: auto; margin-right: auto; }

    .mod-ventajas { grid-template-columns: 1fr; }
    .mod-testimonios__grid { grid-template-columns: 1fr; }
    .mod-testimonios__grid .mod-video:last-child { grid-column: auto; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .mod-ventajas li:hover { transform: none; }
}
