/* Custom styles to complement Tailwind CSS */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse-slow {
    animation: pulse 2s infinite;
}

/* Mobile menu transition */
.mobile-menu-transition {
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
    overflow: hidden;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.mobile-menu-transition.open {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Custom form styles */
.form-input {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button hover effects */
.btn-primary {
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Card hover effects */
.service-card {
    transition: all 0.3s ease-in-out;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Hero section background animation */
.hero-bg {
    background: linear-gradient(-45deg, #2563EB, #1D4ED8, #1E40AF, #3B82F6);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mobile call/WhatsApp buttons animation */
.mobile-action-btn {
    transition: all 0.2s ease-in-out;
    min-height: 48px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.mobile-action-btn:active {
    transform: scale(0.95);
}

/* Mobile action button container for extra shadow and spacing */
@media (max-width: 767px) {
    .mobile-action-btn {
        min-height: 56px;
        font-size: 1.1rem;
        box-shadow: 0 4px 24px rgba(0,0,0,0.22);
    }
    .fixed.bottom-6 {
        bottom: 1.5rem !important;
        padding-bottom: max(env(safe-area-inset-bottom), 1.5rem) !important;
    }
}

/* Loading spinner for form submission */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Error message styles */
.error-message {
    background-color: #FEE2E2;
    border: 1px solid #FECACA;
    color: #DC2626;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.error-message ul {
    margin: 0;
    padding-left: 1rem;
}

/* Success message styles */
.success-message {
    background-color: #D1FAE5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-blue-600 {
        background-color: #1E40AF !important;
    }
    
    .text-gray-600 {
        color: #374151 !important;
    }
    
    .border-gray-300 {
        border-color: #6B7280 !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-gray-50 {
        background-color: #1F2937;
    }
    
    .bg-white {
        background-color: #374151;
    }
    
    .text-gray-800 {
        color: #F9FAFB;
    }
    
    .text-gray-600 {
        color: #D1D5DB;
    }
}
