/* Custom styles that complement Tailwind CSS */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #FF6B6B;
    border-radius: 5px;
}

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

/* Selection color */
::selection {
    background-color: #FF6B6B;
    color: white;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
}

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

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }
    
    body {
        color: #1a1a1a;
        background: white;
    }
}

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

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

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure proper spacing for fixed navbar */
#hero {
    padding-top: 0;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Back to top button animation */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:not(.visible) {
    opacity: 0;
    visibility: hidden;
}

/* Image hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Gradient text fallback for browsers that don't support background-clip */
.text-gradient {
    color: #FF6B6B;
}

/* Ensure adequate contrast for all text */
.text-charcoal-700 {
    color: #4a4a4a;
}

.text-charcoal-800 {
    color: #2d2d2d;
}

.text-charcoal-900 {
    color: #1a1a1a;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

/* Button hover effects */
button:hover,
a:hover {
    transition: all 0.2s ease;
}

/* Card shadow on hover */
.service-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}
