/* --- Fuentes y Estilo Base --- */
body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    background-color: #fdfbf5;
    background-image: url('https://www.transparenttextures.com/patterns/white-marble.png');
    background-repeat: repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    line-height: 1.6;
    color: #2E2E2E;
}

/* --- Tipografía Solemne --- */
h1, h2 {
    font-family: 'Playfair Display', "Times New Roman", Times, serif;
    font-weight: 700;
    color: #6D0000;
    text-align: center;
}
h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
}
h2 {
    font-size: 2.1em;
    color: #333;
    margin-top: 40px; /* Añade espacio entre secciones */
    margin-bottom: 25px;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.subtitle {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    color: #555;
    text-align: center;
    margin-bottom: 35px;
    font-size: 1.3em;
}

/* --- Emblema --- */
.emblem-container {
    text-align: center;
    margin-bottom: 25px;
}
.emblem-container img {
    width: 130px;
    height: auto;
    opacity: 0.8;
}

/* --- Selector de Idioma --- */
#lang-selector {
    width: 100%;
    max-width: 800px;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    gap: 5px;
    border: 1px solid #E0E0E0;
}
.lang-btn {
    font-family: 'Lato', sans-serif;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9em;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s;
}
.lang-btn:hover {
    background-color: #f0f0f0;
    border-color: #B89B70;
}
.lang-btn.active {
    background-color: #6D0000;
    color: #fff;
    border-color: #6D0000;
    font-weight: bold;
}

/* --- Contenedor Principal --- */
.container {
    background-color: #ffffff;
    padding: 40px 50px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    border-top: 5px solid #6D0000;
}

/* --- Badges --- */
.badge {
    font-family: 'Lato', sans-serif;
    font-size: 0.8em;
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: bold;
    color: #fff;
}
.badge.obligatoria {
    background-color: #6D0000;
}
.badge.opcional {
    background-color: #B89B70;
}

/* --- Lógica de Pasos y Preguntas (SIMPLIFICADA) --- */
.form-section {
    margin-bottom: 30px; /* Espacio entre secciones */
}
.question-group {
    margin-bottom: 25px;
    display: block; /* MUESTRA TODAS LAS PREGUNTAS */
}
.description {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
    font-style: italic;
}

/* --- Campos de Formulario --- */
label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #333;
    font-size: 1.2em;
}
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 15px;
    border: 1px solid #dcdcdc;
    border-radius: 5px;
    font-size: 1.1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Lato', sans-serif;
    background-color: #fdfdfd;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #B89B70;
    box-shadow: 0 0 5px rgba(184, 155, 112, 0.4);
    outline: none;
}
textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- Botón de Envío Único --- */
.navigation-buttons {
    margin-top: 30px;
    display: flex;
    flex-direction: column; /* Apila el aviso y el botón */
    justify-content: center; 
    align-items: center; /* Centra todo */
}
.nav-btn.submit-final {
    padding: 14px 35px; /* Botón grande */
    font-size: 1.2em; /* Letra grande */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Lato', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #6D0000; /* Color Burdeos */
    color: #fff;
    width: 100%; /* Ocupa todo el ancho */
}
.nav-btn.submit-final:hover {
    background-color: #4a0000;
}


/* --- DISEÑO RESPONSIVO (MÓVIL) --- */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    #lang-selector {
        padding: 5px;
    }
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    .container {
        padding: 25px 20px;
    }
    .emblem-container img {
        width: 90px;
    }
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.7em;
    }
    .subtitle {
        font-size: 1.1em;
    }
    label {
        font-size: 1.1em;
    }
    input[type="text"],
    input[type="email"],
    textarea,
    select {
        padding: 12px;
        font-size: 1em;
    }
    .nav-btn.submit-final {
        width: 100%; /* Botón de ancho completo en móvil */
    }
}

/* --- Estilo para el Aviso de Privacidad --- */
.privacy-notice {
    font-size: 0.85em;
    color: #777;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
    line-height: 1.5;
    width: 100%; /* Ocupa todo el ancho */
    box-sizing: border-box; /* Asegura que el padding no desborde */
}
