:root {
    --primary: #1E4D2B;
    --secondary: #40916C;
    --accent: #B8860B;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

@keyframes loading-bar {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0);
    }
}

.animate-loading-bar {
    animation: loading-bar 3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* Custom Animations */
@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 4s ease-in-out infinite;
}

/* Navbar Scrolled State */
#navbar {
    padding-top: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
    padding-top: 0.75rem;
}

#navbar nav {
    @apply transition-all duration-500 rounded-2xl sm:rounded-full border border-white/40;
    background: rgba(242, 254, 239, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

#navbar.scrolled nav {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
}

.nav-link {
    @apply px-4 py-2 transition-all duration-300 relative text-gray-700 font-medium hover:text-primary;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: theme('colors.primary');
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link.active {
    @apply text-primary font-bold;
}

#mobile-menu {
    background: linear-gradient(135deg, #ffffff 0%, #f4fff7 100%);
}

.mobile-link {
    @apply flex items-center gap-4 px-6 py-4 rounded-2xl transition-all duration-300 text-gray-700 font-semibold border border-transparent;
}

.mobile-link:hover,
.mobile-link.active {
    @apply bg-white text-primary border-primary/10 shadow-md scale-[1.02];
}

.mobile-link.active {
    @apply border-l-4 border-l-primary pl-8;
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.revealed {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Service Cards with Glassmorphism */
.service-card {
    @apply bg-white/80 backdrop-blur-sm p-8 rounded-4xl shadow-[0_8px_30px_rgb(0, 0, 0, 0.04)] border border-white/50 hover:shadow-[0_20px_50px_rgba(46, 125, 50, 0.1)] hover:-translate-y-2 transition-all duration-500;
}

.service-card .icon-box {
    @apply w-25 h-25 bg-gradient-to-br from-primary/10 to-secondary/10 rounded-2xl flex items-center justify-center text-primary mb-6 transition-all duration-500;
}

.service-card:hover .icon-box {
    @apply from-primary to-secondary text-white scale-110 rotate-3;
}

.service-card h3 {
    @apply text-xl font-bold mb-3 tracking-tight;
}

.service-card p {
    @apply text-gray-600 leading-relaxed text-sm;
}

/* Impact Cards */
.impact-card {
    @apply bg-white rounded-3xl overflow-hidden shadow-[0_8px_30px_rgb(0, 0, 0, 0.04)] hover:shadow-xl transition-all duration-500 border border-green-50;
}

.impact-card:hover img {
    @apply scale-105;
}

.impact-card img {
    @apply transition-transform duration-700;
}

/* Gallery Item */
.gallery-item {
    @apply overflow-hidden rounded-3xl relative cursor-pointer shadow-md;
}

.gallery-item img {
    @apply w-full h-full object-cover transition-transform duration-1000;
}

.gallery-item:hover img {
    @apply scale-110;
}

.gallery-item::after {
    content: '';
    @apply absolute inset-0 bg-primary/20 opacity-0 transition-opacity duration-100;
}

.gallery-item:hover::after {
    @apply opacity-100;
}

/* Custom Gradient Text */
.text-gradient {
    @apply bg-clip-text text-transparent bg-gradient-to-r from-primary to-secondary;
}

/* Floating Animation for Hero Card */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(3deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Bot specific floating */
#agrivaan-bot {
    animation: bot-float 4s ease-in-out infinite;
}

@keyframes bot-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Swiper Continuous Auto-scroll */
.gallerySwiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}