/* Custom styles and overrides */

html {
    scroll-behavior: smooth;
}

/* Navbar scroll behavior */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-text {
    color: #0f172a;
}

#navbar.scrolled .nav-link {
    color: #475569;
}

#navbar.scrolled .nav-link:hover {
    color: #0d9488;
}

/* Hero image grid animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-image:nth-child(2) {
    animation-delay: 0.1s;
}

.hero-image:nth-child(3) {
    animation-delay: 0.2s;
}

.hero-image:nth-child(4) {
    animation-delay: 0.3s;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* Service card hover effect */
.group:hover .group-hover\:bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.2);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

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

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu-btn,
    .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-slate-900,
    .bg-teal-600 {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Reduced motion */
@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;
    }
    
    .reveal,
    .stagger-children > * {
        opacity: 1;
        transform: none;
    }
}
