/* --- ESTILOS GENERALES Y FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary-blue: #004085; /* Azul oscuro principal */
    --secondary-blue: #0056b3; /* Azul ligeramente más claro */
    --light-blue: #e0f2f7; /* Azul muy claro para fondos */
    --white: #ffffff;
    --dark-text: #333333;
    --light-text: #666666;
    --grey-bg: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    background-image: url("img/fondo.png");
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--dark-text);
    box-sizing: border-box;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

/* --- CONTENEDOR PRINCIPAL DEL FORMULARIO --- */
.container {
    width: 95%;
    max-width: 500px; /* Tamaño más compacto para el formulario */
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 25px var(--shadow);
    padding: 30px;
    margin: 20px 0;
}

/* --- TÍTULO PRINCIPAL --- */
.main-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.3;
}

/* --- ESTILOS DE LOS CAMPOS DEL FORMULARIO --- */
.input-field {
    margin-bottom: 20px;
    position: relative;
}

.input-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--light-text);
}

.input-field input[type="text"],
.input-field input[type="number"],
.input-field input[type="email"],
.input-field select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    color: var(--dark-text);
    background-color: var(--grey-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Asegura que padding no aumente el ancho */
}

.input-field input:focus,
.input-field select:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2); /* Sutil sombra azul al enfocar */
    outline: none;
    background-color: var(--white);
}

.input-field select {
    -webkit-appearance: none; /* Elimina estilos por defecto en Webkit */
    -moz-appearance: none; /* Elimina estilos por defecto en Mozilla */
    appearance: none; /* Elimina estilos por defecto */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); /* Flecha personalizada */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px;
    cursor: pointer;
}

/* --- BOTÓN DE ENVIAR --- */
.submit-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--secondary-blue);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.submit-btn:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px); /* Pequeño efecto al pasar el mouse */
}

.submit-btn:active {
    transform: translateY(0);
}

/* --- MENSAJE DE ESTADO --- */
#status-message {
    text-align: center;
    margin-top: 20px;
    font-size: 1em;
    font-weight: 600;
    min-height: 20px; /* Para evitar saltos de diseño */
}

.success {
    color: green;
}

.error {
    color: red;
}

/*
==============================================
--- RESPONSIVE DESIGN (PARA MÓVILES) ---
==============================================
*/
@media (max-width: 600px) {
    .container {
        padding: 20px;
        border-radius: 0; /* Bordes rectos en móviles para ocupar todo el ancho */
        box-shadow: none; /* Sin sombra para una apariencia más nativa */
        min-height: 100vh; /* Ocupa toda la altura disponible */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .main-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .input-field label,
    .input-field input,
    .input-field select {
        font-size: 0.95em;
    }

    .submit-btn {
        font-size: 1em;
        padding: 10px 15px;
    }
}