/* Custom CSS for Namma Krushiyuga Foundation - Enhanced UI */

/* Root Variables - Nature Inspired Palette */
:root {
    --primary-green: #10b981;
    --dark-green: #047857;
    --light-green: #d1fae5;
    --forest-green: #065f46;
    --leaf-green: #34d399;
    --earth-brown: #78350f;
    --sky-blue: #0ea5e9;
    --sunset-orange: #f59e0b;
    --warm-yellow: #fbbf24;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background-light: #f0fdf4;
    --card-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    overflow-x: hidden;
    padding-top: 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
}

/* Custom Scrollbar - Enhanced */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-green), var(--dark-green));
    border-radius: 10px;
    border: 2px solid #d1fae5;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--leaf-green), var(--primary-green));
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Enhanced Text Shadows */
.text-shadow-lg {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Glass morphism effect - Enhanced */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1);
}

/* Enhanced hover effects */
.hero-card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hero-card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s;
}

.hero-card-hover:hover::before {
    left: 100%;
}

.hero-card-hover:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.2);
}

/* Subtle animations - Enhanced */
@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1);
    }
    50% { 
        transform: translateY(-15px) scale(1.02);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Nature Animation Styles - Enhanced */
@keyframes sway {
    0%, 100% { 
        transform: rotate(-3deg);
    }
    50% { 
        transform: rotate(3deg);
    }
}

@keyframes animate-sway {
    0%, 100% { 
        transform: rotate(-4deg) translateX(-3px);
    }
    50% { 
        transform: rotate(4deg) translateX(3px);
    }
}

/* Floating leaf animation - Enhanced */
@keyframes leafFloat {
    0% {
        transform: translateY(0px) rotate(0deg) translateX(0px);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-20px) rotate(90deg) translateX(5px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-15px) rotate(180deg) translateX(-5px);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-25px) rotate(270deg) translateX(5px);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0px) rotate(360deg) translateX(0px);
        opacity: 0.4;
    }
}

/* Tree branch gentle movement - Enhanced */
@keyframes branchSway {
    0%, 100% {
        transform: rotate(-2deg) scale(1);
    }
    50% {
        transform: rotate(2deg) scale(1.03);
    }
}

/* Grow animation for trees/plants */
@keyframes growUp {
    from {
        transform: scaleY(0);
        transform-origin: bottom;
        opacity: 0;
    }
    to {
        transform: scaleY(1);
        transform-origin: bottom;
        opacity: 1;
    }
}

/* Pulse glow effect */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
    }
}

/* Apply animations */
.animate-sway {
    animation: animate-sway 4s ease-in-out infinite;
}

.animate-leaf-float {
    animation: leafFloat 6s ease-in-out infinite;
}

.animate-branch-sway {
    animation: branchSway 5s ease-in-out infinite;
}

