/* =========================================
   PASAPORTE DE SALUD DIGESTIVA CALMA
   HOJA DE ESTILOS COMPLETA Y OPTIMIZADA
========================================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    min-height:100vh;
    font-family:Arial,Helvetica,sans-serif;
    background:#efe7dc;
    color:#163f37;
}

#app{
    min-height:100vh;
}


/* =========================================
   ENCABEZADO
========================================= */

.hero{
    padding:70px 20px;
    background:#123f38;
    color:#ffffff;
    text-align:center;
}

.hero h1{
    margin-bottom:20px;
    font-size:48px;
    line-height:1.15;
}

.hero p{
    max-width:900px;
    margin:0 auto;
    color:#ffffff;
    font-size:24px;
    line-height:1.6;
}


/* =========================================
   CONTENEDOR PRINCIPAL
========================================= */

.contenedor{
    width:calc(100% - 40px);
    max-width:1400px;
    margin:40px auto;
    padding:40px 45px;
    background:#ffffff;
    border-radius:25px;
    box-shadow:0 15px 45px rgba(0,0,0,.12);
}


/* =========================================
   BARRA DE PROGRESO
========================================= */

.progreso{
    width:100%;
    height:18px;
    margin-bottom:40px;
    overflow:hidden;
    background:#dddddd;
    border-radius:20px;
}

#barra{
    width:10%;
    height:100%;
    background:#1b6758;
    transition:width .4s ease;
}


/* =========================================
   TEXTOS
========================================= */

h2{
    margin-bottom:25px;
    color:#123f38;
    font-size:42px;
    line-height:1.2;
}

p{
    margin-bottom:18px;
    font-size:22px;
    line-height:1.8;
}

ul{
    margin-top:20px;
    margin-bottom:40px;
    margin-left:30px;
}

li{
    margin-bottom:14px;
    font-size:22px;
    line-height:1.5;
}


/* =========================================
   BOTONES GENERALES
========================================= */

button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:58px;
    padding:16px 38px;
    border:none;
    border-radius:12px;
    background:#1b6758;
    color:#ffffff;
    font-family:Arial,Helvetica,sans-serif;
    font-size:20px;
    font-weight:500;
    cursor:pointer;
    transition:
        background .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}

button:hover{
    background:#14483d;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(18,63,56,.18);
}

button:focus-visible{
    outline:4px solid rgba(27,103,88,.22);
    outline-offset:3px;
}


/* =========================================
   FORMULARIOS GENERALES
========================================= */

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:28px 32px;
    width:100%;
    margin-top:30px;
}

.campo{
    display:flex;
    flex-direction:column;
    gap:10px;
    width:100%;
    min-width:0;
}

.campo-completo{
    grid-column:1 / -1;
}

.campo label{
    display:block;
    color:#123f38;
    font-size:18px;
    font-weight:700;
    line-height:1.4;
}

.campo input,
.campo textarea,
.campo select{
    display:block;
    width:100%;
    max-width:none;
    padding:16px 18px;
    border:2px solid #d8d2c9;
    border-radius:12px;
    background:#ffffff;
    color:#163f37;
    font-family:Arial,Helvetica,sans-serif;
    font-size:18px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.campo input,
.campo select{
    min-height:58px;
}

.campo textarea{
    min-height:145px;
    resize:vertical;
    line-height:1.6;
}

.campo input:focus,
.campo textarea:focus,
.campo select:focus{
    outline:none;
    border-color:#1b6758;
    box-shadow:0 0 0 4px rgba(27,103,88,.12);
}


/* =========================================
   PASO 01 · INFORMACIÓN PERSONAL
========================================= */

.paso-personal{
    width:100%;
}

.paso-personal .form-grid-personal{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:30px 36px !important;
    width:100% !important;
    margin-top:35px !important;
    margin-bottom:20px !important;
}

.paso-personal .form-grid-personal .campo{
    display:flex !important;
    flex-direction:column !important;
    gap:11px !important;
    width:100% !important;
    min-width:0 !important;
}

.paso-personal .form-grid-personal .campo label{
    display:block !important;
    margin:0 !important;
    color:#123f38 !important;
    font-size:19px !important;
    font-weight:700 !important;
    line-height:1.4 !important;
}

.paso-personal .form-grid-personal .campo input{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    min-height:60px !important;
    margin:0 !important;
    padding:16px 18px !important;
    border:2px solid #d8d2c9 !important;
    border-radius:12px !important;
    background:#ffffff !important;
    color:#163f37 !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:18px !important;
}

.paso-personal .form-grid-personal .campo input:focus{
    outline:none !important;
    border-color:#1b6758 !important;
    box-shadow:0 0 0 4px rgba(27,103,88,.12) !important;
}

/* El teléfono de emergencia ocupa todo el ancho */

.paso-personal
.form-grid-personal
.campo:nth-child(5){
    grid-column:1 / -1 !important;
}


/* =========================================
   TARJETAS DE REGISTROS
========================================= */

.tarjeta-registro{
    display:block;
    width:100%;
    margin:35px 0;
    padding:32px;
    background:#faf8f4;
    border:1px solid #e2dbd1;
    border-radius:20px;
    box-shadow:0 8px 24px rgba(18,63,56,.06);
}

.registro-encabezado{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:28px;
}

.registro-encabezado h3{
    margin:0;
    color:#123f38;
    font-size:25px;
    line-height:1.3;
}

.tarjeta-registro .form-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:28px 32px;
    width:100%;
    margin-top:0;
}

