/* ==================== RESET Y BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #00093e;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==================== TARJETAS PRINCIPALES ==================== */
.welcome-card, .survey-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== HEADER CON LOGOS ==================== */
.header-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.logo-izquierda, .logo-central, .logo-derecha {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.logo-izquierda { justify-content: flex-start; }
.logo-central { justify-content: center; }
.logo-derecha { justify-content: flex-end; }

.logo-img {
    max-width: 100%;
    height: auto;
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

/* ==================== TÍTULOS ==================== */
.titulo-principal {
    text-align: center;
    margin-bottom: 25px;
}

.titulo-principal h2 {
    color: #4a5568;
    font-size: 2em;
    margin-bottom: 5px;
}

.titulo-principal p {
    color: #718096;
    font-size: 1em;
}

.block h2 {
    font-size: 1.5em;
    color: #4a5568;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

/* ==================== COMPONENTES DE TEXTO ==================== */
.info-box {
    background: #f0f4f8;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: bold;
    color: #2d3748;
    text-align: center;
}

.warning-message {
    background: #fef9e6;
    border-left: 4px solid #e67e22;
    padding: 15px;
    margin: 20px 0;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.warning-icon { font-size: 1.5em; }
.warning-text { flex: 1; font-size: 0.9em; color: #7f5a00; }

/* ==================== CONSENTIMIENTO ==================== */
.consent {
    background: #fff3e0;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
    border-left: 4px solid #ff9800;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-top: 15px;
    cursor: pointer;
}

.checkbox-label input { margin-right: 10px; width: 20px; height: 20px; }

/* ==================== BOTONES ==================== */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 500;
}

.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: #00093e;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.btn-secondary:hover { background: #001a7a; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

.btn-submit {
    background: linear-gradient(135deg, #00093e 0%, #001a7a 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s;
}

.btn-submit:hover { transform: translateY(-2px); }

/* ==================== FORMULARIO POR PASOS ==================== */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.step-text { font-size: 14px; color: #4a5568; white-space: nowrap; }
.step-progress { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.step-progress-fill { height: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); width: 0%; transition: width 0.3s ease; }

.step-page { display: none; animation: fadeInStep 0.3s ease; }
.step-page.active { display: block; }

@keyframes fadeInStep {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-buttons { display: flex; justify-content: space-between; margin-top: 30px; gap: 15px; }
.step-buttons button { flex: 1; }

/* ==================== PREGUNTAS Y OPCIONES ==================== */
.block { margin-bottom: 30px; }

.question { margin-bottom: 25px; }
.question label { display: block; margin-bottom: 12px; font-weight: bold; color: #2d3748; }

.options { padding-left: 20px; }
.options label { display: block; margin-bottom: 10px; font-weight: normal; cursor: pointer; }
.options input { margin-right: 10px; }

select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

select:focus, textarea:focus { outline: none; border-color: #667eea; }

.required-mark { color: #e53e3e; margin-left: 5px; }
.error { border: 2px solid #e53e3e !important; background-color: #fff5f5 !important; }

/* ==================== ESCALA DE ESPERANZA ==================== */
.scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.scale-option {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.scale-option input { margin-bottom: 8px; accent-color: currentColor; }
.scale-option span { display: block; font-weight: bold; }
.scale-option small { font-size: 10px; display: block; margin-top: 5px; font-weight: normal; }

.scale-1 { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.scale-1:hover { background: #fecaca; transform: translateY(-2px); }
.scale-1 input { accent-color: #991b1b; }

.scale-2 { background: #ffedd5; border-color: #fed7aa; color: #c2410c; }
.scale-2:hover { background: #fed7aa; transform: translateY(-2px); }
.scale-2 input { accent-color: #c2410c; }

.scale-3 { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.scale-3:hover { background: #fde047; transform: translateY(-2px); }
.scale-3 input { accent-color: #854d0e; }

.scale-4 { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.scale-4:hover { background: #bbf7d0; transform: translateY(-2px); }
.scale-4 input { accent-color: #166534; }

.scale-5 { background: #d1fae5; border-color: #a7f3d0; color: #064e3b; }
.scale-5:hover { background: #a7f3d0; transform: translateY(-2px); }
.scale-5 input { accent-color: #064e3b; }

.scale-option:has(input:checked) { border-color: currentColor; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* ==================== SELECTOR MODERNO DE PARROQUIAS ==================== */
.parroquia-selector { position: relative; width: 100%; }

.selector-input {
    width: 100%;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.selector-input:hover { border-color: #cbd5e0; }
.selector-input.active { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.selector-input.error { border-color: #e53e3e; background-color: #fff5f5; }

#selectedParroquiaText { color: #2d3748; flex: 1; }
#selectedParroquiaText.placeholder { color: #a0aec0; }

.selector-arrow { color: #a0aec0; font-size: 12px; transition: transform 0.2s; }
.selector-input.active .selector-arrow { transform: rotate(180deg); }

.selector-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
}

.selector-dropdown.show { display: block; }

.selector-search { padding: 10px; border-bottom: 1px solid #e2e8f0; }
.selector-search input { width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; }
.selector-search input:focus { outline: none; border-color: #667eea; }

.selector-options { max-height: 250px; overflow-y: auto; }
.parroquia-option { padding: 10px 15px; cursor: pointer; transition: background 0.2s; }
.parroquia-option:hover { background: #f7fafc; }
.parroquia-option.selected { background: #667eea; color: white; }

.no-results { padding: 15px; text-align: center; color: #a0aec0; }
.parroquia-error { color: #e53e3e; font-size: 0.8em; margin-top: 8px; display: none; }

/* ==================== PERMISO MENORES ==================== */
.permiso-menores {
    background: #fef9e6;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #e67e22;
}

.permiso-menores label { display: flex; align-items: center; gap: 10px; cursor: pointer; }

/* ==================== FOOTER ==================== */
.footer-note {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.75em;
    color: #718096;
}

small { display: block; margin-top: 5px; font-size: 0.75em; color: #718096; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    body { padding: 10px; }
    .welcome-card, .survey-form { padding: 20px; }

    .header-principal { gap: 5px; margin-bottom: 20px; padding-bottom: 15px; }
    .logo-img { max-height: 40px; }

    .titulo-principal h2 { font-size: 1.5em; }
    .block h2 { font-size: 1.3em; }

    .scale { flex-direction: column; gap: 8px; }
    .scale-option {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 12px;
        padding: 12px;
    }
    .scale-option input { margin-bottom: 0; flex-shrink: 0; }
    .scale-option span { flex: 1; }
    .scale-option small { display: inline; margin-left: 5px; font-size: 10px; }

    .step-text { font-size: 12px; }
    .btn-primary, .btn-secondary, .btn-submit { padding: 12px 20px; font-size: 16px; }

    select, input, textarea { font-size: 16px; }

    .selector-options { max-height: 200px; }
    .parroquia-option { font-size: 13px; padding: 10px 12px; }
}

@media (max-width: 480px) {
    .logo-img { max-height: 35px; }
    .header-principal { gap: 8px; }
}
/* ==================== ESTILOS PARA CAMPO OBLIGATORIO EN "OTRO" ==================== */
.comentario-original .required-mark {
    color: #dc2626;
    font-weight: bold;
    display: none;
}

.comentario-original textarea.error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

.comentario-original textarea.error:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12) !important;
}

.mensaje-error-texto {
    color: #dc2626;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}
/* ==================== ESTILOS PARA CAMPO OBLIGATORIO EN "OTRO" ==================== */
.comentario-original .required-mark {
    color: #dc2626;
    font-weight: bold;
    display: none;
}

.comentario-original textarea.error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

.comentario-original textarea.error:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12) !important;
}

.mensaje-error-texto {
    color: #dc2626;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}