.animate-grow {
    animation: growUp 1s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes originalSway {
    0%, 100% { 
        transform: rotate(-2deg) translateX(-5px);
    }
    50% { 
        transform: rotate(2deg) translateX(5px);
    }
}



@keyframes treeGentleSway {
    0%, 100% { 
        transform: rotate(-0.5deg);
    }
    50% { 
        transform: rotate(0.5deg);
    }
}

.animate-gentle-float {
    animation: gentleFloat 3s ease-in-out infinite;
}

/* Tree Parallax Styles */
.parallax-layer {
    will-change: transform;
}

.tree-silhouette {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    animation: treeGentleSway 8s ease-in-out infinite;
}

.tree-silhouette svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Different animation delays for natural movement */
.tree-bg-1 { animation-delay: 0s; }
.tree-bg-2 { animation-delay: 2s; }
.tree-mid-1 { animation-delay: 1s; }
.tree-mid-2 { animation-delay: 3s; }
.tree-fg-1 { animation-delay: 1.5s; }
.tree-fg-2 { animation-delay: 2.5s; }
.tree-side-left-1 { animation-delay: 0.5s; }
.tree-side-right-1 { animation-delay: 3.5s; }



/* Section-specific tree styles */
.about-tree-1 { animation-delay: 1s; }
.about-tree-2 { animation-delay: 3s; }
.programs-tree-1 { animation-delay: 0.5s; }
.programs-tree-2 { animation-delay: 2.5s; }
.involved-tree-1 { animation-delay: 1.5s; }
.involved-tree-2 { animation-delay: 3.5s; }
.contact-tree-1 { animation-delay: 0.8s; }
.contact-tree-2 { animation-delay: 2.8s; }

/* Enhanced depth with different opacities based on distance */
.tree-silhouette[style*="scale(1.5)"] { opacity: 0.3; }
.tree-silhouette[style*="scale(1.4)"] { opacity: 0.35; }
.tree-silhouette[style*="scale(1.3)"] { opacity: 0.4; }
.tree-silhouette[style*="scale(1.2)"] { opacity: 0.45; }
.tree-silhouette[style*="scale(1.1)"] { opacity: 0.5; }
.tree-silhouette[style*="scale(0.9)"] { opacity: 0.7; }
.tree-silhouette[style*="scale(0.8)"] { opacity: 0.75; }
.tree-silhouette[style*="scale(0.7)"] { opacity: 0.8; }
.tree-silhouette[style*="scale(0.6)"] { opacity: 0.6; }
.tree-silhouette[style*="scale(0.5)"] { opacity: 0.65; }

/* Responsive adjustments for trees */
@media (max-width: 768px) {
    .tree-silhouette {
        transform: scale(0.7) !important;
    }
    
    .tree-side-left-1,
    .tree-side-right-1 {
        display: none;
    }
}

@media (max-width: 480px) {
    .tree-silhouette {
        transform: scale(0.5) !important;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Enhanced button styles */
.btn-enhanced {
    position: relative;
    overflow: hidden;
}

.btn-enhanced::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-enhanced:hover::before {
    left: 100%;
}

/* Improved card styles */
.card-enhanced {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.card-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Better spacing and typography */
.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation Enhancements */
nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(0) !important;
}

nav .max-w-7xl {
    margin: 0 auto;
    width: 100%;
    max-width: 1280px;
}

nav .flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3rem;
}

@media (min-width: 1024px) {
    nav .flex {
        height: 4rem;
    }
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute
    
    ;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background: linear-gradient(90deg, var(--primary-green), var(--dark-green));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

/* Hero Section Enhancements */
#home {
    margin-top: 0;
    padding-top: 5rem;
}

.hero-bg {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 50%, #f0f9ff 100%);
    position: relative;
}

@media (min-width: 1024px) {
    #home {
        padding-top: 6rem;
    }
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%2322c55e" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Custom Font Styles */
.font-playfair {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.font-dancing {
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.font-merriweather {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    line-height: 1.7;
}

.font-raleway {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Enhanced Typography */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* Green Theme Enhancements */
.green-glow {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.nature-text-shadow {
    text-shadow: 0 2px 8px rgba(21, 128, 61, 0.2);
}



/* Z-Index Utilities */
.z-5 {
    z-index: 5;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}



/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}



.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Custom Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    color: white;
    transform: translateY(-2px);
}

/* Card Enhancements - Modern Nature Theme */
.card {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green), var(--leaf-green), var(--primary-green));
    background-size: 200% 100%;
    transform: scaleX(0);
    transition: transform 0.4s ease;
    animation: shimmer 3s linear infinite;
}

.card:hover::before {
    transform: scaleX(1);
}

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 60px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Icon Styles - Enhanced */
.icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    position: relative;
}

.icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--leaf-green), var(--primary-green));
    border-radius: 22px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.card:hover .icon-wrapper::before {
    opacity: 1;
    animation: pulseGlow 2s ease-in-out infinite;
}

.card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
}

.icon-wrapper i {
    font-size: 28px;
    color: white;
    transition: transform 0.4s ease;
}

.card:hover .icon-wrapper i {
    transform: scale(1.1);
}

/* Button Styles - Nature Theme */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

/* Form Styles - Enhanced */
.form-input {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Statistics Section */
.stats-counter {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

/* Loading Animations */
.loading-fade {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.loaded .loading-fade {
    opacity: 1;
}

/* Parallax Elements */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gradient-border {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-green), var(--dark-green)) border-box;
    border: 2px solid transparent;
    border-radius: 15px;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .stats-counter {
        font-size: 2.5rem;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .icon-wrapper {
        width: 50px;
        height: 50px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #F9FAFB;
        --text-light: #D1D5DB;
        --background-light: #1F2937;
    }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Better Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    footer,
    #backToTop {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-dark);
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
}

/* Custom Selection */
::selection {
    background: var(--primary-green);
    color: white;
}

::-moz-selection {
    background: var(--primary-green);
    color: white;
}

/* Navigation scroll behavior */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Section spacing to account for fixed nav */
section {
    scroll-margin-top: 5rem;
}

@media (min-width: 1024px) {
    section {
        scroll-margin-top: 6rem;
    }
}

/* Fallback Styles for Browser Compatibility */
@supports not (backdrop-filter: blur()) {
    nav {
        background: rgba(255, 255, 255, 0.95) !important;
    }
}

/* Ensure all images load properly */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fix any potential layout issues */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* Reveal Animation for Scroll Elements */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Action Button */
#backToTop {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#backToTop:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
}

/* Custom Loader (if needed) */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-green);
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message Styles */
.notification-enter {
    transform: translateX(100%);
    opacity: 0;
}

