/* =========================================================
   Helping Hearts — style.css (all website styling)
   ========================================================= */

/* ---------- 1. Colours & fonts (edit here) ---------- */
:root {
  --green: #1f4d36;        /* forest green (primary) */
  --green-dark: #143726;
  --green-soft: #2d6a4c;
  --gold: #c9a24a;         /* subtle gold accent */
  --gold-light: #e7cf8f;
  --cream: #f8f3e8;        /* warm cream background */
  --white: #ffffff;
  --text: #24302a;
  --muted: #5f6b64;
  --border: #e6dfcf;
  --radius: 14px;
  --shadow: 0 12px 34px -14px rgba(20, 55, 38, .28);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--white); line-height: 1.7; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--green-dark); line-height: 1.15; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.container { width: min(1180px, 92%); margin: 0 auto; }
.narrow { max-width: 820px; }
.center { text-align: center; margin-top: 2.5rem; }
.section { padding: 90px 0; }
.bg-cream { background: var(--cream); }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: .8rem; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head p { color: var(--muted); }

/* ---------- 3. Buttons ---------- */
.btn { display: inline-block; padding: .85rem 1.7rem; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 2px solid transparent; transition: transform .2s, background .2s, box-shadow .2s; cursor: pointer; font-family: var(--sans); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-soft); }
.btn-gold { background: var(--gold); color: var(--green-dark); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-lg { padding: 1.05rem 2.6rem; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--green); }

/* ---------- 4. Header & navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 6px 20px -12px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--green-dark); line-height: 1.05; }
.logo small { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.logo-mark { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: var(--gold); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.logo-light { color: var(--white); }
.logo-light small { color: var(--gold-light); }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 1.8rem; margin: 0; padding: 0; }
.main-nav a:not(.btn) { text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; position: relative; }
.main-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--gold); transition: width .25s; }
.main-nav a:not(.btn):hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--green); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--green-dark); margin: 5px 0; transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Image placeholders ----------
   Shows the filename to replace when a photo is missing. */
.ph { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: linear-gradient(135deg, #e9e2d0, #d8cfb8); aspect-ratio: 4/3; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.missing img { display: none; }
.ph.missing::after { content: "\1F4F7  " attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; font-size: .82rem; color: var(--green-dark); font-weight: 600; border: 2px dashed rgba(31,77,54,.35); border-radius: inherit; }
.ph.tall { aspect-ratio: 4/5; }
.ph.wide { aspect-ratio: 3/2; }
.ph.portrait { aspect-ratio: 3/4; max-width: 440px; }
.ph.bg { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; background: linear-gradient(135deg, var(--green-soft), var(--green-dark)); }
.ph.bg.missing::after { color: var(--gold-light); border: 0; align-items: start; padding-top: 1.2rem; place-items: start center; }

/* ---------- 6. Hero & page banners ---------- */
.hero, .page-hero { position: relative; color: var(--white); display: flex; align-items: center; overflow: hidden; }
.hero { min-height: 88vh; }
.page-hero { min-height: 380px; }
.hero::before, .page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(14,40,27,.88), rgba(14,40,27,.45)); }
.hero-text, .page-hero-text { position: relative; z-index: 2; max-width: 720px; padding: 4rem 0; }
.hero h1, .page-hero h1 { color: var(--white); }
.hero p, .page-hero p { font-size: 1.15rem; color: rgba(255,255,255,.88); margin-bottom: 2rem; }
.page-hero.slim { min-height: 240px; background: var(--green); }
.page-hero.slim::before { display: none; }

/* ---------- 7. Layout helpers ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split.align-start { align-items: start; }
.split.reverse > :first-child { order: 2; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }

/* ---------- 8. Cards ---------- */
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s; }
.card:hover { transform: translateY(-6px); }
.card .ph { border-radius: 0; }
.card-body { padding: 1.4rem; }
.card-body p { color: var(--muted); font-size: .93rem; }
.mv-card { background: var(--white); padding: 2.6rem; border-radius: var(--radius); border-top: 4px solid var(--gold); box-shadow: var(--shadow); }
.mv-icon { color: var(--gold); font-size: 2rem; display: block; margin-bottom: .6rem; }

/* ---------- 9. Green sections ---------- */
.bg-green { background: var(--green); color: rgba(255,255,255,.88); }
.bg-green h2, .bg-green h3 { color: var(--white); }
.why > div, .values > div { padding: 2rem; border: 1px solid rgba(231,207,143,.3); border-radius: var(--radius); }
.why .num { font-family: var(--serif); font-size: 2.6rem; color: var(--gold); display: block; }

