@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

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

html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ================= ROOT VARIABLES ================= */
:root {
  --purple: #9300a1;
  --green: #14bba6;
  --yellow: #ffff00;
  --light-blue: #add8e6;
  --soft-gray: #f5f5f5;
  --card: #ffffff;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
  --dark-bg: #0a192f;
  --text-dark: #333;
  --text-light: #666;
}

/* ================= BODY ================= */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--soft-gray);
  color: var(--text-dark);
  line-height: 1.6;
  padding-top: 80px;
}

/* ================= NAVBAR ================= */
.nav-wrapper {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.grad-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--purple), var(--green), var(--yellow));
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--dark-bg);
  padding: 15px 30px;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: 10px 30px;
  background: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(10px);
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.logo img {
  height: 45px;
  margin-right: 12px;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

/* NAV LINKS */
.nav {
  list-style: none;
  display: flex;
  gap: 12px;
}

.nav-item a {
  text-decoration: none;
  color: white;
  font-size: 14px;
  font-weight: 500;
  transition: 0.3s;
  position: relative;
}

.nav-item a:hover {
  color: var(--light-blue);
}

.nav-item a.active {
  color: var(--light-blue);
}

.nav-item a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--light-blue);
}

/* DONATE BUTTON */
.donate-btn {
  background: linear-gradient(135deg, var(--purple), var(--green));
  padding: 8px 20px;
  border-radius: 30px;
  color: white !important;
  font-weight: bold;
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Logo Styles - Fix Compression */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo img {
  height: 50px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
}

/* Mobile Responsive Logo */
@media (max-width: 768px) {
  .logo img {
    height: 40px;
  }
  
  .logo span {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 35px;
  }
  
  .logo span {
    font-size: 0.8rem;
  }
}

/* MOBILE MENU */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  height: 3px;
  width: 25px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
}

/* ================= HERO SECTION ================= */
.hero-video {
  position: relative;
  height: 90vh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 0 20px;
}

.hero-overlay h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}

.hero-overlay p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  animation: fadeInUp 1s ease 0.4s both;
}

/* ================= BUTTONS ================= */
.btn {
  padding: 12px 30px;
  border-radius: 40px;
  background: var(--yellow);
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  background: #e6e600;
}

.btn.secondary {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.btn.secondary:hover {
  background: white;
  color: var(--dark-bg);
}

/* ================= LAYOUT ================= */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--dark-bg);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--green));
}