.notification-enter-active {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s ease-out;
}

.notification-exit {
    transform: translateX(0);
    opacity: 1;
}

.notification-exit-active {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Image Card Enhancements */
.program-image {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.program-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.1), rgba(21, 128, 61, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.program-image:hover::before {
    opacity: 1;
}

.program-image img {
    transition: transform 0.4s ease;
}

.program-image:hover img {
    transform: scale(1.05);
}

/* Nature Theme Enhancements */
.nature-gradient {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
}

.leaf-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2322c55e' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

/* Decorative Elements */
.floating-decoration {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

.floating-decoration i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Background Image Overlays */
.background-overlay {
    position: relative;
}

.background-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* Enhanced Mobile Experience */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card {
        margin: 0 10px 20px;
    }
    
    nav {
        padding: 0 15px;
    }
    
    .program-image {
        height: 200px;
    }
    
    .floating-decoration {
        display: none;
    }
}

/* Donate Modal Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes rollUp {
    from {
        max-height: 500px;
        opacity: 1;
        transform: rotateX(0deg);
    }
    to {
        max-height: 0;
        opacity: 0;
        transform: rotateX(-90deg);
    }
}

@keyframes rollDown {
    from {
        max-height: 0;
        opacity: 0;
        transform: rotateX(-90deg);
    }
    to {
        max-height: 500px;
        opacity: 1;
        transform: rotateX(0deg);
    }
}

/* Animation Classes */
.animate-slide-in {
    animation: slideInUp 0.5s ease-out forwards;
}

.animate-slide-out {
    animation: slideOutDown 0.5s ease-in forwards;
}

.animate-fade-in {
    animation: fadeInScale 0.5s ease-out forwards;
}

.animate-fade-out {
    animation: fadeOutScale 0.5s ease-in forwards;
}

.animate-roll-up {
    animation: rollUp 0.6s ease-in-out forwards;
    transform-origin: top;
    perspective: 1000px;
}

.animate-roll-down {
    animation: rollDown 0.6s ease-in-out forwards;
    transform-origin: top;
    perspective: 1000px;
}

/* Donate Modal Specific Styles */
#qrSection, #bankDetailsSection {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

#qrSection.hiding {
    animation: rollUp 0.6s ease-in-out forwards;
}

#qrSection.showing {
    animation: rollDown 0.6s ease-in-out forwards;
}

#bankDetailsSection.hiding {
    animation: fadeOutScale 0.5s ease-in forwards;
}

#bankDetailsSection.showing {
    animation: fadeInScale 0.5s ease-out forwards;
}

/* Smooth height transition */
.height-transition {
    transition: max-height 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.5s ease,
                transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

/* QR Code hover effect */
#qrCodeImage {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#qrCodeImage:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Bank details row animation */
#bankDetailsSection .flex {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.4s ease-out forwards;
}

#bankDetailsSection.showing .flex:nth-child(1) { animation-delay: 0.1s; }
#bankDetailsSection.showing .flex:nth-child(2) { animation-delay: 0.15s; }
#bankDetailsSection.showing .flex:nth-child(3) { animation-delay: 0.2s; }
#bankDetailsSection.showing .flex:nth-child(4) { animation-delay: 0.25s; }
#bankDetailsSection.showing .flex:nth-child(5) { animation-delay: 0.3s; }
#bankDetailsSection.showing .flex:nth-child(6) { animation-delay: 0.35s; }
#bankDetailsSection.showing .flex:nth-child(7) { animation-delay: 0.4s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Navigation Bar Styles */
nav {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 253, 244, 0.95) 100%) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--leaf-green));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

/* Enhanced Section Backgrounds */
section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(16, 185, 129, 0.03) 50%, transparent 100%);
    pointer-events: none;
}

/* Leaf decoration elements */
.leaf-decoration {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
    color: var(--primary-green);
    animation: leafFloat 8s ease-in-out infinite;
}

.leaf-decoration:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.leaf-decoration:nth-child(2) { top: 30%; right: 10%; animation-delay: 2s; }
.leaf-decoration:nth-child(3) { bottom: 20%; left: 15%; animation-delay: 4s; }
.leaf-decoration:nth-child(4) { bottom: 10%; right: 5%; animation-delay: 6s; }

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green), var(--leaf-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
    background-size: 200% 100%;
}

