/**
 * Contact Us Section Component Styles
 * Modern contact section with form, map, and contact info blocks
 */

/* Contact Section Base */
.contact-us-section {
    position: relative;
}

/* Contact Title */
.contact-title {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-us-section.bg-gray-900 .contact-title {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contact Block Animations */
.contact-block {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.contact-block:nth-child(1) { animation-delay: 0.1s; }
.contact-block:nth-child(2) { animation-delay: 0.2s; }
.contact-block:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Block Hover Effects */
.contact-block > div {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.contact-block > div:hover {
    border-color: #e5e7eb;
    transform: translateY(-4px);
}

.contact-us-section.bg-gray-900 .contact-block > div:hover {
    border-color: #374151;
}

/* Contact Block Icons */
.contact-block .w-16.h-16,
.contact-block .w-12.h-12 {
    transition: all 0.3s ease;
}

.contact-block:hover .w-16.h-16,
.contact-block:hover .w-12.h-12 {
    transform: scale(1.1);
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

/* Contact Form Styling */
.contact-form {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Field Overrides for Formidable Forms */
.contact-form .frm_form_fields {
    background: transparent !important;
}

.contact-form .frm_form_field {
    margin-bottom: 1.5rem;
}

.contact-form .frm_form_field label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

.contact-us-section.bg-gray-900 .contact-form .frm_form_field label {
    color: #f3f4f6;
}

.contact-form .frm_form_field input[type="text"],
.contact-form .frm_form_field input[type="email"],
.contact-form .frm_form_field input[type="tel"],
.contact-form .frm_form_field textarea,
.contact-form .frm_form_field select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.contact-us-section.bg-gray-900 .contact-form .frm_form_field input[type="text"],
.contact-us-section.bg-gray-900 .contact-form .frm_form_field input[type="email"],
.contact-us-section.bg-gray-900 .contact-form .frm_form_field input[type="tel"],
.contact-us-section.bg-gray-900 .contact-form .frm_form_field textarea,
.contact-us-section.bg-gray-900 .contact-form .frm_form_field select {
    background: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

.contact-form .frm_form_field input:focus,
.contact-form .frm_form_field textarea:focus,
.contact-form .frm_form_field select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.contact-form .frm_form_field textarea {
    min-height: 120px;
    resize: vertical;
}

/* Form Submit Button */
.contact-form .frm_submit input[type="submit"],
.contact-form .frm_submit button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contact-form .frm_submit input[type="submit"]:hover,
.contact-form .frm_submit button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Form Error Messages */
.contact-form .frm_error_style {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.contact-us-section.bg-gray-900 .contact-form .frm_error_style {
    background: #7f1d1d;
    border-color: #dc2626;
    color: #fca5a5;
}

/* Form Success Messages */
.contact-form .frm_message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.contact-us-section.bg-gray-900 .contact-form .frm_message {
    background: #064e3b;
    border-color: #059669;
    color: #6ee7b7;
}

/* Contact Map Styling */
.contact-map {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-map iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100%;
    border: none;
    border-radius: 1rem;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
    display: block;
}

.contact-map:hover iframe {
    filter: grayscale(0%);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-map .min-h-96 {
        min-height: 300px;
    }
    
    .contact-form,
    .contact-map {
        animation: fadeInUp 0.6s ease-out forwards;
        animation-delay: 0.3s;
    }
}

@media (max-width: 768px) {
    .contact-block {
        text-align: left;
    }
    
    .contact-block .mx-auto {
        margin-left: 0;
        margin-right: 1rem;
    }
    
    .contact-form .rounded-2xl,
    .contact-map .rounded-2xl {
        border-radius: 1rem;
    }
    
    .contact-form .p-8 {
        padding: 1.5rem;
    }
    
    .contact-block > div {
        padding: 1.5rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .contact-block,
    .contact-form,
    .contact-map {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .contact-block > div,
    .contact-block .w-16.h-16,
    .contact-block .w-12.h-12,
    .contact-map iframe {
        transition: none;
    }
}

/* Focus Visible for Better Accessibility */
.contact-block a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .contact-block > div {
        border: 2px solid #374151;
    }
    
    .contact-title {
        -webkit-text-fill-color: #1f2937;
        color: #1f2937;
    }
    
    .contact-us-section.bg-gray-900 .contact-title {
        -webkit-text-fill-color: #f3f4f6;
        color: #f3f4f6;
    }
}

/* Print Styles */
@media print {
    .contact-us-section {
        background: white !important;
        color: black !important;
    }
    
    .contact-map {
        display: none;
    }
    
    .contact-block > div {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
        break-inside: avoid;
    }
    
    .contact-form .frm_submit {
        display: none;
    }
}

/* Loading State */
.contact-us-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

.contact-us-section.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar for Form Areas */
.contact-form textarea::-webkit-scrollbar {
    width: 6px;
}

.contact-form textarea::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.contact-form textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.contact-form textarea::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}