/* Custom overrides and enhancements */

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Selection color */
::selection {
    background: #0d9488;
    color: #ffffff;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 250, 248, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
}

#navbar.scrolled .text-teal-700 {
    color: #0d9488 !important;
}

#navbar.scrolled .text-slate-500 {
    color: #64748b !important;
}

#navbar.scrolled .text-slate-600 {
    color: #475569 !important;
}

/* Image placeholder fallback */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Mobile menu active state */
#mobileMenu.open {
    transform: translateX(0);
}

/* Hamburger animation */
#menuToggle.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuToggle.active #bar2 {
    opacity: 0;
}
#menuToggle.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Subtle hover lift on cards */
#services .group {
    transition: background-color 0.5s ease, transform 0.3s ease;
}
#services .group:hover {
    transform: translateY(-2px);
}

/* Reduce motion preference */
@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;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Print styles */
@media print {
    #navbar, #menuToggle, #mobileMenu, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .bg-teal-700,
    .bg-teal-950 {
        background-color: ButtonText;
    }
}