/* Enhanced Image Styles */
img {
    transition: transform 0.4s ease, filter 0.4s ease;
}

img:hover {
    transform: scale(1.05);
    filter: brightness(1.05) contrast(1.05);
}

/* Stat Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 1s ease-out;
}

/* Loading Spinner for Images */
.image-loader {
    position: relative;
}

.image-loader::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Base font size adjustment */
    html {
        font-size: 14px;
    }
    
    body {
        padding-top: 44px;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.875rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    h4 {
        font-size: 1.25rem !important;
    }
    
    p {
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Section padding */
    section {
        padding: 3rem 1rem !important;
    }
    
    /* Container padding */
    .container, .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Card adjustments */
    .card {
        padding: 1.5rem !important;
        margin-bottom: 1.25rem !important;
        border-radius: 16px !important;
    }
    
    /* Button adjustments */
    button, .btn, a[class*="px-"] {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9375rem !important;
    }
    
    /* Icon wrapper */
    .icon-wrapper {
        width: 56px !important;
        height: 56px !important;
        margin-bottom: 1rem !important;
    }
    
    .icon-wrapper i {
        font-size: 24px !important;
    }
    
    /* Grid adjustments */
    .grid {
        gap: 1.25rem !important;
    }
    
    /* Modal adjustments */
    #donateModal .bg-white,
    #thankYouModal .bg-white {
        padding: 1.5rem !important;
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    #donateModalContent,
    #thankYouModalContent {
        max-width: calc(100vw - 2rem) !important;
    }
    
    /* Modal headings */
    #donateModal h3,
    #thankYouModal h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* QR Code size */
    #qrCodeImage {
        width: 220px !important;
        height: 220px !important;
    }
    
    /* Bank details cards */
    #bankDetailsSection .bg-white {
        padding: 0.875rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #bankDetailsSection span {
        font-size: 0.8125rem !important;
    }
    
    /* Form inputs */
    input, textarea, select {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
    }


    /* Navigation adjustments */
    nav {
        padding: 0.65rem 1rem !important;
    }
    
    /* Navbar brand text - larger on mobile */
    nav #name {
        font-size: 1.25rem !important;
        line-height: 1.2 !important;
    }
    
    /* Hero section */
    .hero-section {
        padding: 4rem 1rem !important;
    }
    
    /* Reduce body padding-top for mobile */
    body {
        padding-top: 60px !important;
    }
    
    /* Hero background image - make it taller and better positioned */
    #home .absolute.inset-0.opacity-50 img {
        min-height: 100vh !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    /* Hero title text - larger for mobile with tighter line height */
    #home h1 {
        font-size: 2.5rem !important;
        line-height: 1.05 !important;
        margin-bottom: 1.5rem !important;
    }
    
    #home h1 span {
        font-size: 2.5rem !important;
        line-height: 1.05 !important;
    }
    
    /* Reduce hero container padding */
    #home .relative.z-10 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    /* Even smaller font size */
    html {
        font-size: 13px;
    }
    
    /* Typography - Extra small screens */
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.1 !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    
    h4, h5, h6 {
        font-size: 1.125rem !important;
    }
    
    p, span, div {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }
    
    /* Tighter sections */
    section {
        padding: 2.5rem 0.875rem !important;
    }

    /* Even tighter body padding */
    body {
        padding-top: 56px !important;
    }
    
    /* Compact cards */
    .card {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    
    /* Smaller buttons */
    button, .btn, a[class*="px-"] {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
        border-radius: 25px !important;
    }
    
    /* Compact icon wrapper */
    .icon-wrapper {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .icon-wrapper i {
        font-size: 20px !important;
    }
    
    /* Modal adjustments */
    #donateModal .bg-white,
    #thankYouModal .bg-white {
        padding: 1rem !important;
        margin: 0.5rem !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
    }
    
    #donateModal h3,
    #thankYouModal h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    #donateModal p,
    #thankYouModal p {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Smaller QR Code */
    #qrCodeImage {
        width: 160px !important;
        height: 160px !important;
        border-width: 3px !important;
    }
    
    /* Bank details - More compact */
    #bankDetailsSection .bg-gradient-to-br {
        padding: 0.75rem !important;
    }
    
    #bankDetailsSection .bg-white {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    #bankDetailsSection span.text-xs {
        font-size: 0.625rem !important;
    }
    
    #bankDetailsSection span.block {
        font-size: 0.6875rem !important;
    }
    
    #bankDetailsSection .text-lg {
        font-size: 0.875rem !important;
    }
    
    /* HDFC Logo - larger for mobile */
    #bankDetailsSection img {
        height: 3rem !important;
    }
    
    /* Copy button smaller */
    #bankDetailsSection button {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
        margin-top: 0.5rem !important;
    }
    
    /* Modal icon */
    #donateModal .w-12,
    #thankYouModal .w-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Toggle button */
    #toggleDetailsBtn {
        padding: 0.625rem 1rem !important;
        font-size: 0.8125rem !important;
        margin-top: 0.5rem !important;
    }
    
    /* Form fields */
    input, textarea, select {
        padding: 0.75rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
    
    textarea {
        min-height: 120px !important;
    }
    
    /* Grid spacing */
    .grid {
        gap: 1rem !important;
    }
    
    /* Reduced spacing */
    .space-y-4 > * + * {
        margin-top: 0.75rem !important;
    }
    
    .space-y-6 > * + * {
        margin-top: 1rem !important;
    }
    
    /* Navigation */
    nav {
        padding: 0.625rem 0.875rem !important;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Navbar brand text - even larger on small mobile */
    nav #name {
        font-size: 1.125rem !important;
        line-height: 1.2 !important;
    }
    
    /* Hero section */
    .hero-section {
        padding: 3rem 0.875rem !important;
        min-height: auto !important;
    }
    
    /* Hero background - ensure full coverage */
    #home {
        min-height: 100vh !important;
    }
    
    #home .absolute.inset-0.opacity-50 {
        height: 100% !important;
    }
    
    #home .absolute.inset-0.opacity-50 img {
        min-height: 100vh !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    /* Hero title - larger and bolder with tighter line height */
    #home h1 {
        font-size: 2.25rem !important;
        line-height: 1.0 !important;
        margin-bottom: 1.25rem !important;
        font-weight: 800 !important;
    }
    
    #home h1 span {
        font-size: 2.25rem !important;
        line-height: 1.0 !important;
        display: block !important;
    }
    
    /* Reduce hero container padding */
    #home .relative.z-10 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Hero badge - reduce margin */
    #home .inline-flex.items-center {
        margin-bottom: 1rem !important;
        padding: 0.375rem 1rem !important;
    }
    
    /* Hero pillars - better spacing */
    #home .flex.flex-wrap.justify-center {
        gap: 0.5rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    #home .flex.flex-wrap.justify-center span.bg-white {
        font-size: 0.75rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Footer adjustments */
    footer {
        padding: 2rem 0.875rem !important;
    }
    
    footer h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    footer p, footer a {
        font-size: 0.8125rem !important;
    }
}

