/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    overflow: auto; /* Permite desplazarse si el contenido se excede */
}

.form-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px; /* Aumenta el ancho máximo para dar más espacio */
    box-sizing: border-box;
    overflow: hidden; /* Evita que el formulario se salga de los límites */
    max-height: 100vh; /* Garantiza que el formulario no se desborde */
    overflow-y: auto; /* Permite desplazarse verticalmente si el contenido es largo */
}

h1 {
    text-align: center;
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 30px;
}

/* Estilos para las secciones */
.section {
    margin-bottom: 20px;
}

h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 5px;
}

/* Estilo de etiquetas y campos de entrada */
label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="file"],
input[type="radio"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus {
    border-color: #e74c3c;
    background-color: #f9f9f9;
    outline: none;
}

/* Estilo para los botones */
button[type="submit"] {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 14px 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: #c0392b;
}

/* Estilos para los inputs de radio */
input[type="radio"] {
    width: auto;
    margin-right: 10px;
    margin-left: 10px; /* Mejor alineación */
}

label[for="hijos_si"], label[for="hijos_no"] {
    display: inline-block;
    margin-right: 10px;
}

/* Estilos de mensajes */
p {
    font-size: 1rem;
    margin-top: 20px;
    text-align: center;
}

.error {
    color: #e74c3c;
    font-weight: bold;
}

.success {
    color: #2ecc71;
    font-weight: bold;
}

/* Ajustes en el diseño responsivo */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .form-container {
        padding: 25px;
        width: 100%;
    }

    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="file"] {
        font-size: 0.9rem;
    }

    button[type="submit"] {
        font-size: 1rem;
    }
}

.success {
    color: #2ecc71;
    font-weight: bold;
    text-align: center;
    font-size: 1.2rem;
    margin-top: 20px;
}

/* Estilo de los select */
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.3s ease;
}

/* Enfoque en select */
select:focus {
    border-color: #e74c3c;
    background-color: #f9f9f9;
    outline: none;
}
