/*
Theme Name: Trust Basic
Theme URI: https://example.com
Author: Your Name
Description: A basic custom theme for a charitable trust website. Hero, impact stats, programs (custom post type), gallery, donate and contact pages.
Version: 1.0
Text Domain: trust-basic
*/

/* ---------- Base ---------- */
:root {
  --primary: #b8860b;
  --primary-dark: #8a6508;
  --accent: #c9872a;
  --text: #2d2a1f;
  --muted: #6b6358;
  --bg: #ffffff;
  --bg-soft: #fffbea;
  --border: #f3e3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 60px 0; }
h1, h2, h3 { line-height: 1.25; margin-top: 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title p { color: var(--muted); max-width: 600px; margin: 10px auto 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #a86f1f; }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }

/* ---------- Header ---------- */
header.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.logo span { color: var(--accent); }
nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
nav a { font-weight: 500; color: var(--text); }
nav a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; }
.header-donate { margin-left: 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--primary-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 140px 0;
  min-height: 480px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.35));
}
.hero-inner {
  position: relative;
  z-index: 1;
}
.hero-copy { text-align: left; }
.hero h1 { font-size: 2.6rem; max-width: 700px; margin: 0 0 16px; }
.hero p { font-size: 1.15rem; max-width: 600px; margin: 0 0 30px; opacity: 0.95; }
.hero-actions { display: flex; gap: 16px; justify-content: flex-start; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats { background: var(--bg-soft); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 0.95rem; }

/* ---------- Programs ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.08); transform: translateY(-3px); }
.card-img { height: 160px; background: var(--bg-soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.9rem; }
.card-body { padding: 20px; }
.card-body h3 { margin-bottom: 8px; font-size: 1.1rem; }
.card-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* ---------- About preview / split sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.split .media { background: var(--bg-soft); border-radius: 10px; height: 280px; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* ---------- Gallery (native WP gallery block) ---------- */
.wp-block-gallery { margin: 0; }

/* ---------- CTA ---------- */
.cta {
  background: var(--accent);
  color: #fff;
  text-align: center;
}
.cta h2 { margin-bottom: 10px; }
.cta .btn-primary { background: #fff; color: var(--accent); }
.cta .btn-primary:hover { background: #f2f2f2; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: #2b2111;
  color: #d9cfb8;
  padding: 50px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-grid h4 { color: #fff; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #473a1f;
  padding-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: #a89a79;
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: var(--bg-soft);
  padding: 50px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { color: var(--primary-dark); }
.page-content { padding: 60px 0; }
.donate-page-content { padding-top: 15px; }

/* ---------- Donation form ---------- */
.donation-form {
  position: relative;
  max-width: 480px;
  margin: 0 auto 0;
  padding: 30px;
  background: #fff7e6;
  border: 2px solid var(--primary);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.donation-form h2 { margin-top: 0; }
.donation-form label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 0.95rem; }
.donation-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}
.donation-form-hint { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.donation-form .btn { margin-top: 24px; border: none; cursor: pointer; }
.donation-notice { padding: 14px 16px; border-radius: 6px; margin-bottom: 20px; }
.donation-notice-success { background: #e6f4ea; color: #1e6b33; }
.donation-notice-error { background: #fbe9e7; color: #a33a2d; }

.donate-india-notice {
  max-width: 700px;
  margin: 40px auto 30px;
  padding: 12px 18px;
  background: #fbe9e7;
  color: #a33a2d;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}
.donate-declaration-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 20px 0 0 !important;
  cursor: pointer;
}
.donate-declaration-label input[type="checkbox"] {
  width: auto !important;
  flex-shrink: 0;
  margin-top: 3px;
}

.donate-step-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.donate-connector {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin: 14px 0;
  line-height: 1;
}
.donate-next-step-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.donate-next-step-link:hover { text-decoration: underline; }
.donate-hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Donate: amount selector + dynamic QR ---------- */
.donate-pay-card {
  max-width: 480px;
  margin: 15px auto 0;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
}
.donate-pay-card h2 { margin-top: 0; }
.donate-amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0 16px;
}
.donate-amount-btn {
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.donate-amount-btn:hover { border-color: var(--primary); }
.donate-amount-btn.is-active { border-color: var(--primary); background: var(--primary); color: #fff; }
.donate-custom-label { display: block; font-weight: 600; margin: 10px 0 6px; font-size: 0.9rem; text-align: left; }
.donate-pay-card input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}
.donate-qr-wrap { margin: 24px 0 16px; }
#donate-qr-dynamic { display: flex; justify-content: center; }
#donate-qr-dynamic img { border-radius: 8px; border: 1px solid var(--border); }
.donate-qr-caption { margin: 10px 0 0; color: var(--muted); }
.donate-upi-app-btn { display: inline-block; width: 100%; box-sizing: border-box; border: none; cursor: pointer; text-decoration: none; }
.donate-upi-id { margin-top: 20px; color: var(--muted); font-size: 0.9rem; }
.page-content-section { max-width: 700px; margin: 40px auto 0; }
.donate-80g-badge {
  max-width: 700px;
  margin: 0 auto 20px;
  padding: 12px 18px;
  background: #e6f4ea;
  color: #1e6b33;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 100px 0; min-height: 380px; }
  .hero-copy { text-align: center; }
  .hero-copy h1, .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav { position: fixed; top: 65px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); display: none; }
  nav.open { display: block; }
  nav ul { flex-direction: column; padding: 20px; gap: 16px; }
  .nav-toggle { display: block; }
  .header-donate { display: none; }
  .programs-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
}
