/* GreenMinds unified site stylesheet */
/* Color system and theming */
:root {
  --primary: #046307; /* brand green */
  --primary-600: #035305;
  --gold: #FFD700; /* accent */
  --bg: #F5F5DC; /* beige background */
  --text: #222222;
  --muted: #4b5563;
  --surface: #ffffff; /* panels/cards */
  --surface-2: #fffbe6; /* warm surface */
  --border: rgba(0,0,0,0.08);
  --shadow: 0 8px 28px rgba(0,0,0,0.08);
  --glass: rgba(255,255,255,0.7);
  --glass-dark: rgba(1,50,32,0.55);
}
html.dark {
  --primary: #013220;
  --primary-600: #0A3D1A;
  --gold: #FFD700;
  --bg: #131212;
  --text: #FFD700;
  --muted: #d1d5db;
  --surface: #013220;
  --surface-2: #1a7249;
  --border: rgba(255,255,255,0.14);
  --shadow: 0 8px 28px rgba(0,0,0,0.4);
  --glass: rgba(1,50,32,0.55);
  --glass-dark: rgba(0,0,0,0.55);
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
/* Skip link for accessibility */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 16px; top: 84px; width: auto; height: auto; padding: .5rem .75rem; background: var(--gold); color: var(--primary); border-radius: 8px; z-index: 1200; box-shadow: var(--shadow); }

/* Utilities */
.hidden { display: none !important; }
.center { text-align: center; }
.rounded { border-radius: 14px; }
.glass { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--border); }
.shadow { box-shadow: var(--shadow); }
.measure { max-width: 68ch; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Header / Navbar */
.navbar {
  position: fixed; inset: 0 auto auto 0; right: 0; height: 72px; z-index: 1000;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}
.navbar-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.5rem; letter-spacing: .5px; color: var(--gold); }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-weight: 600; }
.nav-links a { color: #fff; opacity: .95; padding: 8px 4px; border-radius: 8px; transition: background .2s, color .2s, opacity .2s; }
.nav-links a:hover, .nav-links a:focus { opacity: 1; color: var(--gold); }

/* Donate button in navbar */
.donate-btn { background: var(--gold); color: var(--primary); border: none; border-radius: 9999px; padding: 10px 18px; font-weight: 800; box-shadow: 0 4px 12px rgba(255,215,0,.25); transition: transform .2s, box-shadow .2s; }
.donate-btn:hover, .donate-btn:focus { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,215,0,.35); }

