/* Custom styles for Carriage House Electric */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F4EAE0;
}
::-webkit-scrollbar-thumb {
    background: #6B0F1A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4A0A12;
}

/* Selection color */
::selection {
    background: #6B0F1A;
    color: #F4EAE0;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(107, 15, 26, 0.08);
}

/* Service card hover animation */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.4s ease,
                background-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

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

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

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

/* Menu lines animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children .fade-in:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .fade-in:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .fade-in:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .fade-in:nth-child(6) { transition-delay: 0.3s; }

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #6B0F1A !important;
    box-shadow: 0 0 0 3px rgba(107, 15, 26, 0.1) !important;
}

/* Image hover zoom */
img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Print styles */
@media print {
    nav, #contact, footer, .service-card {
        break-inside: avoid;
    }
}
