/* Custom styles for Quality Carpet Care */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #d4cdc2;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9c8e7e;
}

/* Navbar transitions */
.navbar-text {
    transition: color 0.3s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(42, 37, 32, 0.08);
}

#navbar.scrolled .navbar-text {
    color: #2a2520;
}

/* Service card hover effects */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C0603A, #e07048);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 0 0 16px 16px;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(42, 37, 32, 0.1);
}

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

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

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

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

/* Scroll reveal animations - progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s ease, box-shadow 0.3s ease;
    }
    
    .service-card.reveal {
        opacity: 0;
        transform: translateY(20px);
    }
    
    .service-card.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .testimonial-card {
        opacity: 1;
        transform: translateY(0);
    }
    
    .testimonial-card.reveal {
        opacity: 0;
        transform: translateY(20px);
    }
    
    .testimonial-card.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Print styles */
@media print {
    nav, #contact-form, .testimonial-card {
        display: none;
    }
    
    body {
        background: white;
    }
}
