* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

:root {
  --bg-color: #f5f8fa;
  --text-color: #1c2b36;
  --primary-color: #0f5c7a;
  --primary-dark: #0b4c66;
  --nav-bg: #e5fdff;
  --card-color: #ffffff;
  --subtitle-color: #5e6c75;
  --shadow: 0 10px 20px rgba(0,0,0,0.10);
}

body.dark-mode {
  --bg-color: #08131d;
  --text-color: #f3f8fc;
  --primary-color: #35a7d0;
  --primary-dark: #0d2d42;
  --nav-bg: #0b1823;
  --card-color: #10202d;
  --subtitle-color: #bfd0db;
  --shadow: 0 10px 20px rgba(0,0,0,0.35);
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* NAVBAR */
.logo {
  white-space: nowrap;
  border-radius: 0%;
  object-fit: cover;
}

nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.navbar {
  display: flex;
  justify-content: space-between;
  padding: 0px 40px;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: large;
  position: relative;
}

.navbar nav a:hover,
.navbar nav a.active {
  color: var(--primary-color);
}

.navbar nav a.active::after,
.navbar nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

.donate-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s ease;
}

.donate-btn:hover {
  background: var(--primary-dark);
  color: hsl(207, 22%, 90%);
  transform: translateY(-2px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
}

.theme-toggle,
.menu-toggle {
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  background: #edf7fb;
  font-size: 1rem;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-color);
}

/* HERO */
.hero {
  text-align: center;
  padding: 80px 20px 50px;
  background: linear-gradient(to bottom, #a5cbde, #ffffff);
  margin-top: 70px;
}

body.dark-mode .hero {
  background: linear-gradient(to bottom, #0f2433, #0e3646);
}

.small-title {
  color: #1d6fa5;
  font-weight: bold;
  letter-spacing: 2px;
  padding-top: 18px;
}

body.dark-mode .small-title {
  color: #69c8f0;
}

.hero h1 {
  font-size: 45px;
  margin: 20px 0;
  font-family: 'Playfair Display', serif;
}

.subtitle {
  color: var(--subtitle-color);
  max-width: 700px;
  margin: auto;
}

/* STATS */
.impact-stats {
  background: #0b5b89;
  padding: 70px 20px;
}

.stats-container {
  width: min(1100px, 92%);
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  text-align: center;
}

.stat-card {
  color: white;
  padding: 20px;
}

.stat-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 1.8rem;
}

.stat-card h2 {
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 1.05rem;
  opacity: 0.95;
}

/* GALLERY */
.gallery-section {
  padding: 90px 20px;
  background: #f8fbfd;
}

.gallery-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
}

.gallery-header h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.gallery-grid {
  width: min(1120px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  grid-auto-rows: 240px;
  gap: 20px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow);
  background: #dbeef5;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* STORY */
.story-section {
  padding: 20px 20px 90px;
  background: #f8fbfd;
}

.story-container {
  width: min(1100px, 92%);
  margin: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.story-card {
  background: whitesmoke;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  border: 0.1px solid rgb(216, 216, 216);
}

.story-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 15px;
}

.story-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* UPDATES */
.updates-section {
  padding: 0 20px 90px;
  background: #f8fbfd;
}

.updates-box {
  width: min(1120px, 92%);
  margin: auto;
  border: 2px dashed #d6e4ea;
  border-radius: 28px;
  padding: 65px 20px;
  text-align: center;
  background: #fbfdfe;
}

.updates-icon {
  font-size: 3.5rem;
  color: #b0bbc7;
  margin-bottom: 20px;
}

.updates-box h3 {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  color: #6e88a0;
  margin-bottom: 12px;
}

.updates-box p {
  max-width: 650px;
  margin: auto;
  color: #8ca0b3;
  line-height: 1.8;
}

/* CTA */
.cta-section {
  padding: 0 20px 90px;
  background: #f8fbfd;
}

.cta-box {
  background: linear-gradient(135deg, #0d8cc0, #235ff0);
  color: white;
  width: min(1120px, 92%);
  border-radius: 28px;
  text-align: center;
  padding: 55px 20px;
  box-shadow: var(--shadow);
  margin: auto;
}

.cta-box h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 15px;
}

.cta-box p {
  max-width: 750px;
  margin: 0 auto 28px;
  line-height: 1.8;
  font-size: 1.05rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.3s ease;
  text-decoration: none;
}

.primary-btn {
  background: white;
  color: #0f5c7a;
}

.secondary-btn {
  border: 1px solid white;
  color: white;
  background: transparent;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-4px);
}

