:root {
  --blue: #8d5c3b;
  --blue-dark: #5f3725;
  --green: #d6a248;
  --green-soft: #f7eadc;
  --text: #2f261f;
  --muted-text: #6f6053;
  --line: #eadfd3;
  --section: #fbf7f2;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(95, 55, 37, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  color: #4c2d1f;
  font-family: "Poppins", Arial, sans-serif;
  line-height: 1.15;
}

h1 {
  max-width: 760px;
  font-size: clamp(36px, 6vw, 70px);
}

h2 {
  font-size: clamp(26px, 3vw, 38px);
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
}

.logo img {
  width: auto;
  height: 52px;
  max-width: min(38vw, 180px);
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

.site-nav a {
  padding: 27px 0 24px;
  border-bottom: 3px solid transparent;
  line-height: 1.2;
}

.site-nav a.active {
  color: var(--blue);
  border-color: var(--green);
}

.donate-btn {
  min-width: 82px;
  padding: 9px 18px !important;
  color: #fff9f3 !important;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(180deg, #a56d47, var(--blue-dark));
  border: 1px solid #8d5c3b !important;
  border-radius: 3px;
  box-shadow: 0 8px 16px rgba(95, 55, 37, 0.18);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--blue);
  background: transparent;
  font: 700 14px "Open Sans", Arial, sans-serif;
}

.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #5f3725;
}

.image-hero {
  background-image: linear-gradient(90deg, rgba(62, 35, 24, 0.94), rgba(78, 46, 29, 0.78), rgba(78, 46, 29, 0.34)), url("assets/images/hero/hero-training.jpg");
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(60, 33, 22, 0.12);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 72px 0;
  color: var(--white);
}

.hero h1,
.hero p {
  color: var(--white);
}

.hero p {
  max-width: 560px;
  font-size: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 16px;
  padding: 4px 12px;
  color: #94631d;
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  font-weight: 700;
  text-align: center;
  border-radius: 3px;
  border: 1px solid transparent;
}

