/* Custom styles for Mendocino Cabinet Co */

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

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

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

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

/* Selection color */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #0a1628;
}

/* Navbar transitions */
.nav-link {
    position: relative;
}

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

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

/* Service card hover */
.service-card {
    transition: all 0.4s ease;
}

.service-card:hover {
    background: #fafbfc;
}

.service-card:hover svg {
    transform: scale(1.05);
}

.service-card svg {
    transition: all 0.4s ease;
}

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

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

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

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

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

#mobile-menu-btn.active .menu-line:nth-child(2) {
    transform: rotate(-45deg) translate(0, 0);
}

/* 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 preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .group:hover img {
        transform: none;
    }
    
    .service-card {
        transition: none;
    }
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #c9a227 !important;
    box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.1);
}

/* Subtle hover effects on interactive elements */
a {
    transition: color 0.3s ease;
}

button {
    transition: all 0.3s ease;
}

/* Map overlay */
.map-section {
    position: relative;
}

.map-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 22, 40, 0.1), transparent);
    pointer-events: none;
}
