/* --- 1. CSS VARIABLES & RESET --- */
:root {
    --primary-green: #54B435;
    --primary-dark: #0F172A;
    --text-dark: #334155; /* Modern soft slate text */
    --text-light: #ffffff;
    --bg-light: #f8fafc; /* Sleek, cleaner background */
    --gray-border: #e2e8f0;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --font-serif: 'Merriweather', serif;
    --container-width: 1280px;
    --mpesa-green: #4CAF50;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Faster, smoother ease-out */
    
    /* Responsive Spacing */
    --section-padding: 100px;
    --section-padding-mobile: 60px;
    
    /* Premium Shadow System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-premium: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
}

/* --- Premium Selection Color --- */
::selection {
    background-color: var(--primary-green);
    color: white;
}

/* --- Premium Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

* { margin: 0; padding: 0; box-sizing: border-box; max-width: 100vw; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-gutter: stable;
    overflow-x: hidden;
}

.main-header.nav-open {
    background-color: white !important;
    box-shadow: none;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Global horizontal scroll prevention */
    width: 100%;
}

h1, h2, h3, h4, h5 { 
    font-family: var(--font-heading); 
    font-weight: 700; 
    color: var(--primary-dark); 
    line-height: 1.2; 
    margin-bottom: 1.5rem;
}

/* Fluid Headings */
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { margin-bottom: 1.2rem; }

img { max-width: 100%; height: auto; display: block; }

/* --- UTILITY CLASSES --- */
.text-center { text-align: center; }
.text-green { color: var(--primary-green); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.py-80 { padding-top: 80px; padding-bottom: 80px; }

/* Responsive Grid / Flex System */
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; gap: 20px; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; align-items: center; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .flex { flex-direction: column; }
    section { padding: var(--section-padding-mobile) 0; }
}

/* --- SKELETON SCREEN ANIMATION --- */
.skeleton {
    background: #e2e8f0;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 8px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

@keyframes shine {
    to { background-position-x: -200%; }
}

.skeleton-card {
    height: 300px;
    width: 100%;
    margin-bottom: 20px;
}

/* --- LAYOUT & SPACING --- */
section {
    padding: var(--section-padding) 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1600px) {
    .container { max-width: 1400px; }
}

/* --- CARDS & BOXES --- */
.card {
    background: white;
    border-radius: 16px;
    padding: clamp(20px, 4vw, 40px);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-border);
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(84, 180, 53, 0.25);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--primary-green);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid var(--primary-green);
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 50px; /* Modern rounded look */
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(84, 180, 53, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
}

.btn-outline:hover {
    background-color: var(--primary-green);
    color: white;
}

/* --- 2. TOP BAR --- */
.top-bar {
    background-color: var(--primary-dark);
    padding: 10px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.contact-links { display: flex; align-items: center; }
.contact-links span { display: inline-flex; align-items: center; gap: 8px; }
.contact-links i { color: var(--primary-green); }
.social-icons a { margin-left: 15px; color: rgba(255, 255, 255, 0.8); transition: var(--transition); }
.social-icons a:hover { color: var(--primary-green); transform: translateY(-2px); }

@media (max-width: 600px) {
    .contact-links { display: none; }
    .top-bar .container { justify-content: center; }
    .social-icons a { margin: 0 10px; }
}

/* --- 3. PROFESSIONAL HEADER --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 18px 0;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.main-header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
    border-bottom: 1px solid rgba(84, 180, 53, 0.08);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 52px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.main-header.scrolled .logo img {
    height: 42px;
}

.logo img:hover { transform: scale(1.04); }

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    position: relative;
    padding: 8px 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.8px;
    text-decoration: none;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover { 
    color: var(--primary-green); 
    background-color: rgba(84, 180, 53, 0.06);
}

.nav-link.active {
    color: var(--primary-green);
    background-color: rgba(84, 180, 53, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-green);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 10px;
    opacity: 0;
}

.nav-link.active::after {
    width: 20px;
    opacity: 1;
}

.nav-link:hover::after {
    width: 15px;
    opacity: 0.6;
}

/* --- DROPDOWN NAVIGATION --- */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(12px);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 260px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    list-style: none;
    padding: 12px 6px;
    z-index: 1001;
    border: 1px solid rgba(84, 180, 53, 0.08);
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 24px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.98);
}

.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(2px);
}

.dropdown li {
    margin-bottom: 2px;
}

.dropdown li:last-child {
    margin-bottom: 0;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 10px;
}

.dropdown a:hover {
    background-color: rgba(84, 180, 53, 0.06);
    color: var(--primary-green);
    transform: translateX(4px);
}

