*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F0E8;
}
::-webkit-scrollbar-thumb {
    background: #A8D8BE;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6DBF96;
}

/* Selection */
::selection {
    background: #D5EDE0;
    color: #0D6E3F;
}

/* Navbar transitions */
.navbar-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .navbar-text {
    color: #1a3a2a;
}

/* Hero parallax feel */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #FDFBF7, transparent);
    pointer-events: none;
}

/* Services cards hover glow */
.group:hover .group-hover\\:bg-emerald-100 {
    transition: background 0.3s ease;
}

/* Gallery images */
.group img {
    will-change: transform;
}

/* Form styling */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 139, 85, 0.15);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' 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 1rem center;
    padding-right: 2.5rem;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations — progressive enhancement */
.scroll-animate {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-animate {
        opacity: 0;
        transform: translateY(30px);
    }
    .scroll-animate.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
#back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
}
#back-to-top.is-hidden {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
}

/* Testimonial cards shimmer on hover */
.scroll-animate:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Print styles */
@media print {
    header, #back-to-top, #mobile-menu-btn {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    section {
        page-break-inside: avoid;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #1D8B55;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    loading: lazy;
    decoding: async;
}