/* ================= CARDS ================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.card {
  background: var(--card);
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  text-align: center;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--purple);
}

.card p {
  color: var(--text-light);
}

/* ================= STATS SECTION ================= */
.stats-section {
  background: linear-gradient(135deg, var(--dark-bg), #0d2b4a);
  color: white;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
  text-align: center;
}

.stat-box {
  flex: 1;
  min-width: 200px;
}

.stat-box h2 {
  font-size: 3rem;
  color: var(--yellow);
  margin-bottom: 10px;
}

.stat-box p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ================= TESTIMONIALS ================= */
.testimonials {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  text-align: center;
}

.testimonial-box {
  display: none;
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.testimonial-box.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.testimonial-box p {
  font-size: 1.3rem;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.testimonial-box h4 {
  color: var(--purple);
  font-size: 1.1rem;
}

/* ================= CTA SECTION ================= */
.cta {
  text-align: center;
  background: linear-gradient(135deg, var(--purple), var(--green));
  color: white;
  padding: 80px 20px;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.cta p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

.cta .btn {
  background: white;
  color: var(--purple);
  font-size: 1.1rem;
  padding: 15px 40px;
}

.cta .btn:hover {
  background: var(--yellow);
  color: var(--text-dark);
}

/* ================= FOOTER ================= */
.footer {
  background: var(--dark-bg);
  color: white;
  text-align: center;
  padding: 40px 20px;
}

.footer p {
  opacity: 0.8;
}

/* ================= SCROLL BAR ================= */
#scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--green), var(--yellow));
  z-index: 10000;
  transition: width 0.1s ease;
}

/* ================= IMAGES ================= */
img {
  max-width: 100%;
  display: block;
  border-radius: 12px;
}

.float {
  max-width: 80%;
  margin: 30px auto 0;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ================= ANIMATIONS ================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-zoom {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.6s ease;
}

.reveal-zoom.active {
  opacity: 1;
  transform: scale(1);
}

.stagger .card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.stagger.active .card:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger.active .card:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger.active .card:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--dark-bg);
    flex-direction: column;
    align-items: center;
    gap: 0;
    display: none;
    padding: 20px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }

  .nav.active {
    display: flex;
  }

  .nav-item {
    margin: 12px 0;
  }

  .hero-overlay h1 {
    font-size: 2rem;
  }

  .hero-overlay p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .section-title {
    font-size: 2rem;
  }

  .stats-grid {
    flex-direction: column;
    gap: 30px;
  }


  .stat-box h2 {
    font-size: 2.5rem;
  }

  .testimonial-box p {
    font-size: 1.1rem;
  }

  .cta h2 {
    font-size: 1.8rem;
  }

  section {
    padding: 50px 0;
  }
}

@media (max-width: 480px) {
  .logo span {
    font-size: 0.9rem;
  }
  
  .logo img {
    height: 35px;
  }
  
  .hero-overlay h1 {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 10px 20px;
  }
}

/* Remove body padding on pages with hero sections */
body.about-page {
  padding-top: 0;
}

/* Fix hero section */
.about-hero-section {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
}

.about-hero-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
}

.about-hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 1;
}

/* ================= GLOBAL 5-STAR NGO STYLES ================= */
/* Add this to your existing styles.css file */

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #1d3557;
  --accent: #457b9d;
  --gold: #f4a261;
  --light-bg: #f8f9fa;
  --dark: #1a1a2e;
  --text: #2c3e50;
  --text-light: #6c757d;
  --success: #2ecc71;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.12);
}

/* Navbar - Fixed */
.nav-wrapper {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.grad-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--accent));
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  max-width: 1400px;
  margin: 0 auto;
  background: white;
}

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

.logo img {
  height: 45px;
  width: auto;
}

.logo span {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
}

.nav {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: 0.3s;
  position: relative;
}

.nav-item a:hover {
  color: var(--primary);
}

.nav-item a.active {
  color: var(--primary);
}

.nav-item a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.donate-btn {
  background: var(--primary);
  color: white !important;
  padding: 10px 24px;
  border-radius: 30px;
}

.donate-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--dark);
  margin: 3px 0;
  transition: 0.3s;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 73px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 73px);
    background: white;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    transition: 0.3s;
    gap: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  }

  .nav.active {
    left: 0;
  }
}

/* Remove body padding for pages with fixed navbar */
body {
  padding-top: 73px;
}

body.home-page, body.about-page, body.programs-page, body.contact-page, body.events-page {
  padding-top: 73px;
}

/* ================= DARK MODE VARIABLES ================= */
:root {
  /* Light Mode (Default) */
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #1d3557;
  --accent: #457b9d;
  --gold: #f4a261;
  --light-bg: #f8f9fa;
  --dark: #1a1a2e;
  --text: #2c3e50;
  --text-light: #6c757d;
  --card-bg: #ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.12);
  --border: #e9ecef;
  --hero-overlay: rgba(0,0,0,0.6);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary: #ff6b6b;
  --primary-dark: #e63946;
  --secondary: #2c3e50;
  --accent: #5dade2;
  --gold: #f9e79f;
  --light-bg: #1a1a2e;
  --dark: #0f0f1a;
  --text: #e0e0e0;
  --text-light: #b0b0b0;
  --card-bg: #1e1e2e;
  --shadow: 0 10px 30px rgba(0,0,0,0.3);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.4);
  --border: #2a2a3e;
  --hero-overlay: rgba(0,0,0,0.8);
}

