:root {
    --primary: #0f172a;
    --accent: #15803d;
}

/* Base Responsive Fixes */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Hero Background */
.hero-bg {
    background-image: linear-gradient(rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.78)),
                      url('https://picsum.photos/id/1015/2000/1200');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Changed to 'scroll' for better mobile rendering */
}

@media (max-width: 768px) {
    .hero-bg {
        background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)),
                          url('https://picsum.photos/id/1015/1080/1920');
        background-position: center top;
        padding-bottom: 2rem;
    }
}

/* Mobile Menu Animation Fix */
#mobile-menu {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
}

#mobile-menu.show {
    opacity: 1;
    max-height: 400px; /* Expands dynamically */
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Card Hover Effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 1024px) {
    .service-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
}

/* Navigation Link Underline Hover */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

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

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