/* Theme toggle */
.theme-toggle { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; border: 2px solid var(--gold); background: transparent; color: #fff; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.theme-toggle:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.15); }

/* Mobile nav */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 26px; height: 3px; background: var(--gold); border-radius: 2px; transition: transform .25s, opacity .25s; }
.mobile-menu { position: fixed; top: 72px; left: 0; right: 0; background: var(--primary); color: #fff; display: none; flex-direction: column; gap: 1rem; padding: 1rem; box-shadow: 0 8px 18px rgba(0,0,0,0.2); z-index: 999; }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: .5rem 1rem; border-radius: 8px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* Sections */
main { padding-top: 84px; }
section { padding: 64px 0; }
.section-title { font-size: 2rem; font-weight: 900; color: var(--gold); text-align: center; margin: 0 0 1.5rem 0; }
.section-subtitle { font-size: 1.125rem; color: var(--muted); text-align: center; margin-bottom: 2rem; }

/* Hero */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; }
.hero-surface { width: 100%; border-radius: 18px; overflow: hidden; position: relative; background: linear-gradient(135deg, rgba(4,99,7,0.88) 0%, rgba(4,99,7,0.6) 50%, rgba(255,215,0,0.2) 100%), url('./assets/hero-bg.jpg') center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.35) 100%); }
.hero-content { position: relative; z-index: 1; text-align: center; color: #fff; padding: 72px 24px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; font-weight: 900; margin: 0 0 1rem 0; }
.hero p { font-size: clamp(1rem, 2.5vw, 1.25rem); opacity: .95; margin: 0 0 1.5rem 0; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 800; border-radius: 9999px; padding: .75rem 1.25rem; border: 2px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s; }
.btn-primary { background: var(--gold); color: var(--primary); box-shadow: 0 6px 16px rgba(255,215,0,.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255,215,0,.35); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Cards and grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 1.25rem; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.card h3 { margin: .25rem 0 .25rem 0; color: var(--primary); font-size: 1.125rem; font-weight: 800; }
.card p { color: var(--muted); margin: 0 0 .75rem 0; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { position: relative; overflow: hidden; border-radius: 14px; box-shadow: var(--shadow); background: var(--surface); }
.gallery-item img { height: 200px; width: 100%; object-fit: cover; transition: transform .35s, filter .35s; filter: brightness(.95); }
.gallery-item:hover img { transform: scale(1.06); filter: brightness(1.05); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(255,215,0,.88); color: #111; text-align: center; padding: .5rem; font-weight: 800; opacity: 0; transition: opacity .25s; }
.gallery-item:hover .gallery-caption { opacity: 1; }

/* News / Stories */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.news-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 1.25rem; }
.news-card h3, .news-card h2 { color: var(--primary); font-size: 1.125rem; font-weight: 800; margin: 0 0 .5rem 0; }
.news-card p { color: var(--muted); margin: 0 0 .75rem 0; }

/* Donation CTA */
.donation-wrap { position: relative; background: url('./assets/hero-bg.jpg') center/cover no-repeat; padding: 72px 0; }
.donation-card { background: var(--glass); border: 2px solid var(--gold); border-radius: 22px; box-shadow: var(--shadow); max-width: 520px; margin: 0 auto; padding: 2rem; text-align: center; }
.donation-card h2 { color: var(--gold); font-size: 1.75rem; font-weight: 900; margin: 0 0 1rem 0; }
.donation-card p { color: var(--text); opacity: .9; margin: 0 0 1rem 0; }
.donation-actions { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: .5rem; }
.donation-actions .btn { width: 100%; }

/* Footer */
.footer { background: var(--primary); color: #fff; padding: 48px 0 28px 0; box-shadow: 0 -6px 18px rgba(0,0,0,0.12); border-top: 2px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { margin: 0 0 .75rem 0; font-weight: 900; color: #fff; }
.footer p, .footer a { color: #fff; opacity: .95; }
.footer a:hover { color: var(--gold); }
.footer-social { display: flex; gap: .75rem; }
.footer-social a { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--gold); color: var(--primary); border-radius: 50%; box-shadow: 0 4px 12px rgba(255,215,0,.25); font-weight: 900; }
.footer-bottom { text-align: center; color: #fff; opacity: .95; margin-top: 1rem; }
.footer-credit { text-align: center; margin-top: .5rem; color: var(--gold); font-style: italic; }

/* Partners / Trust strip */
.partners { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 1rem; }
.partners-grid { display:grid; grid-template-columns: repeat(5,1fr); gap:1rem; align-items:center; }
@media (max-width: 900px) { .partners-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px) { .partners-grid { grid-template-columns: repeat(2,1fr); } }
.partners-grid img { max-height: 40px; width:auto; opacity:.9; filter: grayscale(100%); }

/* Footer CTA */
.footer-cta { background: var(--surface-2); border:1px solid var(--border); border-radius:16px; box-shadow: var(--shadow); padding: 1rem; display:flex; align-items:center; justify-content: space-between; gap:1rem; }
@media (max-width: 640px) { .footer-cta { flex-direction: column; text-align: center; } }

/* Animations */
/* Default: visible content; JS enhances with animation */
.fade-in { opacity: 1; transform: none; }
.js-anim .fade-in { opacity: 0; transform: translateY(24px); }
.js-anim .fade-in.visible { opacity: 1; transform: none; transition: opacity .6s ease-out, transform .6s ease-out; }

/* Page-specific harmony for existing classes (to align legacy pages) */
/* About preview (index) */
.about-preview { display: flex; gap: 1.5rem; align-items: center; justify-content: center; }
.about-img { flex: 1 1 320px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.about-text { flex: 2 1 420px; display: flex; flex-direction: column; gap: .75rem; }
.about-text h2 { color: var(--gold); font-size: 1.75rem; font-weight: 900; margin: 0 0 .5rem 0; }
.about-btn { background: var(--gold); color: var(--primary); border: none; border-radius: 9999px; padding: .6rem 1rem; font-weight: 800; box-shadow: 0 6px 16px rgba(255,215,0,.25); }

/* Projects (index) */
.projects-section { background: transparent; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .projects-grid { grid-template-columns: 1fr; } }
.project-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1rem; text-align: center; box-shadow: var(--shadow); }
.project-card h3 { color: var(--primary); font-weight: 900; margin: .25rem 0 .25rem 0; }
.project-stats { display: flex; gap: .5rem; margin: .75rem 0; flex-wrap: wrap; }
.project-stats span { background: var(--gold); color: var(--primary); padding: .25rem .5rem; border-radius: 9999px; font-size: .75rem; font-weight: 800; }
.project-btn { background: var(--gold); color: var(--primary); border-radius: 9999px; padding: .5rem 1rem; font-weight: 800; display: inline-block; }

/* Gallery (index) */
.gallery-section h2 { color: var(--gold); }

/* News (index) */
.news-section h2 { color: var(--gold); }

/* Donation (index) */
.donation-section { background: transparent; }

/* Impact Section */
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .impact-grid { grid-template-columns: 1fr; } }
.impact-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem; text-align: center; box-shadow: var(--shadow); }
.impact-metric { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 900; color: var(--gold); }
.impact-label { color: var(--muted); font-weight: 700; }

/* Funds usage bars */
.usage-bars { display: grid; gap: .75rem; }
.usage-row { display:flex; align-items:center; gap:.75rem; }
.usage-label { min-width: 120px; font-weight: 800; color: var(--primary); }
.usage-track { flex:1; height: 14px; background: var(--surface); border:1px solid var(--border); border-radius: 9999px; overflow:hidden; }
.usage-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #ffea7a); }

/* Lightbox / Modal */
.lightbox-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 1200; }
.lightbox-backdrop.open { display: flex; }
.lightbox-dialog { background: var(--surface); color: var(--text); max-width: 90vw; max-height: 90vh; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.35); border: 1px solid var(--border); }
.lightbox-header { display:flex; align-items:center; justify-content: space-between; padding: .5rem .75rem; border-bottom:1px solid var(--border); }
.lightbox-title { font-weight: 800; color: var(--primary); }
.lightbox-close { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }
.lightbox-body { background: #000; display:grid; place-items:center; }
.lightbox-body img { max-width: 90vw; max-height: 80vh; }

/* Vision & Mission */
.vision-mission-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; }
@media (max-width: 900px) { .vision-mission-grid { grid-template-columns: 1fr; } }
.vision-card, .mission-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow); }
.vision-card h2, .mission-card h2 { color: var(--gold); font-size: 1.5rem; font-weight: 900; margin: 0 0 1rem 0; }
.vision-text { font-size: 1.125rem; color: var(--text); font-weight: 600; }
.mission-pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 640px) { .mission-pillars { grid-template-columns: 1fr; } }
.pillar h3 { color: var(--primary); font-size: 1rem; font-weight: 800; margin: 0 0 .5rem 0; }
.pillar p { color: var(--muted); font-size: .9rem; margin: 0; }

