/* ================ Base Styles ================ */
:root {
    --primary: #013D01;
    --primary-light: #00723F;
    --primary-dark: #001F00;
    --secondary: #1f2937;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --gray-light: #f8fafc;
    --gray-dark: #374151;
    --green-professional: #013D01;
    --green-secondary: #00723F;
    --green-accent: #059669;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    @apply text-gray-900 overflow-x-hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}

.font-heading {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ================ Colors ================ */
.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.text-primary-light {
    color: var(--primary-light) !important;
}

.bg-primary-dark {
    background-color: var(--primary-dark) !important;
}

.text-primary-dark {
    color: var(--primary-dark) !important;
}

/* ================ Utility Classes ================ */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-pattern {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(5, 150, 105, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

/* ================ Components ================ */
/* Navigation */
.nav-link {
    @apply text-gray-700 hover:text-primary transition-colors duration-300;
    position: relative;
}

.nav-link.active {
    @apply text-primary font-medium;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

/* Cards */
.service-card {
    @apply bg-white rounded-xl p-6 shadow-sm hover:shadow-md transition-all duration-300;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-2px);
}

/* Buttons */
.btn-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ================ Unified Animations System ================ */

/* Primary Animation Keyframes */
@keyframes heroAnimate {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-30px); }
    70% { transform: translateY(-15px); }
    90% { transform: translateY(-4px); }
}

/* Unified Animation Classes */
.hero-animate {
    opacity: 0;
    animation: heroAnimate 0.8s ease-out forwards;
}

.hero-animate:nth-child(1) { animation-delay: 0.1s; }
.hero-animate:nth-child(2) { animation-delay: 0.2s; }
.hero-animate:nth-child(3) { animation-delay: 0.3s; }
.hero-animate:nth-child(4) { animation-delay: 0.4s; }

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-bounce { animation: bounce 1s infinite; }

/* Scroll-triggered animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for child elements */
.stagger-children .scroll-animate:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .scroll-animate:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .scroll-animate:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .scroll-animate:nth-child(4) { transition-delay: 0.4s; }

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Delay Classes */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* ================ Preloader ================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ================ Mobile Menu ================ */
#mobile-menu {
    transition: all 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

/* ================ Consistent Layout Standards ================ */

/* Standard section spacing */
.section-padding {
    @apply py-20;
}

.section-padding-sm {
    @apply py-16;
}

.section-padding-lg {
    @apply py-24;
}

/* Container consistency */
.container-standard {
    @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
}

.container-narrow {
    @apply max-w-4xl mx-auto px-4 sm:px-6 lg:px-8;
}

/* Card consistency */
.card-standard {
    @apply bg-white rounded-xl p-6 shadow-sm hover:shadow-md transition-all duration-300;
}

.card-featured {
    @apply bg-white rounded-2xl p-8 shadow-sm hover:shadow-xl transition-all duration-500 border border-gray-100;
}

/* Button consistency */
.btn-primary {
    @apply bg-primary text-white px-8 py-4 rounded-xl font-semibold hover:bg-primary-dark transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl;
}

.btn-secondary {
    @apply bg-white text-primary px-8 py-4 rounded-xl font-semibold border-2 border-primary hover:bg-primary hover:text-white transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl;
}

/* ================ Enhanced Responsive Design ================ */
@media (max-width: 1024px) {
    .lg\:col-span-2,
    .lg\:col-span-4 {
        grid-column: span 1 !important;
    }
    
    .hero-carousel .slide h1 {
        font-size: 3rem !important;
        line-height: 1.2;
    }
    
    .service-card-modern:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@media (max-width: 768px) {
    /* Hero Section Mobile Optimization */
    .hero-carousel .slide h1 {
        font-size: 2.5rem !important;
        padding: 0 1rem;
    }
    
    .hero-carousel .content-hidden p {
        font-size: 1.1rem !important;
        padding: 0 1rem;
    }
    
    /* Button Mobile Optimization */
    .hero-carousel .content-hidden .flex {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .hero-carousel button {
        width: 100%;
        justify-content: center;
    }
    
    /* Stats Section Mobile */
    .grid.grid-cols-2.md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-card .counter {
        font-size: 1.5rem !important;
    }
    
    /* Service Cards Mobile */
    .service-card-modern {
        margin-bottom: 1.5rem;
        height: auto;
        min-height: 250px;
    }
    
    /* Navigation Mobile Improvements */
    .nav-link {
        padding: 0.75rem 0;
        font-size: 1.1rem;
    }
    
    /* Card hover effects - disable complex animations */
    .card-3d:hover {
        transform: translateY(-2px);
    }
    
    /* Touch-friendly improvements */
    button, .btn-hover {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 640px) {
    /* Small mobile optimizations */
    .hero-carousel .slide h1 {
        font-size: 2rem !important;
        line-height: 1.1;
    }
    
    .hero-carousel .content-hidden p {
        font-size: 1rem !important;
    }
    
    /* Stats single column on very small screens */
    .grid.grid-cols-2.md\:grid-cols-4 {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Service cards full width */
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    /* Reduce padding/margins */
    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .hero-carousel .slide h1 {
        font-size: 1.75rem !important;
    }
    
    .hero-carousel button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .stats-card {
        padding: 0.75rem;
    }
    
    .stats-card .counter {
        font-size: 1.25rem !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable complex hover effects on touch devices */
    .btn-hover:hover,
    .service-card-modern:hover,
    .card-3d:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    button, .btn-hover, a {
        min-height: 44px;
    }
    
    /* Simplify animations for better performance */
    .animate-pulse,
    .animate-spin {
        animation-duration: 2s;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-carousel .slide {
        background-size: cover;
        background-attachment: scroll; /* Better performance on mobile */
    }
}
    
         /* ================ Additional Utilities ================ */
         .glass-effect {
             background: rgba(255, 255, 255, 0.15);
             backdrop-filter: blur(20px);
             -webkit-backdrop-filter: blur(20px);
             border: 1px solid rgba(255, 255, 255, 0.2);
         }

         /* Modern Shadow Effects */
         .shadow-3xl {
             box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.25);
         }

         .shadow-glow {
             box-shadow: 0 0 30px rgba(5, 150, 105, 0.3);
         }

         /* Smooth Animations */
         .animate-blob {
             animation: blob 7s infinite;
         }

         .animation-delay-2000 {
             animation-delay: 2s;
         }

         .animation-delay-4000 {
             animation-delay: 4s;
         }

         @keyframes blob {
             0% { transform: translate(0px, 0px) scale(1); }
             33% { transform: translate(30px, -50px) scale(1.1); }
             66% { transform: translate(-20px, 20px) scale(0.9); }
             100% { transform: translate(0px, 0px) scale(1); }
         }

         /* Enhanced Button Styles */
         .btn-modern {
             position: relative;
             overflow: hidden;
             transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
             transform-style: preserve-3d;
         }

         .btn-modern::before {
             content: '';
             position: absolute;
             top: 0;
             left: -100%;
             width: 100%;
             height: 100%;
             background: linear-gradient(
                 90deg,
                 transparent,
                 rgba(255, 255, 255, 0.2),
                 transparent
             );
             transition: left 0.5s;
         }

         .btn-modern:hover::before {
             left: 100%;
         }

         /* Card Hover Effects */
         .card-3d {
             transform-style: preserve-3d;
             transition: all 0.3s ease;
         }

         .card-3d:hover {
             transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
         }

         /* Gradient Text Enhanced */
         .gradient-text-enhanced {
             background: linear-gradient(135deg, #059669, #10b981, #34d399);
             -webkit-background-clip: text;
             -webkit-text-fill-color: transparent;
             background-clip: text;
             background-size: 200% 200%;
             animation: gradientShift 4s ease infinite;
         }

         @keyframes gradientShift {
             0%, 100% { background-position: 0% 50%; }
             50% { background-position: 100% 50%; }
         }

         /* Improved Service Cards */
         .service-card-modern {
             position: relative;
             overflow: hidden;
             transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
             transform-origin: center;
         }

         .service-card-modern::before {
             content: '';
             position: absolute;
             top: 0;
             left: 0;
             right: 0;
             bottom: 0;
             background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
             transform: translateX(-100%);
             transition: transform 0.6s;
         }

         .service-card-modern:hover::before {
             transform: translateX(100%);
         }

         /* Mobile Optimizations */
         @media (max-width: 768px) {
             .card-3d:hover {
                 transform: none;
             }
             
             .service-card-modern:hover {
                 transform: translateY(-4px);
             }
         }
    
         .particle {
             position: absolute;
             width: 4px;
             height: 4px;
             background: rgba(255, 255, 255, 0.6);
             border-radius: 50%;
             animation: float 6s ease-in-out infinite;
         }
    
         /* Carousel Styles */
         .hero-carousel {
             position: relative;
             overflow: hidden;
         }
    
         .slide {
             position: absolute;
             top: 0;
             left: 0;
             width: 100%;
             height: 100%;
             opacity: 0;
             transition: opacity 1s ease-in-out;
         }
    
         .slide.slide-active {
             opacity: 1;
         }
    
         .nav-btn {
             position: absolute;
             top: 50%;
             transform: translateY(-50%);
             background: rgba(255, 255, 255, 0.2);
             border: none;
             color: white;
             width: 50px;
             height: 50px;
             border-radius: 50%;
             display: flex;
             align-items: center;
             justify-content: center;
             cursor: pointer;
             transition: all 0.3s ease;
             z-index: 10;
         }
    
         .nav-btn:hover {
             background: rgba(255, 255, 255, 0.3);
             transform: translateY(-50%) scale(1.1);
         }
    
         .nav-btn.prev {
             left: 30px;
         }
    
         .nav-btn.next {
             right: 30px;
         }
    
         .carousel-dots {
             position: absolute;
             bottom: 30px;
             left: 50%;
             transform: translateX(-50%);
             display: flex;
             gap: 12px;
             z-index: 10;
         }
    
         .carousel-dot {
             width: 12px;
             height: 12px;
             border-radius: 50%;
             background: rgba(255, 255, 255, 0.5);
             border: none;
             cursor: pointer;
             transition: all 0.3s ease;
         }
    
         .carousel-dot.active {
             background: white;
             transform: scale(1.2);
         }
    
         .progress-bar-container {
             position: absolute;
             top: 0;
             left: 0;
             width: 100%;
             height: 4px;
             background: rgba(255, 255, 255, 0.2);
             z-index: 10;
         }
    
         .progress-bar {
             height: 100%;
             background: linear-gradient(90deg, #059669, #10b981);
             width: 0%;
             transition: width 5s linear;
         }
    
         .content-hidden {
             opacity: 0;
             transform: translateY(30px);
             animation: fadeIn 0.8s ease-out forwards;
         }
    
         .content-hidden:nth-child(1) {
             animation-delay: 0.2s;
         }
    
         .content-hidden:nth-child(2) {
             animation-delay: 0.4s;
         }
    
         .content-hidden:nth-child(3) {
             animation-delay: 0.6s;
         }
    
         .content-hidden:nth-child(4) {
             animation-delay: 0.8s;
         }
    
         @keyframes fadeIn {
             to {
                 opacity: 1;
                 transform: translateY(0);
             }
         }
    
         /* Counter animation */
         .counter {
             transition: all 0.5s ease;
         }
    
         /* Responsive adjustments */
         @media (max-width: 768px) {
             .nav-btn {
                 width: 40px;
                 height: 40px;
             }
    
             .nav-btn.prev {
                 left: 15px;
             }
    
             .nav-btn.next {
                 right: 15px;
             }
         }
    
      