.tarjeta-registro .campo{
    display:flex !important;
    flex-direction:column;
    gap:10px;
    width:100%;
    min-width:0;
}

.tarjeta-registro .campo-completo{
    grid-column:1 / -1;
}

.tarjeta-registro label{
    display:block;
    margin:0;
    color:#123f38;
    font-size:18px;
    font-weight:700;
    line-height:1.4;
}

.tarjeta-registro input,
.tarjeta-registro select,
.tarjeta-registro textarea{
    display:block;
    width:100% !important;
    max-width:none;
    padding:16px 18px;
    border:2px solid #d8d2c9;
    border-radius:12px;
    background:#ffffff;
    color:#163f37;
    font-family:Arial,Helvetica,sans-serif;
    font-size:18px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.tarjeta-registro input,
.tarjeta-registro select{
    min-height:58px;
}

.tarjeta-registro textarea{
    min-height:145px;
    resize:vertical;
    line-height:1.6;
}

.tarjeta-registro input:focus,
.tarjeta-registro select:focus,
.tarjeta-registro textarea:focus{
    outline:none;
    border-color:#1b6758;
    box-shadow:0 0 0 4px rgba(27,103,88,.12);
}


/* =========================================
   BOTONES ESPECIALES
========================================= */

.btn-eliminar{
    width:auto !important;
    min-height:auto;
    padding:11px 20px;
    border:1px solid #9d4545;
    background:#ffffff;
    color:#8d3030;
    font-size:16px;
}

.btn-eliminar:hover{
    background:#8d3030;
    color:#ffffff;
}

.btn-agregar{
    width:auto;
    margin-top:5px;
    padding:15px 25px;
    border:2px solid #1b6758;
    background:#ffffff;
    color:#1b6758;
}

.btn-agregar:hover{
    background:#eaf3f0;
    color:#123f38;
}

.btn-secundario{
    background:#e7e1d8;
    color:#123f38;
}

.btn-secundario:hover{
    background:#d7cec1;
    color:#123f38;
}

.btn-peligro{
    background:#8d3030;
    color:#ffffff;
}

.btn-peligro:hover{
    background:#6f2424;
}


/* =========================================
   NAVEGACIÓN
========================================= */

.acciones{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:18px;
    margin-top:35px;
}

.acciones-finales{
    margin-top:35px;
}


/* =========================================
   AVISO DE GUARDADO
========================================= */

.aviso-guardado{
    width:100%;
    margin-top:30px;
    margin-bottom:0;
    padding:18px 20px;
    border-left:5px solid #1b6758;
    border-radius:10px;
    background:#edf5f2;
    font-size:17px;
    line-height:1.6;
}


/* =========================================
   RESUMEN FINAL OPTIMIZADO
========================================= */

.resumen{
    margin-top:24px;
}

.resumen-seccion{
    margin-bottom:22px;
    padding:22px;
    border:1px solid #ded8cf;
    border-radius:18px;
    background:#faf8f4;
}

.resumen-seccion h3{
    margin-bottom:12px;
    color:#123f38;
    font-size:27px;
    line-height:1.3;
}

.resumen-item{
    margin-top:12px;
    padding:16px 18px;
    border-left:5px solid #1b6758;
    border-radius:12px;
    background:#ffffff;
}

.resumen-item h4{
    margin-bottom:8px;
    color:#1b6758;
    font-size:20px;
    line-height:1.3;
}

.resumen-item p{
    margin:0 0 6px;
    font-size:17px;
    line-height:1.45;
    white-space:normal;
}

.resumen-item p:last-child{
    margin-bottom:0;
}

.sin-datos{
    margin:0;
    color:#687873;
    font-size:17px;
    font-style:italic;
    line-height:1.5;
}


/* =========================================
   TABLET
========================================= */

@media(max-width:900px){

    .hero h1{
        font-size:40px;
    }

    .hero p{
        font-size:21px;
    }

    .contenedor{
        width:calc(100% - 28px);
        padding:35px 30px;
    }

    h2{
        font-size:36px;
    }

}


/* =========================================
   CELULAR
========================================= */

@media(max-width:700px){

    .hero{
        padding:45px 18px;
    }

    .hero h1{
        font-size:33px;
    }

    .hero p{
        font-size:18px;
    }

    .contenedor{
        width:calc(100% - 24px);
        margin:20px auto;
        padding:25px 20px;
        border-radius:18px;
    }

    .progreso{
        height:14px;
        margin-bottom:30px;
    }

    h2{
        font-size:30px;
    }

    p,
    li{
        font-size:18px;
    }

    button{
        width:100%;
        padding:15px 20px;
        font-size:18px;
    }

    .form-grid{
        grid-template-columns:1fr;
        gap:22px;
    }

    .campo-completo{
        grid-column:auto;
    }

    .paso-personal .form-grid-personal{
        grid-template-columns:1fr !important;
        gap:22px !important;
    }

    .paso-personal
    .form-grid-personal
    .campo:nth-child(5){
        grid-column:auto !important;
    }

    .tarjeta-registro{
        padding:22px 18px;
    }

    .tarjeta-registro .form-grid{
        grid-template-columns:1fr;
        gap:22px;
    }

    .tarjeta-registro .campo-completo{
        grid-column:auto;
    }

    .registro-encabezado{
        align-items:flex-start;
        flex-direction:column;
    }

    .btn-eliminar,
    .btn-agregar{
        width:100% !important;
    }

    .acciones{
        align-items:stretch;
        flex-direction:column-reverse;
    }

    .resumen-seccion{
        padding:18px;
    }

    .resumen-seccion h3{
        font-size:24px;
    }

    .resumen-item{
        padding:15px;
    }

}


/* =========================================
   IMPRESIÓN Y PDF COMPACTOS
========================================= */

@media print{

    @page{
        size:A4;
        margin:1.1cm;
    }

    html,
    body{
        margin:0;
        padding:0;
        background:#ffffff;
        color:#000000;
    }

    .hero,
    .progreso,
    .acciones,
    .aviso-guardado{
        display:none !important;
    }

    .contenedor{
        width:100%;
        max-width:none;
        margin:0;
        padding:0;
        border-radius:0;
        box-shadow:none;
    }

    h2{
        margin:0 0 8px;
        color:#000000;
        font-size:21pt;
        line-height:1.2;
    }

    #contenido > p{
        margin:0 0 10px;
        font-size:10.5pt;
        line-height:1.35;
    }

    .resumen{
        margin-top:10px;
    }

    .resumen-seccion{
        margin:0 0 12px;
        padding:12px 14px;
        border:1px solid #999999;
        border-radius:7px;
        background:#ffffff;
        break-inside:auto;
        page-break-inside:auto;
    }

    .resumen-seccion h3{
        margin:0 0 7px;
        color:#000000;
        font-size:13.5pt;
        line-height:1.2;
    }

    .resumen-item{
        margin-top:7px;
        padding:9px 11px;
        border-left:3px solid #333333;
        border-radius:4px;
        background:#ffffff;
        break-inside:avoid;
        page-break-inside:avoid;
    }

    .resumen-item h4{
        margin:0 0 5px;
        color:#000000;
        font-size:11pt;
        line-height:1.2;
    }

    .resumen-item p{
        margin:0 0 3px;
        color:#000000;
        font-size:9.5pt;
        line-height:1.28;
        white-space:normal;
    }

    .resumen-item p:last-child{
        margin-bottom:0;
    }

    .sin-datos{
        margin:0;
        color:#333333;
        font-size:9.5pt;
        line-height:1.3;
    }

}