/* ---------- 10. Gallery ---------- */
.gallery-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.g-item { padding: 0; border: 0; cursor: pointer; font: inherit; }
.g-item img { transition: transform .5s; }
.g-item:hover img { transform: scale(1.07); }
.g-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .9rem; color: var(--white); text-align: left; font-size: .9rem; background: linear-gradient(transparent, rgba(14,40,27,.85)); opacity: 0; transform: translateY(10px); transition: .3s; z-index: 2; }
.g-item:hover .g-caption, .g-item:focus .g-caption { opacity: 1; transform: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,22,15,.94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 88vw; text-align: center; }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 8px; min-width: 200px; min-height: 120px; background: #2a3a31; }
.lightbox figcaption { color: var(--gold-light); margin-top: 1rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: var(--white); border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; cursor: pointer; line-height: 1; }
.lightbox button:hover { background: var(--gold); color: var(--green-dark); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- 11. Call to action ---------- */
.cta { background: linear-gradient(135deg, var(--green-dark), var(--green-soft)); padding: 90px 0; text-align: center; color: rgba(255,255,255,.9); }
.cta-inner { max-width: 720px; }
.cta h2 { color: var(--white); }
.cta p { font-size: 1.1rem; margin-bottom: 2rem; }

/* ---------- 12. About page ---------- */
.objectives { counter-reset: o; list-style: none; padding: 0; display: grid; gap: .9rem; }
.objectives li { counter-increment: o; background: var(--cream); padding: 1rem 1.2rem 1rem 4rem; border-radius: 10px; position: relative; }
.objectives li::before { content: counter(o, decimal-leading-zero); position: absolute; left: 1.2rem; font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 1.3rem; }
blockquote { font-family: var(--serif); font-size: 1.7rem; color: var(--green); border-left: 3px solid var(--gold); margin: 1.5rem 0 0; padding-left: 1.2rem; }
.info-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.info-table th, .info-table td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.info-table th { width: 38%; color: var(--muted); font-weight: 500; }

/* ---------- 13. Programs ---------- */
.program { padding: 80px 0; scroll-margin-top: 80px; }

/* ---------- 14. Donate ---------- */
.support-list > div { background: var(--white); padding: 1.6rem; border-radius: var(--radius); border-left: 3px solid var(--gold); }
.support-list p { color: var(--muted); margin: 0; font-size: .93rem; }
.amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.amount { text-decoration: none; text-align: center; padding: 1.8rem 1rem; border: 2px solid var(--border); border-radius: var(--radius); color: var(--text); transition: .25s; }
.amount strong { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--green); }
.amount span { font-size: .85rem; color: var(--muted); }
.amount:hover { border-color: var(--gold); background: var(--cream); transform: translateY(-4px); }

/* ---------- 15. Contact ---------- */
.contact-cards { list-style: none; padding: 0; display: grid; gap: 1rem; margin: 1.5rem 0 2rem; }
.contact-cards li { background: var(--cream); padding: 1rem 1.3rem; border-radius: 10px; display: flex; flex-direction: column; }
.contact-cards strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); }
.contact-form { background: var(--white); padding: 2.4rem; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--green); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field input, .field textarea { width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--border); border-radius: 10px; font: inherit; background: #fffdf8; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.field .invalid { border-color: #b3412f; }
.error { color: #b3412f; font-size: .82rem; }
.form-status { margin-top: 1rem; color: var(--green); font-weight: 500; }

/* ---------- 16. Legal pages ---------- */
.legal h2 { font-size: 1.6rem; margin-top: 2rem; }

/* ---------- 17. Footer ---------- */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,.75); padding-top: 70px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 50px; }
.site-footer h4 { color: var(--gold-light); font-size: 1.25rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .logo { margin-bottom: 1rem; }
.small { font-size: .8rem; color: var(--gold-light); }
.socials { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.socials a { padding: .35rem .8rem; border: 1px solid rgba(231,207,143,.4); border-radius: 999px; font-size: .8rem; }
.socials.dark a { color: var(--green); border-color: var(--border); text-decoration: none; }
.socials.dark a:hover { background: var(--green); color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.3rem 0; font-size: .82rem; text-align: center; }

/* ---------- 18. Back-to-top ---------- */
.back-to-top { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--gold); color: var(--green-dark); font-size: 1.3rem; cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s; z-index: 40; }
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- 19. Simple fade-in animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- 20. Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .amounts { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 78px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height .35s ease; }
  .main-nav.open { max-height: 480px; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem 4% 1.5rem; }
  .main-nav li { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--border); }
  .main-nav li:last-child { border: 0; padding-top: 1rem; }
  .split, .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 2.2rem; }
  .split.reverse > :first-child { order: 0; }
  .section, .program, .cta { padding: 64px 0; }
}
@media (max-width: 600px) {
  .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
  .gallery-preview { grid-template-columns: repeat(2, 1fr); }
  .logo { font-size: 1.2rem; }
  .logo small { font-size: .55rem; }
  .mv-card, .contact-form { padding: 1.6rem; }
  .lb-prev, .lb-next { top: auto !important; bottom: 20px; transform: none !important; }
}
