/* Custom styles for KDB Carpet Cleaning */

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

/* Custom selection color */
::selection {
    background-color: #f9d8cc;
    color: #5e3323;
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background-color: rgba(253, 248, 240, 0.95);
    box-shadow: 0 1px 20px rgba(196, 112, 75, 0.08);
}

#navbar:not(.scrolled) {
    background-color: transparent;
}

#navbar:not(.scrolled) .font-display {
    color: #2a2218;
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

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

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

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 20px;
}

/* Service cards */
.service-card {
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: #f3b8a3;
}

/* Process steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 40px;
    right: -40px;
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, #f3b8a3, transparent);
    display: none;
}

@media (min-width: 1024px) {
    .process-step:not(:last-child)::after {
        display: block;
    }
}

/* Testimonial cards */
.testimonial-card {
    border: 1px solid #f0e6dd;
}

.testimonial-card:hover {
    border-color: #f3b8a3;
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .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; }
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(243, 184, 163, 0.3);
}

/* Subtle pattern overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(196, 112, 75, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #d4c8bc;
}

/* Image hover zoom */
.service-card img,
.testimonial-card img {
    transition: transform 0.5s ease;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

/* Pulse animation for CTA */
@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 112, 75, 0.2); }
    50% { box-shadow: 0 0 0 12px rgba(196, 112, 75, 0); }
}

.pulse-cta {
    animation: pulse-soft 2.5s ease-in-out infinite;
}
