/* Custom styles that complement Tailwind */

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background-color: rgba(20, 184, 166, 0.3);
    color: white;
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .mobile-menu,
    #menuBtn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-split {
        min-height: auto;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .service-card,
    .btn-primary {
        border: 1px solid ButtonText;
    }
}

/* Ensure text readability on all backgrounds */
.text-slate-400 {
    color: #94a3b8;
}

.text-slate-300 {
    color: #cbd5e1;
}

/* Button focus states */
.btn-primary:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: #14b8a6 !important;
    box-shadow: 0 0 0 1px #14b8a6;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Ensure all interactive elements have proper contrast */
a:hover {
    color: #2dd4bf;
}

/* Card hover effects */
.service-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Smooth transitions for all interactive elements */
button,
a {
    transition: all 0.2s ease;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Loading state for form submission */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Ensure proper spacing on small screens */
@media (max-width: 640px) {
    .hero-split {
        min-height: auto;
    }
    
    #hero {
        padding-top: 80px;
    }
    
    .teal-line {
        width: 40px;
    }
}