/* Apply theme colors */
body {
  background: var(--light-bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-wrapper {
  background: rgba(var(--dark), 0.98);
}

.navbar {
  background: var(--dark);
}

.card, .donation-card, .sponsorship-card, .form-card, .login-card, .signup-card, .profile-card {
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.footer {
  background: var(--dark);
}

/* Dark Mode Toggle Button */
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  margin-right: 10px;
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.1);
  transform: rotate(15deg);
}

.theme-toggle i {
  font-size: 1.2rem;
  color: var(--text);
}

/* Dark mode specific adjustments */
[data-theme="dark"] .hero-overlay {
  background: rgba(0,0,0,0.7);
}

[data-theme="dark"] .stats-section {
  background: linear-gradient(135deg, #0a0a1a, #0f0f2a);
}

[data-theme="dark"] .testimonials {
  background: linear-gradient(135deg, #1a1a2e, #1e1e3e);
}

[data-theme="dark"] .testimonial-box {
  background: var(--card-bg);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .btn-outline {
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="dark"] .stat-card {
  background: var(--card-bg);
}

/* Compact shared navigation: keep every label readable on desktop. */
.navbar {
  gap: 10px;
  padding: 10px clamp(12px, 2vw, 28px);
}

.nav {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(4px, .65vw, 9px);
}

.nav-item a {
  font-size: clamp(11px, .88vw, 13px);
  white-space: nowrap;
}

.donate-btn {
  padding: 7px 12px;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 73px;
    right: -100%;
    left: auto;
    display: flex;
    width: min(320px, 100vw);
    height: calc(100vh - 73px);
    padding: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    overflow-y: auto;
    background: var(--dark-bg);
    box-shadow: 0 10px 20px rgba(0,0,0,.2);
    transition: right .25s ease;
    z-index: 1100;
  }

  .nav.active {
    right: 0;
    left: auto;
  }

  .nav-item a {
    display: block;
    padding: 10px 12px;
    font-size: 15px;
  }
}

[data-theme="dark"] .faq-item {
  background: var(--card-bg);
}

[data-theme="dark"] .impact-card {
  background: rgba(255,255,255,0.1);
}

/* Shared theme control and dark palette across every site page. */
.theme-toggle {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148,163,184,.45);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:hover { background: rgba(148,163,184,.18); }
.theme-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.theme-nav-item { display: flex; align-items: center; justify-content: center; }
.theme-floating-toggle { position: fixed; top: 14px; right: 16px; z-index: 1200; background: var(--card-bg); color: var(--text); box-shadow: var(--shadow); }
.navbar .nav-container { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; }
.menu-toggle[role="button"] { border: 0; background: transparent; }
.menu-toggle[role="button"]:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

[data-theme="dark"] body { background: #0b1220; color: #e5e7eb; }
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 { color: #f3f4f6; }
[data-theme="dark"] .navbar,
[data-theme="dark"] .nav-wrapper { background: #111827; }
[data-theme="dark"] .logo span { color: #f3f4f6; }
[data-theme="dark"] .nav-item a { color: #f3f4f6; }
[data-theme="dark"] .nav-item a:hover,
[data-theme="dark"] .nav-item a.active { color: #f4a261; }
[data-theme="dark"] .nav { background-color: #111827; }
[data-theme="dark"] .bar { background: #f3f4f6; }
[data-theme="dark"] .gallery-section { background: #0b1220; color: #e5e7eb; }
[data-theme="dark"] .gallery-card,
[data-theme="dark"] .video-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .card { background: #1f2937; color: #f3f4f6; }
[data-theme="dark"] .gallery-card p,
[data-theme="dark"] .video-card p,
[data-theme="dark"] .gallery-section h2 { color: #f3f4f6; }
[data-theme="dark"] .gallery-hero { background: linear-gradient(135deg,#111827,#1f2937); }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { background: #111827; border-color: #4b5563; color: #f3f4f6; }
[data-theme="dark"] a:not(.donate-btn) { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
