/* Custom styles for Metro Window Cleaning & Home Care */

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

/* Custom selection color */
::selection {
    background: #34D399;
    color: #0F172A;
}

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(15, 23, 42, 0.08);
}

#navbar.scrolled .text-midnight {
    color: #0F172A !important;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(100%);
}

/* Service card hover effects */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.4s ease, 
                border-color 0.4s ease;
}

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

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-20px) rotate(12deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(15px); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: floatReverse 8s ease-in-out infinite; }
.spin-slow { animation: spin-slow 20s linear infinite; }

/* Intersection observer animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Image hover zoom */
.rounded-2xl.overflow-hidden img,
.rounded-3xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rounded-2xl.overflow-hidden:hover img,
.rounded-3xl.overflow-hidden:hover img {
    transform: scale(1.05);
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34D399;
}

/* Mobile menu link animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Stagger animation for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* Parallax-like subtle movement */
@media (prefers-reduced-motion: no-preference) {
    .hero-shape {
        will-change: transform;
    }
}

/* Print styles */
@media print {
    nav, #contact, footer { display: none; }
    body { color: #000; background: #fff; }
}