.btn-primary {
  color: #fff9f3;
  background: linear-gradient(180deg, #a56d47, var(--blue-dark));
  border-color: #8d5c3b;
  box-shadow: 0 10px 20px rgba(95, 55, 37, 0.18);
}

.btn-secondary {
  color: var(--white);
  border-color: rgba(255, 245, 232, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.btn-green {
  color: #4c2d1f;
  background: var(--green);
  border-color: #c89339;
  box-shadow: 0 10px 18px rgba(214, 162, 72, 0.22);
}

.text-link {
  color: var(--blue);
  font-weight: 700;
}

.section {
  padding: clamp(56px, 8vw, 86px) 0;
}

.muted {
  background: var(--section);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: 64px;
}

.two-cards,
.program-grid,
.activity-grid,
.team-grid,
.contact-grid,
.footer-grid {
  display: grid;
  gap: 24px;
}

.small-card,
.program-card,
.large-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.two-cards {
  max-width: 920px;
  margin: 0 auto;
  gap: 20px;
}

.two-cards .large-card {
  padding: 22px 24px;
}

.two-cards .large-card h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 30px);
}

.two-cards .large-card p {
  max-width: 34ch;
  color: var(--muted-text);
  line-height: 1.75;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  color: #94631d;
  background: var(--green-soft);
  border-radius: 4px;
  font-weight: 700;
}

.photo-card,
.activity-card,
.team-grid article,
.program-detail img {
  position: relative;
  overflow: hidden;
  min-height: clamp(240px, 32vw, 320px);
  margin: 0;
  background: #dfe7ee;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.photo-card figcaption,
.activity-card figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: var(--white);
  background: rgba(76, 45, 31, 0.92);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
}

.missing-image::before {
  content: "Add real NGO photo here";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #30415f;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(135deg, #e5e7eb, #f8fafc);
}

.missing-image img {
  opacity: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.section-heading p {
  max-width: 620px;
  color: var(--muted-text);
}

.centered {
  text-align: center;
}

.section-heading.centered {
  display: block;
}

.section-heading.centered p,
.centered p,
.centered h1 {
  margin-left: auto;
  margin-right: auto;
}

.program-grid {
  grid-template-columns: repeat(4, 1fr);
}

.activity-grid {
  grid-template-columns: repeat(3, 1fr);
}

.image-card {
  overflow: hidden;
  padding: 0 0 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.image-card img {
  height: 185px;
  margin-bottom: 22px;
  aspect-ratio: 4 / 3;
}

.image-card h3,
.image-card p {
  padding: 0 24px;
}

.image-card p {
  margin-bottom: 0;
}

.extended {
  grid-template-columns: repeat(4, 1fr);
}

.activity-card {
  min-height: 250px;
}

.activity-card,
.gallery-item,
.image-card,
.photo-card,
.program-detail img {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.activity-card img,
.gallery-item img,
.image-card img,
.photo-card img,
.program-detail img {
  transition: transform 220ms ease;
}

.activity-card:hover,
.gallery-item:hover,
.image-card:hover,
.photo-card:hover {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.activity-card:hover img,
.gallery-item:hover img,
.image-card:hover img,
.photo-card:hover img {
  transform: scale(1.035);
}

.impact-band {
  padding: 44px 0;
  color: var(--white);
  background: linear-gradient(90deg, #6f412b, #4f2e20);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.impact-grid strong {
  display: block;
  color: var(--white);
  font-family: "Poppins", Arial, sans-serif;
  font-size: clamp(28px, 4vw, 36px);
}

.impact-grid span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.gallery-grid.large {
  grid-auto-flow: dense;
}

.gallery-item {
  position: relative;
  min-height: 250px;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  background: #dfe7ee;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.gallery-item.portrait img {
  object-position: center;
}

.gallery-item span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  color: #8a5a17;
  background: rgba(247, 234, 220, 0.96);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.gallery-item.is-hidden {
  display: none;
}

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

.cta {
  max-width: 880px;
  padding: 56px 24px;
  color: var(--white);
  text-align: center;
  background: linear-gradient(135deg, #7d4d33, #5f3725);
  border-radius: 8px;
}

.cta h2,
.cta p {
  color: var(--white);
}

.site-footer {
  color: #6f6053;
  background: #fcfaf7;
  border-top: 1px solid var(--line);
}

.footer-grid {
  grid-template-columns: 1.4fr 1fr 1.4fr;
  padding: 54px 0 36px;
}

.site-footer h3,
.site-footer h4 {
  color: #4c2d1f;
  font-size: 16px;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
}

.copyright {
  margin: 0;
  padding: 18px;
  text-align: center;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.page-hero {
  padding: clamp(56px, 8vw, 95px) 0;
  background: linear-gradient(rgba(251, 247, 242, 0.88), rgba(251, 247, 242, 0.93)), url("assets/images/hero/page-header.jpg");
  background-position: center;
  background-size: cover;
}

.page-hero p {
  max-width: 720px;
  font-size: 19px;
}

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

.team-grid {
  grid-template-columns: repeat(3, 1fr);
}

.team-grid article {
  min-height: auto;
  padding: 28px;
  background: var(--white);
}

.team-grid h3,
.team-grid p {
  padding: 0;
}

.team-grid p {
  color: var(--muted-text);
}

.team-initial {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  color: var(--white);
  background: linear-gradient(180deg, #a56d47, var(--blue-dark));
  border-radius: 50%;
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 700;
}

.program-detail-list {
  display: grid;
  gap: 46px;
}

.program-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 48px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line);
}

.program-detail img {
  width: 100%;
}

.program-detail:nth-child(even) img {
  order: -1;
}

.program-detail ul {
  padding-left: 20px;
  color: var(--muted-text);
}

.filter-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 34px;
}

.filter-row button {
  min-height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: #e5e7eb;
}

.filter-row .active {
  color: #fff9f3;
  background: var(--blue-dark);
}

.contact-grid {
  grid-template-columns: 1.3fr 0.9fr;
  align-items: start;
}

.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.94)), url("assets/images/about/about-story.jpg");
  background-position: center;
  background-size: cover;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 42px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.contact-form h2,
.contact-form .eyebrow,
.contact-form .full,
.contact-form button {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #e1e5ed;
  border-radius: 3px;
  background: #faf6f1;
  padding: 15px 16px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.contact-info {
  display: grid;
  gap: 28px;
}

.map-box {
  min-height: 270px;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 700;
  background:
    linear-gradient(rgba(229, 231, 235, 0.86), rgba(229, 231, 235, 0.86)),
    repeating-linear-gradient(45deg, #cbd5e1 0 2px, transparent 2px 24px),
    repeating-linear-gradient(-45deg, #cbd5e1 0 2px, transparent 2px 24px);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.map-box span {
  padding: 14px 22px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(2, 6, 23, 0.84);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  width: min(980px, 100%);
  height: auto;
  max-height: 84vh;
  border-radius: 6px;
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .container {
    width: min(1120px, calc(100% - 28px));
  }

  .site-nav {
    gap: 20px;
  }

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

  .activity-grid.extended {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

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

  .site-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 0;
  }

  .logo img {
    height: 46px;
    max-width: min(42vw, 160px);
  }

  .donate-btn {
    margin-top: 8px;
  }

  .hero {
    min-height: 540px;
  }

  .split,
  .program-detail,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split,
  .program-detail {
    gap: 32px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .program-detail:nth-child(even) img {
    order: initial;
  }

  .program-grid,
  .activity-grid,
  .gallery-grid,
  .team-grid,
  .highlight-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  h1 {
    font-size: clamp(32px, 8vw, 48px);
  }

  h2 {
    font-size: clamp(24px, 6vw, 34px);
  }

  .hero-content {
    padding: 56px 0;
  }

  .hero p,
  .page-hero p {
    font-size: 17px;
  }

  .button-row .btn {
    flex: 1 1 180px;
  }

  .program-grid,
  .activity-grid,
  .gallery-grid,
  .team-grid,
  .highlight-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .two-cards {
    grid-template-columns: 1fr;
  }

  .footer-grid > :first-child {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0 16px;
    min-height: 72px;
    gap: 12px;
  }

  .logo img {
    height: 40px;
    max-width: min(44vw, 138px);
  }

  .section,
  .page-hero {
    padding: 64px 0;
  }

  .hero {
    min-height: 460px;
  }

  .hero-content {
    padding: 44px 0;
  }

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

  .section-heading {
    display: block;
  }

  .section-heading,
  .section-heading.centered {
    margin-bottom: 28px;
  }

  .button-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .button-row .btn {
    width: auto;
    min-width: 140px;
    min-height: 42px;
    padding: 0 18px;
    flex: 0 0 auto;
  }

  .filter-row {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter-row button {
    flex: 0 0 auto;
  }

  .contact-form {
    padding: 28px 20px;
    grid-template-columns: 1fr;
  }

  .photo-card figcaption,
  .activity-card figcaption,
  .gallery-item span {
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }

  .impact-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-grid {
    gap: 18px;
    padding: 40px 0 28px;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(1120px, calc(100% - 20px));
  }

  .site-header {
    padding: 0 10px;
  }

  .site-nav {
    top: 72px;
    padding: 10px 16px 18px;
  }

  .menu-toggle {
    padding: 6px 0;
    font-size: 13px;
  }

  .hero {
    min-height: 420px;
  }

  .hero p {
    font-size: 16px;
  }

  .button-row .btn {
    min-width: 126px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  .small-card,
  .program-card,
  .large-card,
  .contact-form {
    padding-left: 18px;
    padding-right: 18px;
  }
}