/* Small mobile phones (360px and below) */
@media (max-width: 360px) {
    html {
        font-size: 12px;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    /* Hero title override - keep it large with tight line height */
    #home h1 {
        font-size: 2rem !important;
        line-height: 0.95 !important;
    }
    
    #home h1 span {
        font-size: 2rem !important;
        line-height: 0.95 !important;
    }
    
    /* Further reduce hero padding */
    #home .relative.z-10 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Navbar brand text - maintain size on very small screens */
    nav #name {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.375rem !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
    
    section {
        padding: 2rem 0.75rem !important;
    }
    
    .card {
        padding: 1rem !important;
    }
    
    button, .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8125rem !important;
    }
    
    /* Modal even more compact */
    #donateModal .bg-white,
    #thankYouModal .bg-white {
        padding: 0.75rem !important;
        margin: 0.5rem !important;
        max-height: 90vh !important;
    }
    
    #donateModal h3,
    #thankYouModal h3 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    #qrCodeImage {
        width: 140px !important;
        height: 140px !important;
    }
    
    #bankDetailsSection .bg-gradient-to-br {
        padding: 0.5rem !important;
    }
    
    #bankDetailsSection .bg-white {
        padding: 0.375rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    #bankDetailsSection img {
        height: 2.5rem !important;
    }
    
    #bankDetailsSection button {
        padding: 0.375rem 0.625rem !important;
        font-size: 0.6875rem !important;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    section {
        padding: 2rem 1rem !important;
    }
    
    .hero-section {
        padding: 2.5rem 1rem !important;
        min-height: 70vh !important;
    }
    
    #donateModal .bg-white,
    #thankYouModal .bg-white {
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets */
    button, a, input, select, textarea {
        min-height: 44px !important;
    }
    
    .nav-link {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Better tap feedback */
    button:active, a:active {
        transform: scale(0.97) !important;
        opacity: 0.9 !important;
    }
}