/* ===================================
   FORMULARIO DE DENUNCIA
   =================================== */

/* Reset y Variables */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-light: #f8f9fa;
    --error-color: #f44336;
    --success-color: #4CAF50;
}

/* Hero Section */
.hero-formulario {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 20px 60px;
    text-align: center;
}

.hero-formulario .container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-formulario h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-formulario .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Sección Formulario */
.seccion-formulario {
    padding: 60px 20px;
    background-color: var(--bg-light);
    min-height: 100vh;
}

.seccion-formulario .container {
    max-width: 900px;
    margin: 0 auto;
}

.formulario-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 40px;
}

.formulario-denuncia {
    width: 100%;
}

/* Secciones del formulario */
.seccion-contacto {
    margin-bottom: 30px;
    padding-bottom: 30px;
}

.seccion-contacto h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.seccion-contacto > p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Checkbox Anónimo */
.checkbox-anonimo {
    margin: 20px 0 30px 0;
    background: #e8f5e9;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.checkbox-anonimo label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.checkbox-anonimo input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-anonimo span {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Campos de contacto */
#campos-contacto {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

#campos-contacto.hidden {
    opacity: 0.5;
    pointer-events: none;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

.obligatorio {
    color: var(--error-color);
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Select */
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* File Input */
input[type="file"].form-control {
    padding: 10px;
    cursor: pointer;
}

/* Help Text */
.help-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
    font-style: italic;
}

/* Separador */
.separador {
    height: 1px;
    background: var(--border-color);
    margin: 40px 0;
}

/* Checkbox de política */
.checkbox {
    margin: 25px 0;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    margin-top: 3px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.checkbox span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
}

/* Política texto */
.politica-texto {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    text-align: justify;
    border: 1px solid var(--border-color);
}

/* Botones */
.btn-container {
    text-align: center;
    margin-top: 30px;
}

.btn-enviar,
.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-enviar:hover,
.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2E7D32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
}

.btn-enviar:disabled,
.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-enviar i,
.btn-submit i {
    font-size: 1rem;
}

/* Mensajes */
.mensaje-exito,
.mensaje-error {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}

.mensaje-exito {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje-exito.visible,
.mensaje-error.visible {
    display: block;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .formulario-wrapper {
        padding: 30px 20px;
    }
    
    .hero-formulario h1 {
        font-size: 2rem;
    }
    
    .hero-formulario .subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-formulario {
        padding: 60px 15px 40px;
    }
    
    .hero-formulario h1 {
        font-size: 1.6rem;
    }
    
    .formulario-wrapper {
        padding: 20px 15px;
    }
    
    .btn-submit {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Validación */
.form-control.error {
    border-color: var(--error-color);
}

.form-control.success {
    border-color: var(--success-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.visible {
    display: block;
}

/* ===================================
   MODAL
   =================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.modal-icon i {
    font-size: 40px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.modal-message {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2E7D32 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}
