/* --- VARIABLES DE MARCA --- */
:root {
    --primary-blue: #090f5f;
    --accent-yellow: #ffcc00;
    --text-dark: #1a202c;
    --text-muted: #4a5568;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --success: #2ecc71;
    --error: #e53e3e;
    --transition: all 0.3s ease;
}

/* --- CONTENEDOR PRINCIPAL --- */
.form-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    border-top: 8px solid var(--primary-blue);
    padding: 35px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* --- SECCIONES DEL FORMULARIO --- */
.form-section {
    background: #fdfdfd;
    padding: 22px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 1px solid #edf2f7;
}

.form-section h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--accent-yellow);
    padding-bottom: 8px;
    width: fit-content;
    text-transform: uppercase;
}

/* --- DISEÑO DE CUADRÍCULA (GRID) --- */
.grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

/* --- INPUTS, SELECTS Y TEXTAREAS --- */
.form-group input, 
.form-group select {
    padding: 12px;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
    font-size: 0.9rem;
}

/* TRANSFORMACIÓN A MAYÚSCULAS VISUALES */
.form-group input[type="text"], 
.form-group select {
    text-transform: uppercase;
}

/* Excepción para Correo Electrónico */
.form-group input[type="email"] {
    text-transform: none;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(9, 15, 95, 0.1);
}

/* Solo lectura (Autocompletado API) */
input[readonly] {
    background-color: #f1f5f9;
    cursor: not-allowed;
    color: var(--primary-blue);
    font-weight: 600;
}

/* --- ESTILO ESPECIAL SELECTOR DE PAÍS --- */
#codigo_pais {
    background-color: var(--bg-light);
    font-weight: 700;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    cursor: pointer;
}

#num_celular {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* --- CARGA DE FOTO CARNET --- */
.foto-upload-container {
    border: 2px dashed #cbd5e0;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    background: var(--bg-light);
    position: relative;
    transition: var(--transition);
}

#preview-container {
    margin-top: 15px;
    position: relative;
    display: inline-block;
}

#foto-preview {
    width: 110px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid var(--primary-blue);
}

#remove-foto {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* --- SELECTORES TIPO TOGGLE (RADIO) --- */
.radio-toggle {
    display: flex;
    background: #edf2f7;
    padding: 5px;
    border-radius: 12px;
    gap: 5px;
}

.radio-toggle input[type="radio"] { display: none; }

.radio-toggle label {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    transition: var(--transition);
    text-transform: uppercase;
}

.radio-toggle input[type="radio"]:checked + label {
    background: var(--primary-blue);
    color: var(--accent-yellow);
}

/* --- BOTÓN DE ENVÍO --- */
.btn-enviar {
    width: 100%;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.btn-enviar:hover {
    background: #0d168a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(9, 15, 95, 0.3);
}

/* --- MODAL DE TÉRMINOS --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    overflow: hidden;
}

/* --- UTILIDADES --- */
.hidden { display: none !important; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .grid-form { grid-template-columns: 1fr; }
    .form-container { padding: 20px; }
}