/* Custom styles for Cabinet Solutions Plus LLC */

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

/* Custom selection color */
::selection {
    background-color: #c75f37;
    color: #fff;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.5s ease, color 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(44, 40, 37, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c75f37;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* Service card hover lift */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(199, 95, 55, 0.15);
}

/* Gallery item overlay */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44, 40, 37, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

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

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(199, 95, 55, 0.12);
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 1px #c75f37;
}

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

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

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

/* Hamburger animation */
#menuToggle.active span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuToggle.active span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-card {
        padding: 2rem 1.5rem !important;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem !important;
    }
    
    #contactForm {
        padding: 1.5rem !important;
    }
}