/* Timeline */
.timeline-strip { display: flex; justify-content: space-between; align-items: center; gap: 1rem; position: relative; }
.timeline-strip::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: var(--gold); z-index: 1; }
@media (max-width: 900px) { .timeline-strip { flex-direction: column; gap: 2rem; } .timeline-strip::before { display: none; } }
.timeline-item { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 2; }
.timeline-year { background: var(--gold); color: var(--primary); padding: .5rem 1rem; border-radius: 9999px; font-weight: 900; font-size: .9rem; margin-bottom: .5rem; }
.timeline-content h3 { color: var(--primary); font-size: 1rem; font-weight: 800; margin: 0 0 .25rem 0; }
.timeline-content p { color: var(--muted); font-size: .85rem; margin: 0; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }
.team-member { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; text-align: center; box-shadow: var(--shadow); }
.member-photo { width: 120px; height: 120px; margin: 0 auto 1rem auto; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-member h3 { color: var(--primary); font-size: 1.125rem; font-weight: 800; margin: 0 0 .5rem 0; }
.team-member p { color: var(--muted); font-size: .9rem; margin: 0; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; text-align: center; box-shadow: var(--shadow); }
.stat-number { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; color: var(--gold); margin-bottom: .5rem; }
.stat-label { color: var(--muted); font-weight: 700; font-size: .9rem; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow); }
.testimonial-card p { color: var(--text); font-style: italic; margin: 0 0 1rem 0; }
.testimonial-author strong { color: var(--primary); font-weight: 800; display: block; }
.testimonial-author span { color: var(--muted); font-size: .9rem; }

/* Social Media Feed */
.social-feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .social-feed-grid { grid-template-columns: 1fr; } }
.social-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow); }
.social-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.social-header h3 { color: var(--primary); font-size: 1.125rem; font-weight: 800; margin: 0; }
.social-link { background: var(--gold); color: var(--primary); padding: .4rem .8rem; border-radius: 9999px; font-size: .8rem; font-weight: 800; }
.social-content p { color: var(--muted); margin: 0 0 1rem 0; font-size: .9rem; }
.social-stats { display: flex; gap: .5rem; flex-wrap: wrap; }
.social-stats span { background: var(--primary); color: #fff; padding: .25rem .5rem; border-radius: 9999px; font-size: .7rem; font-weight: 800; }

/* Newsletter */
.newsletter-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; text-align: center; box-shadow: var(--shadow); max-width: 600px; margin: 0 auto; }
.newsletter-card h2 { color: var(--gold); font-size: 1.75rem; font-weight: 900; margin: 0 0 1rem 0; }
.newsletter-card p { color: var(--muted); margin: 0 0 1.5rem 0; }
.newsletter-form .form-group { display: flex; gap: .75rem; max-width: 400px; margin: 0 auto; }
@media (max-width: 640px) { .newsletter-form .form-group { flex-direction: column; } }
.newsletter-form input { flex: 1; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--text); }
.newsletter-form input:focus { outline: none; border-color: var(--gold); }

/* Responsive adjustments */
@media (max-width: 900px) {
  section { padding: 48px 0; }
  .about-preview { flex-direction: column; }
}
