/* Custom styles for CSM Contractors */

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

/* Base styles */
body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    font-optical-sizing: auto;
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, #059669, #10b981);
    transition: height 0.5s ease;
}

.service-card:hover::before {
    height: 100%;
}

/* Navbar transition */
#navbar {
    transition: box-shadow 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

/* Input focus animations */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade in animations for below-fold content */
.fade-in {
    opacity: 1;
}

.fade-in.animate {
    animation: fadeInUp 0.8s ease forwards;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card,
    .group {
        transition: none;
    }
    
    .service-card:hover::before {
        height: 0;
    }
    
    .fade-in.animate {
        animation: none;
        opacity: 1;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .service-card::before {
        display: none;
    }
    
    body {
        color: #064e3b;
        background: white;
    }
}
