/* Custom styles for Toney's Plumbing */

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

/* Custom selection color */
::selection {
    background-color: rgba(47, 176, 96, 0.2);
    color: #0d1326;
}

/* Navbar transition states */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(13, 19, 38, 0.08);
}

.nav-scrolled .menu-line {
    background-color: #0d1326;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* Service card hover effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background-color: #2fb060;
    transition: height 0.5s ease;
}

.service-card:hover::before {
    height: 100%;
}

/* Why us item hover */
.why-us-item {
    transition: background-color 0.3s ease;
}

.why-us-item:hover {
    background-color: rgba(242, 253, 244, 0.5);
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        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; }
}

/* 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;
    }
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #8ee0ab !important;
    box-shadow: 0 0 0 3px rgba(142, 224, 171, 0.15);
}

/* Image lazy loading placeholder */
img {
    background-color: #f0f4f8;
}

/* Print styles */
@media print {
    nav,
    #contact-form,
    .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
