/* Estilos Generales y Reset Básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #ededed;
    color: #333;
    line-height: 1.6;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1900px;
    background-color: #ededed;
    margin: 0 auto;
}

/* Header */
.header {
    background-color: #ededed;
    padding-top: 0;
    padding-bottom: 30px; 
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60px;
}

.recaptcha-placeholder {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed #bbb;
    color: #777;
    font-size: 0.9em;
    max-width: 304px;
}

/* Botón Enviar */
.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 20px);
    max-width: 1880px;
    height: 40px; 
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
    padding: 0 20px;
    background-color: #fcfcfc;
    color: #333;
    font-size: 1.0em; 
    font-weight: bold;
    border: 1px solid #dbdbdb;
    border-radius: 25px;
    box-shadow: 0 0 10px #bfbfbf;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.submit-button:hover {
    background-color: #e9e9e9;
    box-shadow: 0 0 12px #b0b0b0;
}

/* Secciones de Información (Azules) */
.info-section,
.footer {
    width: 100%;
    height: 60px; 
    background-image: linear-gradient(to bottom, #80a7cd, #5f88b1);
    border-top: 1px solid #456f9a;
    border-bottom: 1px solid #456f9a;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.info-section--datos {
    width: calc(100% - 10px);
    max-width: 1890px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 70px;
}

.info-section__text,
.footer__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.info-section--datos .info-section__text,
.footer .footer__text {
    line-height: 1.1;
}

.info-section--datos .info-section__text span,
.footer .footer__text span {
    font-weight: bold;
}

.info-section__text span,
.footer__text span {
    display: block;
}

/* --- Clase para ocultar elementos (Necesaria para el JavaScript) --- */
.hidden {
    display: none !important;
}

/* --- Estilos para el Formulario Desplegable --- */
.form-section {
    background-color: transparent;  
    width: 475px;                   
    max-width: 100%;                
    margin-left: 20px;              
    margin-right: auto;             
    margin-top: 25px;
    margin-bottom: 30px;
    padding: 0;                     
    border: 1px solid #a9c6c9;      
    border-radius: 0;               
    box-shadow: none; 
    box-sizing: border-box;
}

.form-section h2 {
    display: none; 
}

.form-section .form-subheader {
    text-align: left;
    margin: 0; 
    padding: 7px 15px; 
    font-size: 0.85em; 
    font-weight: bold;
    color: #333; 
    background-color: #e0e0e0; 
    border-bottom: 1px solid #a9c6c9; 
}

.form-section > .form-group + .form-subheader,
.form-section > .form-subheader:not(:first-child) {
    border-top: 1px solid #a9c6c9;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 0; 
}

.data-row, 
.form-group {
    display: flex;
    flex-direction: row; 
    align-items: center; 
    height: 36px; 
    padding: 0 15px; 
    border-bottom: 1px solid #a9c6c9; 
    box-sizing: border-box;
    background-color: transparent; 
}

.form-section > :last-child { 
    border-bottom: none;
}

.data-label, 
.form-group label {
    font-weight: bold;
    font-size: 0.85em; 
    color: #333;    
    margin-right: 8px; 
    white-space: nowrap; 
}

.data-value, 
.form-group input[type="text"] { 
    width: auto; 
    flex-grow: 1; 
    height: auto; 
    padding: 0; 
    line-height: normal; 
    border: none; 
    border-radius: 0;
    font-size: 0.85em; 
    background-color: transparent; 
    color: #555; 
    box-sizing: border-box;
    box-shadow: none; 
    outline: none; 
}

.form-group input[readonly] { 
    cursor: default;
}

/* --- Estilos para el Overlay de Carga --- */
.loading-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Mantenemos el fondo transparente */
    display: flex;                 /* MODIFICADO: Restaurado para centrar con Flexbox */
    justify-content: center;     /* MODIFICADO: Restaurado para centrar con Flexbox */
    align-items: center;         /* MODIFICADO: Restaurado para centrar con Flexbox */
    z-index: 10000; 
}

.loading-box {
    /* MODIFICADO: Se eliminan position, left, top, transform ya que Flexbox se encarga del centrado */
    background-color: rgba(40, 40, 40, 0.85); 
    color: white;
    padding: 20px 80px; 
    border-radius: 10px;
    text-align: center;
    display: flex; 
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.loading-box .spinner {
    width: 30px;
    height: 30px;
    border: 4px solid rgba(255, 255, 255, 0.2); 
    border-top-color: #ffffff; 
    border-radius: 50%;
    animation: spin 1s linear infinite; 
    margin-bottom: 15px;
}

.loading-box p {
    margin: 0;
    font-size: 1em;
    letter-spacing: 1px;
}

/* Animación para el spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* --- Media Queries para Responsividad --- */
@media (max-width: 768px) {
    .submit-button {
        width: calc(100% - 50px);
        max-width: none;
        height: 50px;
        padding: 0 15px;
        font-size: 1em;
    }

    .info-section--datos {
        width: calc(100% - 20px);
        max-width: none;
        margin-bottom: 40px;
    }

    .form-section { 
        width: calc(100% - 40px); 
        margin-left: 20px;
        margin-right: 20px; 
    }
    .data-row, .form-group {
        padding: 0 10px; 
        height: 34px; 
    }
    .data-label, .form-group label, 
    .data-value, .form-group input[type="text"] {
        font-size: 0.8em; 
    }
    .form-section .form-subheader {
        padding: 5px 10px; 
        font-size: 0.8em; 
    }

    .loading-box { /* Mantenemos ajustes de padding responsivos para el loading-box */
         padding: 20px 40px; 
    }


    .header {
        padding-bottom: 20px;
    }

    .info-section, .footer {
        height: auto;
        padding: 15px 10px;
    }

    .info-section--datos .info-section__text,
    .footer .footer__text {
        line-height: 1.2;
    }
}

@media (max-width: 480px) { 
    .submit-button {
        width: calc(100% - 30px);
        height: 44px;
        padding: 0 10px;
        font-size: 0.9em;
        border-radius: 22px;
    }

    .info-section--datos {
        width: calc(100% - 10px);
        margin-bottom: 30px;
    }
    
    .form-section {
        width: calc(100% - 20px); 
        margin-left: 10px;
        margin-right: 10px;
    }
    .data-row, .form-group {
        padding: 0 8px; 
        height: 32px; 
    }
    .data-label, .form-group label,
    .data-value, .form-group input[type="text"] {
        font-size: 0.75em; 
    }
    .form-section .form-subheader {
        padding: 4px 8px; 
        font-size: 0.75em; 
    }

    .loading-box {
        padding: 15px 30px; 
    }
    .loading-box .spinner {
        width: 25px;
        height: 25px;
        margin-bottom: 10px;
    }
    .loading-box p {
        font-size: 0.9em;
    }

    .recaptcha-placeholder {
        transform: scale(0.9);
        transform-origin: center top;
    }

    .header {
        padding-bottom: 15px;
        min-height: auto;
    }

    .info-section--datos .info-section__text,
    .footer .footer__text {
        line-height: 1.1;
    }
}