* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, #e5f3ea, transparent 35%),
        linear-gradient(135deg, #f7f8f5, #eef4f0);
    color: #1f3128;
    min-height: 100vh;
}

.app {
    width: min(1120px, 92%);
    margin: auto;
    padding: 36px 0 60px;
}

.hero {
    text-align: center;
    padding: 50px 20px;
}

.etiqueta {
    display: inline-block;
    padding: 8px 16px;
    background: #e1f1e7;
    color: #2c6846;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero h1,
.formulario-contenedor h1,
.gracias h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    max-width: 860px;
    margin: auto;
    line-height: 1.08;
    color: #183128;
}

.hero p {
    max-width: 760px;
    margin: 20px auto 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5d54;
}

.acciones {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-principal,
.btn-secundario,
.btn-card {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-principal {
    background: #2c6846;
    color: white;
    box-shadow: 0 10px 24px rgba(44, 104, 70, .22);
}

.btn-secundario {
    background: white;
    color: #2c6846;
    border: 1px solid #cfe2d6;
}

.bloque-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 20px 0 60px;
}

.card-info,
.card-programa,
.aviso,
.formulario-contenedor,
.gracias {
    background: rgba(255, 255, 255, .88);
    border: 1px solid #dde9e1;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(26, 49, 40, .08);
}

.card-info {
    padding: 26px;
}

.card-info h3 {
    margin-bottom: 10px;
    color: #244b38;
}

.card-info p {
    color: #5b6b62;
    line-height: 1.6;
}

.encabezado-seccion {
    text-align: center;
    margin-bottom: 28px;
}

.encabezado-seccion h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #183128;
}

.encabezado-seccion p {
    margin-top: 10px;
    color: #607269;
}

