/* -----------------------------------------------------------
   0. Reset y tipografía
----------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* -----------------------------------------------------------
   1. Fondo y centrar contenedor
----------------------------------------------------------- */
body,
html {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #2a826d, #0C5C4C);
}

/* -----------------------------------------------------------
   2. Contenedor principal
----------------------------------------------------------- */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    padding: 1.25rem;
    /* 20px */
}

/* -----------------------------------------------------------
   3. Card paso a paso
----------------------------------------------------------- */
.card-step {
    display: flex;
    width: 80%;
    min-width: 70rem;
    /* 1120px */
    /* A partir de aquí el alto es automático, sin scroll interno */
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
    margin: auto;
}

/* -----------------------------------------------------------
   4. Columnas izquierda y derecha
----------------------------------------------------------- */
.card-left,
.card-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
}

/* Columna izquierda */
.card-left {
    justify-content: center;
    align-items: center;
    background:
        linear-gradient(45deg, rgba(0, 77, 64, 0.8), transparent),
        radial-gradient(circle at top left, #4caf50, transparent);
    color: white;
}

/* Columna derecha */
.card-right {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
}

/* -----------------------------------------------------------
   5. Títulos
----------------------------------------------------------- */
.titulo_card_left {
    font-size: 2.5rem;
    margin-bottom: .2rem;
}

.subtitulo_card_left {
    font-size: 1.2rem;
    margin-bottom: 2.25rem;
}

/* -----------------------------------------------------------
   6. Form-groups
----------------------------------------------------------- */
.form-group {
    width: 100%;
    padding-left: 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.25rem;
    /* espacio mínimo */
}

label {
    display: block;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
    font-size: 0.875rem;
    color: #333;
}

/* -----------------------------------------------------------
   7. Inputs y selects
----------------------------------------------------------- */
input,
select {
    width: 85%;
    padding: 0.5rem;
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
    border: none;
    border-radius: 0.5rem;
    box-shadow: inset 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1);
}

input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 0.125rem #49a942;
}

/* -----------------------------------------------------------
   8. Mensajes de error
----------------------------------------------------------- */
.error-message {
    color: #ff3333;
    font-size: 0.9rem;
    visibility: hidden;
    height: 1.25rem;
}

input.error+.error-message,
select.error+.error-message {
    visibility: visible;
}

/* -----------------------------------------------------------
   9. Botones
----------------------------------------------------------- */
button {
    padding: 0.75rem 1.5rem;
    background-color: #0C5C4C;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 0.625rem;
}

button:hover {
    background-color: #2a826d;
}

.buttons {
    align-self: stretch;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

/* -----------------------------------------------------------
   10. Modales
----------------------------------------------------------- */
/* Loading */
#loadingModal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 58, 28, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

#loadingModal div {
    padding: 20px 40px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 300px;
}

#loadingModal h2 {
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* Éxito */
#modalExito {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    width: 30%;
    padding: 1.25rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    text-align: center;
}

.modal-content span {
    display: block;
    margin-bottom: 1.25rem;
    color: #333;
}

.modal-content button {
    padding: 0.625rem 1.25rem;
    background-color: #0C5C4C;
    color: white;
    border: none;
    border-radius: 0.3125rem;
    cursor: pointer;
    font-size: 1rem;
}

.modal-content button:hover {
    background-color: #0C5C4C;
}

/* ======================================================
   ESTILOS DEL MODAL DE ERROR (modalError)
   ====================================================== */

#modalError {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Contenedor del contenido del modal */
#modalError .modal-content.error-modal {
    background-color: #e0f2f1;   /* verde muy claro */
    border-radius: 0.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Cabecera del modal */
#modalError .modal-header {
    background-color: #b65e44;   /* verde claro de cabecera */
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #80cbc4;
}
#modalError .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #fdfdfd;              /* verde oscuro para el título */
    text-align: center;
}

/* Cuerpo del modal */
#modalError .modal-body {
    padding: 1rem;
    color: #004d40;
    font-size: 1rem;
    text-align: center;
    line-height: 1.4;
}

/* Pie de modal con botón */
#modalError .modal-footer {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid #80cbc4;
}

/* Botón “Aceptar” */
#modalErrorBtn {
    padding: 0.6rem 1.5rem;
    background-color: #388e3c;   /* verde medio */
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}
#modalErrorBtn:hover {
    background-color: #2e7d32;   /* verde un poco más oscuro */
}
/* -----------------------------------------------------------
   11. Media queries originales
----------------------------------------------------------- */
/* Extra-grandes */
@media (min-width: 1200px) {
    .card-step {
        /* Solo aquí aplicamos max-height */
        max-height: 45rem;
    }

    .titulo_card_left {
        font-size: 3rem;
    }

    .subtitulo_card_left {
        font-size: 1.5rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    .buttons button {
        padding: 1rem 2rem;
    }
}

/* Grandes */
@media (min-width: 992px) and (max-width: 1199px) {
    .card-step {
        width: 80%;
        min-width: 50rem;
    }

    .titulo_card_left {
        font-size: 2.75rem;
    }

    .subtitulo_card_left {
        font-size: 1.4rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .buttons button {
        padding: 0.85rem 1.75rem;
    }
}

/* Medianas */
@media (min-width: 768px) and (max-width: 991px) {
    .card-step {
        width: 85%;
        min-width: 40rem;
    }

    .titulo_card_left {
        font-size: 2.5rem;
    }

    .subtitulo_card_left {
        font-size: 0.95rem;
        text-align: center;
    }

    input,
    select {
        width: 90%;
    }

    .buttons button {
        padding: 0.75rem 1.5rem;
    }
}

/* Pequeñas */
@media (min-width: 576px) and (max-width: 767px) {
    .card-step {
        flex-direction: column;
        min-width: 30rem;
    }

    .card-left,
    .card-right {
        width: 100%;
        padding: 1.5rem;
    }

    .titulo_card_left {
        font-size: 2rem;
    }

    .subtitulo_card_left {
        font-size: 1.2rem;
    }

    .buttons button {
        padding: 0.65rem 1.25rem;
    }
}

/* Extra-pequeñas */
@media (max-width: 575px) {
    .card-step {
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }

    .card-left,
    .card-right {
        padding: 1rem;
    }

    .titulo_card_left {
        font-size: 1.75rem;
    }

    .subtitulo_card_left {
        font-size: 1rem;
    }

    .buttons button {
        padding: 0.5rem 1rem;
    }
}