/* =========================================================================
   Jain Shwetambar Terapanthi Sabha, Ghaziabad — design tokens & components
   Palette is Jain-flag inspired; --accent is set per-request from settings.
   ========================================================================= */
:root {
  --accent: #b7202b;
  --accent-hover: #8a1820;
  --bg: #faf6ec;
  --card: #ffffff;
  --card-border: #ece2c8;
  --input-border: #e2d6ae;
  --heading: #231f18;
  --text: #3d3628;
  --muted: #5c5346;
  --muted2: #8a8172;
  --label: #6b6152;
  --tint: #fbeadb;
  --tint2: #fdf8ef;
  --success: #1e6f5c;
  --warning: #b8862f;
  --error: #a83232;
  --neutral: #8a8172;
  --wa: #25d366;
  --footer-bg: #231f18;
  --shadow: 0 1px 4px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  background: var(--bg);
  color: var(--heading);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d8c48a; border-radius: 8px; }

.serif { font-family: 'Merriweather', Georgia, serif; }
.wrap { max-width: 1180px; margin: 0 auto; }
.hidden { display: none !important; }

/* ---- Header --------------------------------------------------------------- */
.site-header {
  background: var(--accent);
  padding: 22px 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; padding: 4px;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-family: 'Merriweather', serif; font-weight: 900; font-size: 20px; color: #fff; line-height: 1.2; }
.brand-tagline { font-size: 13px; color: rgba(255,255,255,0.85); font-weight: 500; letter-spacing: 0.3px; }
.nav { display: flex; gap: 6px; background: rgba(255,255,255,0.14); padding: 5px; border-radius: 12px; flex-wrap: wrap; }
.nav a {
  padding: 9px 16px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; text-decoration: none;
  background: transparent; color: #fff;
}
.nav a.active { background: #fff; color: var(--accent); }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  border: none; border-radius: 10px; font-family: inherit; font-weight: 700;
  cursor: pointer; font-size: 14.5px; padding: 12px 26px;
  background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-hover); }
