/**
 * ESTILOS MODERNOS PARA FORMULARIO DE SOLICITUD DE AVAL
 * Consistente con contacto-modern.css y sistema de diseño
 */

/* ===========================
   CONTENEDOR PRINCIPAL
   =========================== */

.aval-modern {
    padding: 60px 0;
    background: #ffffff;
    min-height: calc(100vh - 200px);
}

@media (max-width: 767px) {
    .aval-modern {
        padding: 40px 0;
    }
}

/* ===========================
   TÍTULO PRINCIPAL
   =========================== */

.aval-modern h3 {
    font-family: "Source-B", "Source Sans Pro", sans-serif !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 2rem;
    line-height: 1.3 !important;
}

.aval-modern h3.color-primary {
    color: #0ea5e9 !important;
    display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
}

.aval-modern h3.color-primary::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
    border-radius: 2px;
}

/* ===========================
   TEXTO INTRODUCTORIO
   =========================== */

.intro-text-modern {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.intro-text-modern p {
    font-family: "Source", "Source Sans Pro", sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

.intro-text-modern strong {
    font-family: "Source-B", sans-serif;
    color: #0ea5e9;
}

/* ===========================
   SECCIONES DEL FORMULARIO
   =========================== */

.form-section-modern {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Títulos de sección (h5) */
.form-section-modern h5 {
    font-family: "Source-B", "Source Sans Pro", sans-serif !important;
    font-size: 1.375rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 0 1.5rem 0 !important;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0ea5e9;
    display: block !important;
}

/* Subtítulo de sección */
.section-subtitle-modern {
    font-family: "Source", sans-serif;
    font-size: 0.9375rem;
    color: #64748b;
    margin: -1rem 0 1.5rem 0;
    font-style: italic;
}

/* ===========================
   CAMPOS DEL FORMULARIO
   =========================== */

.form-group-aval {
    margin-bottom: 1.5rem;
}

.form-group-aval label {
    display: block;
    font-family: "Source-B", "Source Sans Pro", sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.form-group-aval label .required-mark {
    color: #ef4444;
    margin-left: 2px;
}

/* Inputs y selects */
.form-input-aval,
.form-select-aval {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: "Source", "Source Sans Pro", sans-serif;
    font-size: 1rem;
    color: #334155;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-input-aval:focus,
.form-select-aval:focus {
    outline: none;
    border-color: #0ea5e9;
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input-aval::placeholder {
    color: #94a3b8;
}

/* Textarea */
textarea.form-input-aval {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Textarea grande para descripciones */
textarea.form-input-aval.large {
    min-height: 180px;
}

/* Select */
.form-select-aval {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230ea5e9' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 3rem;
}

/* Input file */
.form-file-aval {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: "Source", sans-serif;
    font-size: 0.9375rem;
    color: #334155;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-file-aval:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.file-note-modern {
    font-family: "Source", sans-serif;
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Checkboxes */
.form-checkbox-aval {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-checkbox-aval:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.form-checkbox-aval input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0ea5e9;
}

.form-checkbox-aval label {
    flex: 1;
    margin: 0;
    font-family: "Source", sans-serif !important;
    font-size: 0.9375rem !important;
    font-weight: 400 !important;
    line-height: 1.6;
    color: #475569;
}

.form-checkbox-aval label a {
    color: #0ea5e9;
    text-decoration: underline;
    font-weight: 600;
}

.form-checkbox-aval label a:hover {
    color: #0284c7;
}

/* Campo honeypot (oculto) */
.form-group-aval.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ===========================
   LISTAS INFORMATIVAS
   =========================== */

.info-list-modern {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-list-modern p {
    font-family: "Source", sans-serif;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1rem;
}

.info-list-modern ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list-modern ul li {
    font-family: "Source", sans-serif;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.info-list-modern ul li span {
    position: absolute;
    left: 0;
    color: #0ea5e9;
    font-weight: 600;
}

/* ===========================
   CAPTCHA
   =========================== */

.captcha-section-modern {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.captcha-container-aval {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 2px solid #cbd5e1;
}

.captcha-container-aval p {
    margin: 0 0 1rem 0;
    font-family: "Source-B", sans-serif;
    font-size: 0.9375rem;
    color: #475569;
}

.captcha-image-aval {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 0 1rem 0;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
}

.captcha-input-aval {
    width: 100%;
    max-width: 200px;
    padding: 0.625rem 1rem;
    font-family: "Source", sans-serif;
    font-size: 1rem;
    color: #334155;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    transition: border-color 0.3s ease;
}

.captcha-input-aval:focus {
    outline: none;
    border-color: #0ea5e9;
}

.captcha-refresh-aval {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Source-B", sans-serif;
    font-size: 0.875rem;
    color: #0ea5e9;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.captcha-refresh-aval:hover {
    color: #0284c7;
    background: #f0f9ff;
    text-decoration: none;
}

.captcha-info-modern {
    font-family: "Source", sans-serif;
    font-size: 0.9375rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ===========================
   BOTÓN SUBMIT
   =========================== */

.btn-submit-aval {
    width: 100%;
    max-width: 400px;
    padding: 1rem 2rem;
    font-family: "Source-B", "Source Sans Pro", sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
    display: block;
    margin: 0 auto;
}

.btn-submit-aval:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

.btn-submit-aval:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

/* ===========================
   GRID DE DOS COLUMNAS
   =========================== */

.form-row-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 767px) {
    .form-row-modern {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 767px) {
    .aval-modern h3 {
        font-size: 1.5rem !important;
    }
    
    .form-section-modern {
        padding: 1.5rem;
    }
    
    .form-section-modern h5 {
        font-size: 1.125rem !important;
    }
}

/* ===========================
   ESTADOS DE VALIDACIÓN
   =========================== */

.form-input-aval:invalid:not(:placeholder-shown),
.form-select-aval:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-input-aval:valid:not(:placeholder-shown),
.form-select-aval:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

/* ===========================
   ANIMACIONES
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aval-modern.wow.fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}
