/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9f1637;
}

/* Service Card Hover Effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2D3B, #ff6b6b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .logo-text {
    color: #7B2D3B;
}

/* Fade-in Animation for Scroll Reveal */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

/* Project Card Overlay */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Button Focus States */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* Select Arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card::after {
        transition: none;
    }
    
    .group:hover .group-hover\:scale-105,
    img {
        transform: none;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    #contact .bg-gray-50 {
        padding: 1.5rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #hero h1 {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    #hero h1 {
        font-size: 4.5rem;
    }
}