.grid-programas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card-programa {
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-programa .nivel {
    align-self: flex-start;
    background: #edf6f0;
    color: #2c6846;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.card-programa h3 {
    font-size: 1.35rem;
    color: #1d372b;
}

.card-programa .descripcion {
    color: #5c6b63;
    line-height: 1.1;
    /* line-height: 1.6; */
}

.card-programa ul {
    list-style: none;
    color: #43544b;
    line-height: 1.8;
}

.btn-card {
    background: #2c6846;
    color: white;
    text-align: center;
    margin-top: auto;
}

.aviso {
    margin-top: 50px;
    padding: 28px;
    text-align: center;
}

.aviso h2 {
    margin-bottom: 10px;
    color: #244b38;
}

.aviso p {
    max-width: 820px;
    margin: auto;
    color: #5d6f65;
    line-height: 1.7;
}

/* Formularios */

.formulario-contenedor,
.gracias {
    max-width: 720px;
    margin: 30px auto;
    padding: 34px;
}

.intro-form {
    color: #5d6f65;
    line-height: 1.7;
    margin: 16px 0 24px;
}

.formulario {
    display: grid;
    gap: 14px;
}

.formulario label {
    font-weight: 700;
    color: #263d32;
}

.formulario input,
.formulario select {
    width: 100%;
    padding: 14px;
    border: 1px solid #cfe0d6;
    border-radius: 12px;
    font-size: 1rem;
    background: #fbfdfb;
}

.terminos {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    background: #f2f7f4;
    border-radius: 14px;
    color: #4f6158;
    line-height: 1.5;
}

.terminos input {
    width: auto;
    margin-top: 4px;
}

.ancho-total {
    width: 100%;
}

.codigo-box,
.link-box {
    margin: 18px 0;
    padding: 18px;
    background: #f2f8f4;
    border: 1px dashed #93b9a1;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #255339;
    word-break: break-all;
}

.gracias p {
    color: #5d6f65;
    line-height: 1.7;
    margin-top: 12px;
}

.gracias .btn-principal,
.gracias .btn-secundario {
    margin-top: 12px;
    margin-right: 8px;
}

@media (max-width: 900px) {
    .bloque-info,
    .grid-programas {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 35px 0;
    }
}

.comision-destacada {
    margin-top: 10px;
    padding: 12px 14px;
    background: #eefaf1;
    border: 1px solid #b8e8c4;
    border-radius: 14px;
    list-style: none;
}

.comision-destacada span {
    display: block;
    color: #315242;
    font-weight: 700;
    margin-bottom: 4px;
}

.comision-destacada strong {
    display: inline-block;
    color: #22a447;
    font-size: 1.45rem;
    font-weight: 900;
}

.comision-destacada small {
    display: block;
    margin-top: 4px;
    color: #5d6f65;
    font-size: .78rem;
    line-height: 1.4;
}

.whatsapp-rapido {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: center;
    background: linear-gradient(135deg, #ffffff, #effaf3);
    border: 1px solid #cfe7d7;
    border-radius: 24px;
    padding: 26px;
    margin: 0 0 28px;
    box-shadow: 0 16px 40px rgba(26, 49, 40, .08);
}

.whatsapp-texto h3 {
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    color: #183128;
    margin-bottom: 10px;
}

.whatsapp-texto p {
    color: #5d6f65;
    line-height: 1.6;
}

.whatsapp-form-mini {
    display: grid;
    gap: 12px;
}

.whatsapp-form-mini input,
.whatsapp-form-mini select {
    width: 100%;
    padding: 14px;
    border: 1px solid #cfe0d6;
    border-radius: 14px;
    font-size: 1rem;
    background: #ffffff;
}

.btn-whatsapp-rapido {
    width: 100%;
    padding: 15px 18px;
    border: none;
    border-radius: 14px;
    background: #22a447;
    color: white;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(34, 164, 71, .22);
}

.btn-whatsapp-rapido:hover {
    background: #1e923f;
}

@media (max-width: 800px) {
    .whatsapp-rapido {
        grid-template-columns: 1fr;
    }
}

.mini-embajador-box {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 14px;
}

.btn-mini-embajador {
    border: 1px solid rgba(44, 104, 70, .18);
    background: rgba(255, 255, 255, .75);
    color: #2c6846;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(26, 49, 40, .06);
    backdrop-filter: blur(6px);
    transition: all .2s ease;
}

.btn-mini-embajador::before {
    content: "💼 ";
    font-size: .85rem;
}

.btn-mini-embajador:hover {
    background: #f3faf6;
    border-color: rgba(44, 104, 70, .32);
    color: #1f5136;
    transform: translateY(-1px);
}



.layout-programas-referido {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 24px;
    align-items: start;
}

.whatsapp-lateral {
    position: sticky;
    top: 16px;
    width: 330px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #bfe3cb;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 16px 38px rgba(26, 49, 40, .14);
    backdrop-filter: blur(8px);
    z-index: 80;
}

.whatsapp-lateral h3 {
    font-size: 1.35rem;
    color: #183128;
    margin: 8px 0 8px;
    line-height: 1.15;
}

.whatsapp-lateral p {
    color: #5d6f65;
    font-size: .92rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.whatsapp-lateral .etiqueta {
    font-size: .72rem;
    padding: 5px 10px;
    margin-bottom: 6px;
}

.whatsapp-lateral .whatsapp-form-mini {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.whatsapp-lateral .whatsapp-form-mini input,
.whatsapp-lateral .whatsapp-form-mini select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cfe0d6;
    border-radius: 13px;
    font-size: .92rem;
    background: #ffffff;
}

.whatsapp-lateral .btn-whatsapp-rapido {
    width: 100%;
    padding: 13px 14px;
    border: none;
    border-radius: 13px;
    background: #22a447;
    color: #ffffff;
    font-weight: 900;
    font-size: .92rem;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(34, 164, 71, .2);
}

.whatsapp-lateral .btn-whatsapp-rapido:hover {
    background: #1e923f;
}

.whatsapp-lateral .nota-whatsapp {
    display: block;
    font-size: .75rem;
    color: #6b7b72;
    line-height: 1.35;
    margin-top: 2px;
}

.programas-contenido {
    min-width: 0;
}

/* Ajuste para que las tarjetas no queden demasiado apretadas */
.layout-programas-referido .grid-programas {
    grid-template-columns: repeat(2, 1fr);
}

/* En celular, el formulario se va arriba y ocupa todo el ancho */
@media (max-width: 950px) {
    .layout-programas-referido {
        grid-template-columns: 1fr;
    }

    .whatsapp-lateral {
        position: sticky;
        top: 8px;
        width: 330px;
        max-width: 100%;
    }

    .layout-programas-referido .grid-programas {
        grid-template-columns: 1fr;
    }
}

.capa-whatsapp-fondo {
    position: fixed;
    inset: 0;
    background: rgba(12, 32, 22, 0.217);
    /* backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px); */
    z-index: 40;
    pointer-events: none;
}

.whatsapp-lateral,
.whatsapp-flotante {
    position: sticky;
    top: 16px;
    z-index: 80;
}


/* imagenes */

.card-programa {
    background: rgba(255, 255, 255, .92);
    border: 1px solid #dde9e1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(26, 49, 40, .08);
    display: flex;
    flex-direction: column;
}

.card-portada {
    min-height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.card-portada.sin-imagen {
    background: linear-gradient(135deg, #f3f8f5, #e8f1eb);
}

.overlay-portada {
    min-height: 250px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.15),
        rgba(255,255,255,0.2),
        rgba(255,255,255,0.9)
    );
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-portada .nivel {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 14px;
    background: rgba(225, 241, 231, 0.92);
    color: #1d5d3a;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.card-portada h3 {
    font-size: 2rem;
    color: #183128;
    margin-bottom: 12px;
    line-height: 1.15;
}

.card-portada .descripcion {
    color: #355347;
    line-height: 1.1;
    font-size: .9rem;
    margin: 0;
}

.card-contenido {
    padding: 18px 22px 22px;
}

.card-contenido ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.card-contenido ul li {
    margin-bottom: 10px;
    color: #3f554b;
    line-height: 1.55;
}

.card-contenido .btn-card {
    display: block;
    width: 100%;
    text-align: center;
    background: #245f3a;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    padding: 14px 16px;
    border-radius: 16px;
    transition: .2s ease;
}

.card-contenido .btn-card:hover {
    background: #1d4e30;
}

@media (max-width: 950px) {
    .card-portada.con-imagen {
        min-height: 500px;
        
        background-position: center 30% ;
        background-color: #eef3ef;
    }

    .overlay-portada {
        min-height: 550px;
        background: linear-gradient(
            to bottom,
            rgba(255,255,255,0.15),
            rgba(255,255,255,0.2),
            rgba(255,255,255,0.9)
        );
        padding-top: 190px;
    }
}


/* logoiesh */

.header-iesh {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0 22px;
    position: relative;
    z-index: 90;
}

.logo-iesh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(44, 104, 70, .12);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(26, 49, 40, .08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.header-iesh img {
    width: 50px;
    max-width: 100%;
    height: auto;
    display: block;
}


/* botn de WhatsApp */

/* Botón flotante de WhatsApp solo para móvil */
.btn-whatsapp-movil {
    display: none;
}

.cerrar-whatsapp-movil {
    display: none;
}

@media (max-width: 768px) {

    .btn-whatsapp-movil {
        display: flex;
        position: fixed;
        left: 18px;
        /* bottom: 22px; */
        top: 200px;
        z-index: 300;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: none;
        border-radius: 999px;
        padding: 13px 18px;
        background: #22a447;
        color: #ffffff;
        font-weight: 900;
        font-size: .95rem;
        box-shadow: 0 14px 34px rgba(34, 164, 71, .35);
        cursor: pointer;
    }

    .whatsapp-lateral {
        display: none;
        position: fixed;
        left: 50%;
        bottom: 86px;
        transform: translateX(-50%);
        width: calc(100% - 34px) !important;
        max-width: 340px;
        height: 300px;
        z-index: 320;
        padding: 20px;
        border-radius: 24px;
        background: rgba(255, 255, 255, .98);
        border: 1px solid rgba(44, 104, 70, .18);
        box-shadow: 0 24px 70px rgba(20, 40, 30, .24);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .whatsapp-lateral.whatsapp-abierto {
        display: block;
    }

    .cerrar-whatsapp-movil {
        display: flex;
        position: absolute;
        top: 10px;
        right: 12px;
        width: 30px;
        height: 30px;
        border: none;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        background: #edf6f0;
        color: #245f3a;
        font-size: 1.4rem;
        line-height: 1;
        font-weight: 800;
        cursor: pointer;
    }

    .whatsapp-lateral h3 {
        padding-right: 32px;
        font-size: 1.35rem;
        margin-bottom: 12px;
    }

    .whatsapp-form-mini {
        display: grid;
        gap: 10px;
    }

    .whatsapp-form-mini input,
    .whatsapp-form-mini select {
        width: 100%;
        padding: 13px 14px;
        border-radius: 14px;
        font-size: .95rem;
    }

    .btn-whatsapp-rapido {
        width: 100%;
        padding: 14px 16px;
        border-radius: 14px;
    }

    .layout-programas-referido {
        display: block;
    }

    .programas-contenido {
        width: 100%;
    }
}

/* VERIFICAR TELEFONO */

.aviso-telefono {
    font-size: .78rem;
    line-height: 1.35;
    border-radius: 10px;
    padding: 8px 10px;
    display: none;
}

.aviso-telefono.aviso-revisando {
    display: block;
    background: #f3f6f4;
    color: #5d6f65;
    border: 1px solid #dfe8e2;
}

.aviso-telefono.aviso-duplicado {
    display: block;
    background: #fff4e5;
    color: #8a4b00;
    border: 1px solid #ffd49a;
}

.aviso-telefono.aviso-disponible {
    display: block;
    background: #e8f8ec;
    color: #1f6f3d;
    border: 1px solid #b7e5c2;
}

/* FIN DE VERIFICAR TELEFONO */

.mensaje-error-formulario {
    background: #fff4e5;
    color: #8a4b00;
    border: 1px solid #ffd49a;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 700;
    line-height: 1.45;
}