/* ============================================
   Contact Form Section - Zencia.AI
   ============================================ */

/* ===== CONTACT FORM SECTION ===== */
.contact-form-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f1419 50%, #082928 100%);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: -1px;
    margin-bottom: 0;
}

/* Background image layer */
.contact-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/ai-services-background.svg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

/* Gradient overlays */
.contact-form-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 217, 213, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 139, 139, 0.04) 0%, transparent 50%),
        rgba(26, 26, 26, 0.4);
    z-index: 2;
    pointer-events: none;
}

.contact-form-section .container {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

/* ===== CONTACT FORM CONTENT ===== */
.contact-form-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
}

/* ===== LEFT SECTION ===== */
.contact-form-left {
    animation: fadeInLeft 1s ease-out 0.3s backwards;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.1) 0%, rgba(0, 139, 139, 0.05) 100%);
    border: 1px solid rgba(0, 217, 213, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #00D9D5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.section-badge:hover {
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.15) 0%, rgba(0, 139, 139, 0.08) 100%);
    border-color: rgba(0, 217, 213, 0.5);
    transform: translateY(-2px);
}

.section-badge i {
    font-size: 1rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 2rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.highlight-text {
    background: linear-gradient(135deg, #00D9D5 0%, #40E0D0 50%, #00CED1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: clamp(1.1rem, 1.3vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* ===== FORM BENEFITS ===== */
.form-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.05) 0%, rgba(0, 139, 139, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.08) 0%, rgba(0, 139, 139, 0.04) 100%);
    border-color: rgba(0, 217, 213, 0.2);
    transform: translateY(-2px);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00D9D5 0%, #40E0D0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefit-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.benefit-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

/* ===== RIGHT SECTION - FORM ===== */
.contact-form-right {
    animation: fadeInRight 1s ease-out 0.5s backwards;
}

.contact-form-container {
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.08) 0%, rgba(0, 139, 139, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ===== FORM STYLES ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #00D9D5;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 217, 213, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Phone wrapper */
.phone-wrapper {
    display: flex;
    gap: 0.5rem;
}

.phone-wrapper select {
    flex: 0 0 180px;
}

.phone-wrapper input {
    flex: 1;
}

/* ===== CHECKBOX STYLES ===== */
.checkbox-group {
    margin: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #00D9D5 0%, #40E0D0 100%);
    border-color: #00D9D5;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* WhatsApp checkbox special styling */
.whatsapp-checkbox .checkbox-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.whatsapp-icon {
    color: #25D366;
    font-size: 1.1rem;
}

.checkbox-text a {
    color: #00D9D5;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.checkbox-text a:hover {
    border-bottom-color: #00D9D5;
}

/* ===== FORM ERRORS ===== */
.form-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.form-group.error .form-error {
    display: block;
}

/* ===== SUBMIT BUTTON ===== */
.form-submit-btn {
    background: linear-gradient(135deg, #00D9D5 0%, #40E0D0 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 217, 213, 0.3);
}

.form-submit-btn:hover {
    background: linear-gradient(135deg, #40E0D0 0%, #00D9D5 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 217, 213, 0.5);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.form-submit-btn.loading .btn-text,
.form-submit-btn.loading .btn-icon {
    display: none;
}

.form-submit-btn.loading .btn-loading {
    display: flex;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== SUCCESS MESSAGE ===== */
.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success.show {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00D9D5 0%, #40E0D0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #FFFFFF;
}

.form-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.form-success p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-secondary {
    background: transparent;
    color: #00D9D5;
    border: 2px solid #00D9D5;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #00D9D5;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* ===== CLOUDFLARE TURNSTILE ===== */
.cf-turnstile {
    margin: 0.5rem 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .contact-form-section {
        padding: 100px 0;
    }
    
    .contact-form-content {
        gap: 3rem;
    }
    
    .contact-form-container {
        padding: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .contact-form-section .container {
        padding: 0 1.5rem;
    }
    
    .contact-form-content {
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .contact-form-section {
        padding: 80px 0;
    }
    
    .contact-form-section .container {
        padding: 0 1rem;
    }
    
    .contact-form-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-form-container {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .phone-wrapper {
        flex-direction: column;
    }
    
    .phone-wrapper select {
        flex: none;
        width: 100%;
    }
    
    .benefit-item {
        padding: 1.25rem;
    }
    
    .benefit-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.875rem;
        font-size: 0.85rem;
    }
    
    .form-submit-btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }
    
    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .benefit-icon {
        margin: 0 auto;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .contact-form-left,
    .contact-form-right,
    .benefit-item,
    .section-badge,
    .form-submit-btn,
    .form-success {
        animation: none !important;
    }
    
    .benefit-item:hover,
    .section-badge:hover,
    .form-submit-btn:hover,
    .btn-secondary:hover {
        transform: none;
    }
}

/* Focus states */
.form-submit-btn:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid #00D9D5;
    outline-offset: 4px;
}

.checkbox-label:focus-within .checkmark {
    border-color: #00D9D5;
    box-shadow: 0 0 0 3px rgba(0, 217, 213, 0.1);
}

/* ===== HIGH CONTRAST SUPPORT ===== */
@media (prefers-contrast: high) {
    .contact-form-container,
    .benefit-item {
        border-width: 2px;
        border-color: #00D9D5;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        border-width: 2px;
    }
    
    .section-badge {
        border-width: 2px;
        border-color: #00D9D5;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .contact-form-section {
        background: white !important;
        padding: 2rem 0;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .contact-form-section::before,
    .contact-form-section::after {
        display: none !important;
    }
    
    .section-title {
        color: #333 !important;
    }
    
    .highlight-text {
        color: #00D9D5 !important;
        background: none !important;
        -webkit-text-fill-color: #00D9D5 !important;
    }
    
    .section-description,
    .benefit-content p {
        color: #666 !important;
    }
    
    .benefit-content h4 {
        color: #333 !important;
    }
    
    .contact-form-container {
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .benefit-icon {
        background: #00D9D5 !important;
    }
    
    .form-submit-btn {
        background: #00D9D5 !important;
        color: white !important;
        box-shadow: none !important;
    }
    
    .section-badge {
        color: #00D9D5 !important;
        border-color: #00D9D5 !important;
    }
}