/* ----- CSS Variables & Setup ----- */
:root {
    /* Bright, welcoming NGO color palette */
    --primary: #F5A623; /* Darker, richer golden yellow */
    --primary-light: #FCE19B;
    --primary-dark: #D97706;
    
    --secondary: #14213D; /* Deep trustworthy navy blue for high contrast text */
    --accent: #E85D04; /* Energetic accent */
    
    --bg-main: #FFFFFF; /* Pure white */
    --bg-light: #F8F9FA; /* Very light cool gray */
    --bg-warm: #FFFDF8; /* Very soft warm tint */
    
    --text-main: #2B2D42; /* Soft black for readability */
    --text-muted: #6C757D;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 40px -10px rgba(245, 166, 35, 0.4);
    
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Custom cursor base setup */
    cursor: none; 
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: none; /* Hide default pointer since we have custom cursor */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }

/* ----- Custom Cursor ----- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* When hovering over clickable items */
html[data-cursor-hover="true"] .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(252, 163, 17, 0.1);
    border-color: var(--accent);
}

/* Hide on touch devices */
@media (max-width: 768px) {
    .cursor-dot, .cursor-outline { display: none; }
    html, a { cursor: auto; }
}


/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: none;
    border: 2px solid transparent;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--secondary); /* High contrast for yellow */
    box-shadow: 0 4px 14px rgba(245, 166, 35, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--secondary); /* Keep high contrast */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.6);
}

.btn-outline {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--secondary);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-3px);
}


/* ----- Navbar ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    box-shadow: var(--shadow-soft);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    transition: var(--transition);
}

.navbar.scrolled .logo-text {
    color: var(--secondary);
}

.logo-text .highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.navbar.scrolled .nav-link {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer; /* Use regular pointer over navbar on mobile */
}

.navbar.scrolled .mobile-menu-btn {
    color: var(--secondary);
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-soft);
        gap: 16px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-in-out;
    }
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }
    .nav-link {
        color: var(--text-main);
    }
    .mobile-menu-btn { display: block; }
}


/* ----- Hero Section ----- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    /* Slight zoom animation on load */
    animation: zoomOut 10s forwards 0.5s;
    transform: scale(1.1);
}

@keyframes zoomOut {
    to { transform: scale(1); }
}

/* Light, warm overlay instead of dark */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient from a warm semi-transparent color to darker at bottom to ensure text readability */
    background: linear-gradient(135deg, rgba(20, 33, 61, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
    color: white;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: white;
    line-height: 1.1;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ----- Global Section Setup ----- */
.section {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0; /* Reduced padding for mobile */
    }
}

.section-badge {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: inline-block;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.section-title span {
    color: var(--primary);
    position: relative;
}

.section-title span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: rgba(252, 163, 17, 0.2);
    z-index: -1;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-warm {
    background-color: var(--bg-warm);
}


/* ----- About Section ----- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.stats-row {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background-color: var(--bg-main);
    padding: 24px 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
    transform: translateY(-40px) translateX(40px);
}

.experience-badge i {
    font-size: 3rem;
    color: var(--accent);
}

.experience-badge span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary);
    line-height: 1.2;
}


/* ----- Impact Section ----- */
.section-header {
    max-width: 600px;
    margin: 0 auto 60px;
    text-align: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.impact-card {
    background-color: var(--bg-main);
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.08); /* Added for better mobile clarity */
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.impact-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.impact-card:hover::before {
    opacity: 0.05;
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 24px;
    transition: var(--transition);
}

.impact-card:hover .card-icon {
    background-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.card-desc {
    color: var(--text-muted);
}


/* ----- CTA Section ----- */
.cta-section {
    padding: 100px 0;
    background-color: var(--secondary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(252,163,17,0.1) 0%, rgba(20,33,61,0) 50%);
    z-index: 1;
}

.cta-box {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 24px;
}

.cta-box p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}


/* ----- Footer ----- */
.footer {
    background-color: var(--bg-light);
    padding: 80px 0 40px;
    color: var(--text-main);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.brand-col .logo {
    margin-bottom: 24px;
}

.brand-col .logo-text {
    color: var(--secondary);
}

.footer-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--secondary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 24px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer ul a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer ul a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-muted);
}

.contact-list i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 2px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 32px;
    color: var(--text-muted);
    font-size: 0.875rem;
}


/* ----- Scroll Animations ----- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* ----- Phase 2 Enhancements ----- */
.counter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery-item { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft); aspect-ratio: 4/5; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }

