/* Base Styles & Animations */
* {
    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: #f5f3ef;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2d6a32;
}

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

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

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 106, 50, 0.05) 0%, rgba(45, 106, 50, 0) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}

.service-card:hover::before {
    opacity: 1;
}

/* Navbar Scroll Effect */
.nav-scrolled {
    background: rgba(250, 249, 247, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .menu-line {
    background: #1c421f !important;
}

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

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

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

/* Gallery Hover Overlay */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 66, 31, 0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Button Ripple Effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Selection Color */
::selection {
    background: #99c79e;
    color: #0a1c0d;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid #2d6a32;
    outline-offset: 2px;
}

/* Input autofill style */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f5f3ef inset !important;
    -webkit-text-fill-color: #1c421f !important;
}

/* Image lazy load transition */
img[loading="lazy"] {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"]:not(.loaded) {
    opacity: 0;
    transform: scale(1.02);
}
