/* contact-form.css - Estilos premium para el formulario de contacto ANFIEC */

/* Contenedor principal con efecto de vidrio */
#contactForm {
    max-width: 650px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    overflow: hidden;
    position: relative;
}

#contactForm::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, rgba(78, 115, 223, 0.1) 0%, rgba(255,255,255,0) 50%);
    transform: rotate(30deg);
    z-index: -1;
}

#contactForm:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
}

/* Encabezado del formulario */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    color: #2e3d62;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.form-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4e73df 0%, #224abe 100%);
    border-radius: 3px;
}

.form-header p {
    color: #64748b;
    font-size: 16px;
    margin-top: 15px;
}

/* Campos de entrada con estilo moderno */
#contactForm .form-control {
    width: 100%;
    padding: 16px 24px;
    margin-bottom: 22px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    color: #2e3d62;
    transition: all 0.4s;
    background-color: rgba(248, 250, 252, 0.8);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 4px solid transparent;
}

#contactForm .form-control:focus {
    border-left-color: #4e73df;
    box-shadow: 0 5px 15px rgba(78, 115, 223, 0.1);
    background-color: #ffffff;
    outline: none;
    transform: translateX(5px);
}

/* Placeholders con estilo */
#contactForm .form-control::placeholder {
    color: #94a3b8;
    font-style: italic;
    opacity: 1;
}

/* Textarea con estilo especial */
#contactForm textarea.form-control {
    min-height: 200px;
    resize: vertical;
    background-image: linear-gradient(to bottom, transparent 95%, rgba(78, 115, 223, 0.1) 95%);
    background-size: 100% 30px;
    line-height: 30px;
    padding-top: 12px;
}

/* Grupo de campos con animación */
.form-group {
    position: relative;
    transition: all 0.3s;
}

.form-group label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: white;
    padding: 0 8px;
    font-size: 13px;
    color: #4e73df;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
}

.form-control:focus + label {
    opacity: 1;
    transform: translateY(0);
}

/* Botón de enviar con efecto 3D */
#contactForm .btn-primary {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all 0.4s;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(34, 74, 190, 0.3);
}

#contactForm .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

#contactForm .btn-primary:hover {
    background: linear-gradient(135deg, #224abe 0%, #4e73df 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(34, 74, 190, 0.4);
}

#contactForm .btn-primary:hover::before {
    left: 100%;
}

#contactForm .btn-primary i {
    font-size: 18px;
    transition: transform 0.3s;
}

#contactForm .btn-primary:hover i {
    transform: translateX(5px);
}

/* Estilo para reCAPTCHA con fondo */
#contactForm .g-recaptcha {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
    background: rgba(248, 250, 252, 0.8);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Mensajes de validación mejorados */
#contactForm .is-invalid {
    border-left-color: #e74c3c !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

#contactForm .invalid-feedback {
    color: #e74c3c;
    font-size: 14px;
    margin-top: -18px;
    margin-bottom: 18px;
    display: block;
    font-weight: 500;
    padding: 5px 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 5px;
    width: fit-content;
}

/* Efecto para campos válidos */
#contactForm .is-valid {
    border-left-color: #2ecc71 !important;
}

#contactForm .is-valid + label {
    color: #2ecc71;
}

/* Efecto de carga para el botón */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive design mejorado */
@media (max-width: 768px) {
    #contactForm {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    #contactForm .form-control {
        padding: 14px 18px;
    }
    
    #contactForm .btn-primary {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    #contactForm {
        border-radius: 10px;
    }
    
    .form-header h2::after {
        width: 40px;
    }
}

/* Efecto de onda al hacer clic */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}