/* =========================================================
   NGO DEMO — style.css
   Style guide: Primary Green #1D9A59, Dark Green #0E5A34
   Font: Poppins. Radius: 18px (cards), 8px (buttons).
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Tokens ---------- */
:root {
  --primary-green: #1d9a59;
  --primary-green-dark: #17824c;
  --dark-green: #0e5a34;
  --white: #ffffff;
  --light-bg: #f8faf8;
  --heading: #222222;
  --text: #666666;
  --border-radius: 18px;
  --btn-radius: 8px;
  --shadow-soft: 0 10px 30px rgba(14, 90, 52, 0.08);
  --shadow-card: 0 8px 24px rgba(20, 30, 25, 0.07);
  --transition: 0.3s ease;
  --container-width: 1200px;
}

body {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 15px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: scale(1.04);
}

.btn-primary {
  background: var(--primary-green);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(29, 154, 89, 0.35);
}

.btn-primary:hover {
  background: var(--primary-green-dark);
}

.btn-dark {
  background: #14181a;
  color: var(--white);
}

.btn-dark:hover {
  background: #000000;
}

/* ---------- Fade up animation ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  height: 70px;
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--heading);
  letter-spacing: 0.3px;
}

.logo-icon {
  color: var(--primary-green);
  width: 26px;
  height: 26px;
  display: inline-flex;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

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

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

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--heading);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary-green);
}

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

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  padding: 24px 0 0;
}

.hero-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 520px;
  display: flex;
  align-items: center;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 15, 0.78) 0%, rgba(10, 20, 15, 0.5) 45%, rgba(10, 20, 15, 0.15) 75%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 0 56px;
  color: var(--white);
}

.hero-eyebrow {
  color: #a9e6c4;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
}

.hero-title {
  color: var(--white);
  font-size: 46px;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 18px;
}

.hero-subtitle {
  color: #e7f2ea;
  font-size: 16px;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Section shared ---------- */
.section {
  padding: 96px 0;
}

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

.section-title {
  text-align: center;
  font-size: 34px;
  margin-bottom: 56px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  background: var(--primary-green);
  border-radius: 4px;
  margin: 16px auto 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 44px;
}

.section-title-left {
  text-align: left;
  margin-bottom: 0;
}

.section-title-left::after {
  margin: 16px 0 0;
}

.view-all {
  color: var(--primary-green);
  font-weight: 600;
  font-size: 15px;
  transition: transform var(--transition);
  display: inline-block;
}

.view-all:hover {
  transform: translateX(4px);
}

/* ---------- Our Causes ---------- */
.causes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.cause-card {
  background: var(--light-bg);
  border-radius: var(--border-radius);
  padding: 40px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.cause-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 34px rgba(20, 30, 25, 0.12);
}

.cause-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.cause-icon svg {
  width: 30px;
  height: 30px;
}

.icon-blue {
  background: #e3f0fd;
  color: #2f7fe0;
}

.icon-red {
  background: #fde6e6;
  color: #e15353;
}

.icon-green {
  background: #e2f6ea;
  color: var(--primary-green);
}

.icon-orange {
  background: #fdedd9;
  color: #e08b26;
}

.cause-title {
  font-size: 19px;
  margin-bottom: 10px;
}

.cause-desc {
  font-size: 14px;
  color: var(--text);
}

/* ---------- Ongoing Campaigns ---------- */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.campaign-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.campaign-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 38px rgba(20, 30, 25, 0.14);
}

.campaign-image {
  height: 190px;
  overflow: hidden;
}

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

.campaign-card:hover .campaign-image img {
  transform: scale(1.07);
}

.campaign-body {
  padding: 24px 24px 28px;
}

.campaign-title {
  font-size: 18px;
  margin-bottom: 14px;
}

.campaign-amounts {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
}

.campaign-amounts b {
  color: var(--heading);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #eaf1ea;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-green), var(--dark-green));
  border-radius: 8px;
  transition: width 1.4s ease;
}

.progress-fill.animate {
  width: var(--target);
}

.progress-percent {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-green);
}

/* ---------- Our Impact ---------- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.impact-card {
  text-align: center;
  padding: 36px 20px;
  border-radius: var(--border-radius);
  background: var(--light-bg);
  transition: transform var(--transition);
}

.impact-card:hover {
  transform: translateY(-6px);
}

.impact-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e2f6ea;
  color: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.impact-icon svg {
  width: 28px;
  height: 28px;
}

.impact-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--dark-green);
  margin-bottom: 6px;
}

.impact-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--primary-green);
  padding: 64px 0;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.newsletter-text h2 {
  color: var(--white);
  font-size: 28px;
  margin-bottom: 8px;
}

.newsletter-text p {
  color: #d8f0e2;
  font-size: 15px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  background: var(--white);
  padding: 6px;
  border-radius: 12px;
  flex: 1;
  max-width: 480px;
  min-width: 280px;
}

.newsletter-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--heading);
}

.newsletter-form .btn {
  padding: 12px 24px;
}

/* ---------- Footer ---------- */
.footer {
  background: #0b1410;
  color: #b7c2bc;
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-footer {
  color: var(--white);
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  color: #8fa097;
  margin-bottom: 20px;
  max-width: 300px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.social-icons svg {
  width: 16px;
  height: 16px;
  fill: var(--white);
}

.social-icons a:hover {
  background: var(--primary-green);
  transform: translateY(-3px);
}

.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 20px;
}

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

.footer-col ul a {
  font-size: 14px;
  color: #8fa097;
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--primary-green);
}

.footer-contact li {
  font-size: 14px;
  color: #8fa097;
}

.footer-bottom {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: #71807a;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(29, 154, 89, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 200;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Laptop */
@media (max-width: 1200px) {
  .container {
    padding: 0 20px;
  }

  .hero-title {
    font-size: 40px;
  }
}

/* Tablet */
@media (max-width: 992px) {
  .causes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .campaigns-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-card {
    height: 480px;
  }

  .hero-title {
    font-size: 34px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .navbar-actions .btn-primary {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-card {
    height: auto;
    padding: 48px 0;
    display: block;
  }

  .hero-bg {
    position: absolute;
  }

  .hero-content {
    padding: 0 28px;
    max-width: 100%;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-buttons .btn {
    flex: 1;
    text-align: center;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 36px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .causes-grid,
  .campaigns-grid,
  .impact-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-form {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    background: transparent;
    padding: 0;
    gap: 12px;
  }

  .newsletter-form input {
    background: var(--white);
    width: 100%;
  }

  .newsletter-form .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-eyebrow {
    font-size: 12px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .cause-card {
    padding: 32px 20px;
  }
}