/* FOOTER */
.footer {
  background: #055e90;
  color: white;
  padding: 70px 0 30px 12px;
}

.footer-grid {
  width: min(1180px, 92%);
  margin: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer h3,
.footer h4 {
  font-family: "Playfair Display", serif;
  margin-bottom: 20px;
  font-size: 1.9rem;
  color: #38c3ff;
}

.footer h4 {
  font-size: 1.4rem;
}

.footer p,
.footer li,
.footer a {
  color: rgba(255,255,255,0.85);
  line-height: 1.9;
  font-size: 1rem;
  text-decoration: none;
}

.footer ul {
  list-style: none;
}

.footer a:hover {
  color: white;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-bottom {
  width: min(1180px, 92%);
  margin: 40px auto 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 24px;
  text-align: center;
}

/* BACK TO TOP */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #14a7e2, #1a6bf2);
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 12px 24px rgba(17, 121, 200, 0.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(45px);
  transition: all 0.85s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* DARK MODE */
body.dark-mode .navbar {
  background: rgba(10, 22, 34, 0.96);
}

body.dark-mode nav a,
body.dark-mode .hero h1,
body.dark-mode .gallery-header h2,
body.dark-mode .story-card h3,
body.dark-mode .theme-toggle,
body.dark-mode .menu-toggle {
  color: #e8f1ff;
}

body.dark-mode .gallery-section,
body.dark-mode .story-section,
body.dark-mode .updates-section,
body.dark-mode .cta-section {
  background: #0d1b2a;
}

body.dark-mode .hero{
  background: linear-gradient(to bottom, #0f2433, #0e3646);
}

body.dark-mode .subtitle,
body.dark-mode .gallery-header p,
body.dark-mode .story-card p {
  color: #bfd1e6;
}

body.dark-mode .story-card,
body.dark-mode .updates-box {
  background: #14283c;
}

body.dark-mode .updates-box {
  border-color: #28445a;
}

body.dark-mode .updates-box h3 {
  color: #c9d9ea;
}

body.dark-mode .updates-box p {
  color: #a9bfd4;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }

  .story-container {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  nav {
    position: absolute;
    top: 82px;
    right: 4%;
    width: 260px;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: 0.3s ease;
  }

  nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .stats-container,
  .story-container,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }
  .hero h1 {
    font-size: 50px;
  }

  .stat-card h2 {
    font-size: 3rem;
  }

  .cta-box {
    padding: 45px 20px;
  }

  body.dark-mode nav {
    background: var(--nav-bg);
  }

  body.dark-mode .theme-toggle,
  body.dark-mode .menu-toggle {
    background: #14283c;
    color: #e8f1ff;
  }
}

@media (max-width: 700px) {
  .gallery-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 95px 18px 55px;
  }

  .hero h1 {
    font-size: 30px;
    line-height: 1.15;
  }

  .subtitle {
    font-size: 0.96rem;
  }

  .stats-container {
    gap: 10px;
  }

  .stat-card h2 {
    font-size: 2.4rem;
  }

  .stat-card p {
    font-size: 0.96rem;
  }

  .story-card {
    padding: 24px 20px;
  }

  .story-card h3 {
    font-size: 1.6rem;
  }

  .updates-box {
    padding: 45px 18px;
  }

  .updates-box h3 {
    font-size: 1.7rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
    text-align: center;
  }

  .back-to-top {
    width: 55px;
    height: 55px;
    right: 16px;
    bottom: 18px;
  }
}
@media (max-width: 480px) {
  .navbar {
    padding: 0 14px;
  }

  nav {
    left: 14px;
    right: 14px;
    width: auto;
    top: 78px;
  }
}