.btn-block { width: 100%; display: block; }
.btn-wa { background: var(--wa); }
.btn-wa:hover { background: #1fb457; }
.btn-tint { background: var(--tint); color: var(--accent); }
.btn-tint:hover { background: #f5ddc4; }
.btn-muted { background: #f0ebe0; color: var(--muted); }
.btn-danger { background: #f6dede; color: var(--error); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 7px; }

/* ---- Cards / inputs ------------------------------------------------------- */
.card {
  background: var(--card); border-radius: 16px; padding: 26px;
  box-shadow: var(--shadow); border: 1px solid var(--card-border);
}
.input, .select, textarea.input {
  width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 9px;
  border: 1.5px solid var(--input-border); font-size: 14.5px; font-family: inherit; outline: none;
  background: #fff; color: var(--heading);
}
textarea.input { resize: vertical; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--accent); }
.label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 14px; }

.eyebrow { font-size: 12px; font-weight: 700; color: var(--label); text-transform: uppercase; letter-spacing: 0.3px; }
.page-title { font-family: 'Merriweather', serif; font-size: 22px; color: var(--heading); margin: 0 0 6px; }
.page-sub { font-size: 14px; color: var(--muted2); margin-bottom: 20px; }
.section-pad { padding: 28px 24px 60px; }
.avatar {
  border-radius: 50%; background: var(--tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.pill { border-radius: 20px; font-weight: 700; display: inline-block; }

/* ---- Grids ---------------------------------------------------------------- */
.grid { display: grid; gap: 14px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-committee { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-lead { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.grid-news { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; text-align: center; }
.grid-2 { grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- Front page ----------------------------------------------------------- */
.hero { position: relative; width: 100%; height: clamp(240px, 45vw, 420px); overflow: hidden; background: #231f18; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(35,31,24,0.15) 0%, rgba(35,31,24,0.55) 60%, var(--accent) 100%); }
.hero-quote-wrap { position: absolute; left: 0; right: 0; bottom: 20px; padding: 0 20px; text-align: center; pointer-events: none; }
.hero-quote { font-family: 'Merriweather', serif; font-weight: 900; font-size: clamp(18px, 3.2vw, 30px);
  color: #fff; line-height: 1.4; max-width: 900px; margin: 0 auto; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.quote-strip { background: var(--accent); padding: 12px 20px; text-align: center; }
.quote-strip div { font-size: 14px; color: #fff; font-weight: 600; }
.announce {
  background: #fdf0e2; border: 1px solid #f0d9a8; border-radius: 12px; padding: 14px 18px;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.announce-text { font-size: 13.5px; color: #7a4a10; font-weight: 600; }
.cta-card { background: #fff; border-radius: 16px; padding: 34px 28px; box-shadow: var(--shadow);
  border: 1px solid var(--card-border); margin-bottom: 8px; text-align: center; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.band-about { background: var(--accent); padding: 48px 24px; }
.band-about .inner { max-width: 820px; margin: 0 auto; text-align: center; }
.about-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 4px; }
.about-h { font-family: 'Merriweather', serif; font-weight: 900; font-size: 24px; color: #fff; margin-bottom: 20px; }
.about-p { font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,0.92); margin-bottom: 16px; }
.band-lead { background: var(--bg); padding: 48px 24px; }
.band-news { background: #fff; padding: 48px 24px; }
.band-h { font-family: 'Merriweather', serif; font-weight: 900; font-size: 22px; color: var(--accent); margin-bottom: 22px; }
.lead-card { background: #fff; border-radius: 14px; padding: 24px 18px; text-align: center; border: 1px solid var(--card-border); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.lead-avatar { width: 76px; height: 76px; font-size: 26px; margin: 0 auto 14px; }
.news-card { background: var(--tint2); border-radius: 14px; padding: 18px; border: 1px solid var(--card-border); }
.news-featured { font-size: 11px; font-weight: 700; color: #b8681a; margin-bottom: 6px; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); padding: 40px 24px; color: rgba(255,255,255,0.8); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.site-footer h4 { font-weight: 700; font-size: 13.5px; color: #fff; margin: 0 0 10px; }
.footer-name { font-family: 'Merriweather', serif; font-weight: 800; font-size: 16px; color: #fff; margin-bottom: 10px; }
.footer-copy { padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 12px; color: rgba(255,255,255,0.5); text-align: center; margin-top: 28px; }
.footer-wa { color: #f0c26a; text-decoration: none; font-weight: 600; font-size: 13px; }

/* ---- Member cards / drawer ------------------------------------------------ */
.fam-card { background: #fdf8ef; border: 1px solid var(--card-border); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: box-shadow 0.15s, border-color 0.15s; text-align: left; width: 100%; font-family: inherit; }
.fam-card:hover { box-shadow: 0 3px 10px rgba(183,32,43,0.14); border-color: #e0b84a; }
.member-box { background: #fdf8ef; border-radius: 10px; padding: 12px 14px; }
.member-line { font-size: 12.5px; color: var(--muted2); margin-top: 3px; }
.rel-pill { font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--tint); padding: 3px 9px; border-radius: 20px; }

/* ---- Modal / drawer ------------------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(20,30,28,0.45); z-index: 50; display: flex; }
.overlay.center { align-items: center; justify-content: center; padding: 20px; }
.overlay.right { justify-content: flex-end; }
.modal { background: #fff; border-radius: 16px; padding: 28px; width: min(440px, 100%); max-height: 88vh; overflow-y: auto; }
.drawer { width: min(440px, 92vw); background: #fff; height: 100%; overflow-y: auto; box-shadow: -8px 0 24px rgba(0,0,0,0.15); padding: 28px 26px; }
.modal-title { font-family: 'Merriweather', serif; font-weight: 700; font-size: 18px; color: var(--heading); margin-bottom: 18px; }
.icon-close { border: none; background: #f0ebe0; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; color: var(--muted); }

/* ---- Tabs / sub-nav ------------------------------------------------------- */
.subnav { display: flex; gap: 6px; padding: 5px; border-radius: 12px; flex-wrap: wrap; }
.subnav.tint { background: var(--tint2); border-radius: 11px; }
.subnav.grey { background: #ece2c8; }
.subnav a { padding: 9px 16px; border: none; border-radius: 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none; background: transparent; color: var(--muted); }
.subnav a.active { background: var(--accent); color: #fff; }
.subnav.small a { padding: 8px 12px; font-size: 12.5px; border-radius: 7px; }

/* ---- Toast ---------------------------------------------------------------- */
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #231f18; color: #fff;
  padding: 14px 22px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 100; animation: toastIn 0.2s ease-out; display: flex; align-items: center; gap: 10px; }

/* ---- Membership card ------------------------------------------------------ */
.mcard { background: linear-gradient(135deg, var(--accent), #231f18); border-radius: 18px; padding: 24px; color: #fff; position: relative; overflow: hidden; }
.mcard-blob { position: absolute; top: -30px; right: -30px; width: 140px; height: 140px; border-radius: 50%; background: rgba(201,162,39,0.3); }

/* ---- Wishes / events ------------------------------------------------------ */
.event-row { background: #fff; border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow); border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.event-badge { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }

/* ---- Print ---------------------------------------------------------------- */
.print-only { display: none; }
@media print {
  body.printing .no-print { display: none !important; }
  body.printing .print-only { display: block !important; }
}

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 520px) {
  .site-header { padding: 16px 18px; }
  .section-pad { padding: 20px 16px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
}