.dropdown a.active {
    background-color: rgba(84, 180, 53, 0.1);
    color: var(--primary-green);
    font-weight: 700;
}

.nav-link i {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

/* --- NAV CTA BUTTON --- */
.nav-cta-btn {
    background: linear-gradient(135deg, #54B435 0%, #2E7D32 100%);
    color: white !important;
    padding: 11px 24px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-left: 15px;
    box-shadow: 0 4px 15px rgba(84, 180, 53, 0.25);
}

.nav-cta-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(84, 180, 53, 0.4);
    filter: brightness(1.1);
}

.nav-cta-btn:active {
    transform: translateY(-1px);
}

/* --- MOBILE TOGGLE --- */
.mobile-toggle { 
    display: none; 
    font-size: 1.4rem; 
    cursor: pointer; 
    color: var(--primary-dark); 
    transition: var(--transition);
    background: none;
    border: none;
    padding: 10px;
    border-radius: 50%;
}

.mobile-toggle:hover { 
    background-color: rgba(0,0,0,0.05);
    color: var(--primary-green); 
}

/* --- MOBILE RESPONSIVE NAV --- */
@media (max-width: 992px) {
    .nav-menu { gap: 0; }
    .nav-link { padding: 10px 12px; font-size: 0.8rem; }
}

@media (max-width: 768px) {
    .main-header { padding: 15px 0; }
    .main-header.scrolled { padding: 10px 0; }
    
    .mobile-toggle { 
        display: block; 
        position: relative;
        z-index: 3000; /* Higher than main-nav and overlay */
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 310px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(84, 180, 53, 0.1);
        transform: translateX(100%); /* Start off-screen to the right */
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2000;
        flex-direction: column;
        padding: 90px 0 40px;
        box-shadow: -15px 0 40px rgba(15, 23, 42, 0.06);
        overflow-y: auto;
        visibility: hidden; /* Hide when not active */
    }

    .main-nav.active { 
        transform: translateX(0); /* Slide in from right */
        visibility: visible;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 1999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu { 
        flex-direction: column; 
        gap: 0; 
        width: 100%; 
        padding: 0 20px; 
        align-items: flex-start;
    }

    .nav-menu li { width: 100%; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .nav-menu li:last-child { border-bottom: none; }

    .nav-link {
        width: 100%;
        padding: 18px 10px;
        font-size: 1rem;
        justify-content: space-between;
    }

    .nav-link::after { display: none; }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 15px 0; /* Removed horizontal padding here */
        display: none; 
        width: 100%;
        background-color: #ffffff; /* Solid white background */
        margin-top: 0;
        border-radius: 0;
    }

    .dropdown::before { display: none; }

    .has-dropdown.active .dropdown {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .dropdown a {
        padding: 12px 30px; /* Indented left padding for sub-menu links */
        border-radius: 0;
    }

    .nav-cta-item { 
        margin-top: 25px; 
        padding: 0 10px; 
        width: 100%;
        border-bottom: none !important;
    }

    .nav-cta-btn {
        width: 100%;
        margin-left: 0;
        text-align: center;
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* --- 4. FLOATING DONATE BUTTON --- */
.floating-donate-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--mpesa-green);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid white;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.floating-donate-btn:hover { transform: scale(1.1) translateY(-5px); background-color: #388E3C; }
.floating-donate-btn img { height: 25px; }

@media (max-width: 600px) {
    .floating-donate-btn {
        bottom: 20px;
        left: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* --- 5. M-PESA MODAL & SPINNER --- */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--mpesa-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-state {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.processing-state.active {
    display: flex;
}

.modal-content-form.hidden {
    display: none;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto; /* Allow overlay to scroll if box is too big */
    padding: 20px 0; /* Add safe margin at top and bottom */
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-box {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(84, 180, 53, 0.15);
    padding: 40px;
    border-radius: 24px;
    width: 95%;
    max-width: 480px;
    text-align: center;
    position: relative;
    transform: scale(0.95) translateY(15px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
    max-height: 90vh; /* Don't exceed screen height */
    overflow-y: auto; /* Enable scroll inside if content is too long */
}
.modal-overlay.active .modal-box { transform: scale(1) translateY(0); opacity: 1; }

/* --- 8. INLINE VALIDATION STYLES --- */
.form-group { position: relative; }
.validation-message {
    font-size: 0.78rem;
    color: #e11d48;
    margin-top: 4px;
    height: 18px;
    transition: opacity 0.3s;
    opacity: 0;
    text-align: left;
    font-weight: 600;
}
.validation-message.active { opacity: 1; }
input.invalid { border-color: #e11d48 !important; background-color: #fff1f2 !important; box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08) !important; }
input.valid { border-color: var(--primary-green) !important; box-shadow: 0 0 0 4px rgba(84, 180, 53, 0.08) !important; }

.close-modal { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px; 
    cursor: pointer; 
    color: #64748b; 
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.close-modal:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.mpesa-logo { height: 60px; margin-bottom: 20px; }
.input-group { margin-bottom: 18px; text-align: left; }
.input-group label { 
    display: block; 
    font-size: 0.78rem; 
    margin-bottom: 6px; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #475569;
}
.input-group input { 
    width: 100%; 
    padding: 13px 16px; 
    border: 1.5px solid #cbd5e1; 
    border-radius: 10px; 
    font-size: 0.95rem; 
    transition: all 0.25s ease;
    color: #0f172a;
    background-color: #fff;
}
.input-group input::placeholder {
    color: #94a3b8;
}
.input-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(84, 180, 53, 0.15);
}

.status-success { color: #155724; background-color: #d4edda; padding: 10px; border-radius: 4px; display: block; margin-top: 10px; }
.status-error { color: #721c24; background-color: #f8d7da; padding: 10px; border-radius: 4px; display: block; margin-top: 10px; }

/* --- 6. FOOTER --- */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

.footer-col h5 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h5::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--primary-green);
    bottom: 0;
    left: 0;
}

.footer-col p { color: #cbd5e1; font-size: 0.95rem; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #cbd5e1; font-size: 0.95rem; }
.footer-links a:hover { color: var(--primary-green); padding-left: 5px; }

.contact-info li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.contact-info i { color: var(--primary-green); margin-top: 5px; }

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

.powered-by-link {
    color: var(--primary-green) !important;
    font-weight: 700;
    text-decoration: none !important;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    position: relative;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.powered-by-link:hover {
    color: white !important;
    background-color: var(--primary-green);
    transform: translateY(-2px);
    display: inline-block;
    box-shadow: 0 4px 10px rgba(84, 180, 53, 0.3);
}

/* --- 7. PWA INSTALL BANNER --- */
.pwa-install-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-dark);
    color: white;
    padding: 15px 20px;
    z-index: 10001;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-family: var(--font-heading);
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.pwa-text h4 {
    color: white;
    font-size: 0.95rem;
    margin: 0;
}

.pwa-text p {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin: 0;
}

.pwa-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.install-btn-small {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.3s;
}

.install-btn-small:hover {
    background-color: #388E3C;
}

.close-pwa {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.close-pwa:hover {
    color: white;
}

@media (max-width: 600px) {
    .pwa-text p { display: none; }
    .pwa-install-banner { padding: 10px 15px; }
}

/* --- 8. IMPACT TICKER --- */
.impact-ticker {
    background-color: var(--primary-dark);
    color: white;
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-top: 2px solid var(--primary-green);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 40s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 50px;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.ticker-item i {
    color: var(--primary-green);
    margin-right: 10px;
}

.ticker-item strong {
    color: var(--primary-green);
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.impact-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* --- 9. DYNAMIC IMPACT TRACKER --- */
.stats-numbers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.stat-box { 
    padding: 30px 20px; 
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    text-align: center;
    background: var(--bg-light);
    transition: var(--transition);
}
.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
.stat-box h2 { 
    color: var(--primary-green); 
    margin-bottom: 0.5rem; 
    display: inline-block;
    font-size: 2.5rem;
}
.stat-suffix {
    font-size: 1.5rem;
    color: var(--primary-green);
    font-weight: 700;
    margin-left: 2px;
}
.stat-box p { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; margin: 0; color: #666; }

.impact-progress-container {
    margin-top: 40px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.progress-header h4 { margin: 0; font-size: 1rem; }
.progress-percentage {
    font-weight: 800;
    color: var(--primary-green);
    font-size: 1.2rem;
}
.progress-track {
    width: 100%;
    height: 12px;
    background-color: #eef2ed;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), #388E3C);
    width: 0;
    border-radius: 10px;
    transition: width 2s cubic-bezier(0.1, 0.5, 0.5, 1);
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

/* --- 10. INTERACTIVE MAP --- */
.map-section {
    padding: 80px 0;
    background: white;
}
#map {
    height: 500px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    z-index: 1;
    border: 8px solid white;
}
.map-container-wrap {
    position: relative; 
    height: 600px; 
    background: #f8fafc; 
    border-radius: 35px; 
    overflow: hidden; 
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(84, 180, 53, 0.06);
}
.map-overlay-card {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 35px;
    border-radius: 24px;
    max-width: 360px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 6px solid var(--primary-green);
}
.map-overlay-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.map-overlay-card p { margin: 0; font-size: 0.9rem; color: #666; }

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 5px;
}
.leaflet-popup-content h4 {
    color: var(--primary-green);
    margin-bottom: 5px;
    font-size: 1.1rem;
}
.leaflet-popup-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    #map { height: 400px; }
    .map-overlay-card {
        position: static;
        max-width: 100%;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid var(--gray-border);
        border-left: 5px solid var(--primary-green);
    }
}

/* --- 11. CORPORATE PARTNER CAROUSEL --- */
.partners-section {
    padding: 80px 0;
    background-color: #f8fafc;
    border-top: 1px solid var(--gray-border);
    overflow: hidden;
}

.logo-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.logo-slider {
    display: flex;
    align-items: center;
    gap: 40px;
    width: max-content;
    animation: scrollLogos 60s linear infinite;
    animation-play-state: paused; /* Start paused, JS will play when visible */
}

.logo-slider.is-visible {
    animation-play-state: running;
}

.logo-slider:hover {
    animation-play-state: running; /* Keep running on hover, maybe speed up? */
    animation-duration: 40s; /* Speed up slightly on hover for "move when cursor is on them" feel */
}

.partner-logo {
    width: 250px;
    height: 150px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.06);
}

.partner-logo:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-color: var(--primary-green);
    z-index: 10;
}

@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-290px * 18)); } /* (Width 250px + Gap 40px) * 18 images */
}

.partners-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary-green);
    font-weight: 800;
}

/* --- 12. NEWSLETTER WIDGET --- */
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.9rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-btn {
    padding: 10px 20px;
    border-radius: 50px;
    background: var(--primary-green);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}
.newsletter-btn:hover { background: #388E3C; transform: translateY(-2px); }

/* --- 13. EXPANDED PAYMENT OPTIONS --- */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}
.method-card {
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.method-card:hover {
    border-color: rgba(84, 180, 53, 0.4);
    background-color: rgba(84, 180, 53, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(84, 180, 53, 0.06);
}
.method-card img, .method-card svg {
    height: 28px;
    width: auto;
    margin: 0 auto 8px;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}
.method-card:hover img, .method-card:hover svg {
    transform: scale(1.06);
}
.method-card p {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.method-card.active {
    border-color: var(--primary-green);
    background: linear-gradient(135deg, rgba(84, 180, 53, 0.05) 0%, rgba(84, 180, 53, 0.01) 100%);
    box-shadow: 0 8px 20px rgba(84, 180, 53, 0.12);
}
.method-card.active p { 
    color: var(--primary-green); 
}

.payment-tab { display: none; }
.payment-tab.active { display: block; animation: fadeInModal 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes fadeInModal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.modal-banner-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    object-fit: cover;
    max-height: 200px;
}

/* --- 14. CHATBOT WIDGET --- */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-heading);
}

.chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green) 0%, #2E7D32 100%);
    border: 2px solid white;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(84, 180, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    animation: chatbot-pulse 2s infinite;
}

@keyframes chatbot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(84, 180, 53, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(84, 180, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(84, 180, 53, 0); }
}

.chatbot-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    background: #388E3C;
    box-shadow: 0 12px 30px rgba(84, 180, 53, 0.5);
}

/* Tooltip Styling */
.chatbot-tooltip {
    position: absolute;
    bottom: 75px;
    right: 0;
    background-color: var(--primary-dark);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    width: 250px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    line-height: 1.4;
    text-align: left;
    border-left: 3px solid var(--primary-green);
    pointer-events: none;
}

.chatbot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--primary-dark) transparent transparent transparent;
}

.chatbot-widget:hover .chatbot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(84, 180, 53, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    background: var(--primary-dark);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 38px;
    height: 38px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 10px rgba(84, 180, 53, 0.3);
}

.chat-header-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.online-indicator {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}

.online-indicator .dot {
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
    display: inline-block;
    animation: blinker-dot 1.5s infinite;
}

@keyframes blinker-dot {
    50% { opacity: 0.4; }
}

.close-chat {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

.close-chat:hover {
    color: white;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.chat-message.bot .message-content {
    background: white;
    color: #334155;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
}

.chat-message.user .message-content {
    background: var(--primary-green);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(84, 180, 53, 0.15);
}

/* Chat Input Area */
.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    background: white;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    border: 1.5px solid #cbd5e1;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.3s;
}

.chat-input-area input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(84, 180, 53, 0.12);
}

.send-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(84, 180, 53, 0.2);
}

.send-btn:hover {
    background: #388E3C;
    transform: scale(1.05);
}

/* Typing Indicator */
.typing-indicator-dots {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
    align-items: center;
    height: 12px;
}

.typing-indicator-dots span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: pulse-dot 1.4s infinite;
}

.typing-indicator-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 420px;
        bottom: 70px;
    }
}