.split-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.social-benefits li { font-size: 1.125rem; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.social-benefits i { color: var(--primary); font-size: 1.5rem; }
.widget-container { background-color: white; padding: 16px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); display: flex; justify-content: center; border: 1px solid rgba(0,0,0,0.08); }

.donation-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.tier-card { background-color: white; color: var(--text-main); padding: 40px 32px; border-radius: var(--radius-lg); border: 1px solid rgba(0,0,0,0.08); position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: flex; flex-direction: column; text-align: left; transition: var(--transition); }
.tier-card.highlighted { transform: scale(1.05); border: 2px solid var(--primary); box-shadow: 0 15px 40px rgba(252, 163, 17, 0.2); }
.tier-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background-color: var(--primary); color: white; padding: 6px 16px; border-radius: 20px; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; }
.tier-price { font-size: 3rem; font-family: var(--font-heading); font-weight: 800; color: var(--secondary); margin-bottom: 8px; }
.tier-title { font-size: 1.5rem; margin-bottom: 16px; color: var(--primary); }
.tier-desc { margin-bottom: 32px; color: var(--text-muted); flex-grow: 1; }
.tier-btn { width: 100%; }

.floating-whatsapp {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.floating-whatsapp:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.6);
}

/* --- CHATBOT CSS --- */
.chatbot-toggler {
    position: fixed;
    bottom: 32px;
    right: 32px;
    outline: none;
    border: none;
    height: 60px;
    width: 60px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1000;
}

.chatbot-toggler:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 25px rgba(255, 107, 107, 0.6);
}

.chatbot-toggler i {
    position: absolute;
    font-size: 2rem;
    transition: opacity 0.2s ease;
}

.chatbot-toggler i.bx-x {
    opacity: 0;
}

.show-chatbot .chatbot-toggler i.bx-x {
    opacity: 1;
}

.show-chatbot .chatbot-toggler i.bx-message-dots {
    opacity: 0;
}

.chatbot-window {
    position: fixed;
    right: 32px;
    bottom: 110px;
    width: 350px;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: bottom right;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
}

.show-chatbot .chatbot-window {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.chat-header {
    background: var(--primary);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chat-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.chat-header .close-btn {
    cursor: pointer;
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.chat-header .close-btn:hover {
    transform: scale(1.1);
}

.chatbox {
    padding: 20px;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.chat {
    display: flex;
    align-items: flex-start;
}

.chat.incoming {
    justify-content: flex-start;
}

.chat.outgoing {
    justify-content: flex-end;
}

.chat p {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    max-width: 80%;
    margin: 0;
    line-height: 1.4;
}

.chat.incoming p {
    background: var(--bg-alt);
    color: var(--text-main);
    border-top-left-radius: 0;
}

.chat.outgoing p {
    background: var(--primary);
    color: white;
    border-top-right-radius: 0;
}

.chat-options {
    padding: 10px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-reply {
    padding: 10px 16px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
}

.quick-reply:hover {
    background: var(--primary);
    color: white;
}

@media (max-width: 480px) {
    .chatbot-window {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .chatbot-window .chatbox {
        height: calc(100vh - 180px);
        max-height: none;
    }
    
    .floating-whatsapp {
        bottom: 100px; /* Adjust so it's not hidden if chatbot is open full screen */
        left: 20px;
    }

    .chatbot-toggler {
        bottom: 20px;
        right: 20px;
    }
}

/* ----- Responsive Design ----- */
@media (max-width: 992px) {
    .about-grid, .split-layout { grid-template-columns: 1fr; }
    .experience-badge { transform: translateY(-20px) translateX(20px); }
    .cards-grid, .counter-grid, .gallery-grid, .donation-tiers { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .tier-card.highlighted { transform: scale(1); }
}

@media (max-width: 768px) {
    /* (nav-links handled above) */
    .hero-title { font-size: 2.5rem; } /* Optimized hero title */
    .hero-subtitle { font-size: 1rem; margin-bottom: 24px; } /* Optimized hero subtitle */
    .section-title { font-size: 2.25rem; }
    .cards-grid, .counter-grid, .gallery-grid, .donation-tiers, .footer-grid { grid-template-columns: 1fr; }
    .stats-row { flex-direction: column; gap: 20px; }
    
    /* Touch animations */
    .impact-card:active, .tier-card:active, .gallery-item:active, .btn:active {
        transform: scale(0.96);
    }
}

@media (max-width: 480px) {
    .hero-buttons { 
        flex-direction: column; 
        width: 100%; 
    }
    .btn-large {
        width: 100%; /* Make buttons full width on small screens */
    }
}
