/* ═══════════════════════════════════════════════════════════════
   Professional polish + dark mode — loaded after site.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Typography ─────────────────────────────────────────────── */
body { font-size: 17px; line-height: 1.75; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
section h2 {
  font-family: var(--displayfont) !important; font-weight: 400 !important;
  font-size: clamp(1.7rem, 2.7vw, 2.4rem) !important; line-height: 1.28 !important; letter-spacing: -.005em;
}
section .text-center > h2::after {
  content: ""; display: block; width: 64px; height: 2px; margin: .85rem auto 0;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
section span.uppercase {
  letter-spacing: .14em !important; font-size: .72rem !important; font-weight: 700 !important;
  padding: .35rem .9rem !important;
}
section p { line-height: 1.8; }
section h3 { letter-spacing: 0; }
header.sticky nav a { font-weight: 600; letter-spacing: .01em; }

/* ── Cards ──────────────────────────────────────────────────── */
article.gold-border, #contactSection .bg-ivory, #aartiSection .bg-white {
  border-radius: 12px !important;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
article.gold-border:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20,34,49,.14) !important; border-color: rgba(173,138,80,.6) !important; }
article.gold-border img { transition: transform .6s ease; }
article.gold-border:hover img { transform: scale(1.05); }
article.gold-border h3 { font-size: 1.2rem !important; line-height: 1.4; font-weight: 700; }
article.gold-border p { font-size: .95rem; color: var(--muted); }

/* ── Buttons ────────────────────────────────────────────────── */
.stage-filter-btn { border-radius: 999px !important; font-weight: 600 !important; letter-spacing: .01em; padding: .55rem 1.1rem !important; transition: all .2s ease; }
header.sticky a[href="#donationHubSection"].tap-target {
  border-radius: 10px !important; padding: 10px 18px !important; font-size: 14px !important; font-weight: 700 !important; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease;
}
header.sticky a[href="#donationHubSection"].tap-target:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,34,49,.25) !important; }

/* ── Theme toggle button (left of the donation button) ──────── */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--navy); border: 1px solid var(--line);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { border-color: var(--brass); color: var(--saffron); transform: translateY(-1px); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle { color: #f1d98b; border-color: rgba(212,175,55,.4); }
html[data-theme="dark"] .theme-toggle:hover { background: rgba(212,175,55,.12); color: #ffe9a8; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (max-width: 480px) { .theme-toggle { width: 40px; height: 40px; } }

/* ── Trustees: ONE horizontal line ──────────────────────────── */
#trusteeGrid { display: flex !important; flex-wrap: nowrap; justify-content: center; gap: 1.25rem; }
#trusteeGrid > div { flex: 1 1 0; min-width: 0; max-width: 300px; padding: 1.4rem 1rem !important; }
#trusteeGrid > .trustee-empty { flex: 1 1 100%; max-width: none; }
#trusteeGrid h3 { font-size: 1.05rem; line-height: 1.4; overflow-wrap: anywhere; }
#trusteeGrid p { overflow-wrap: anywhere; }
@media (max-width: 719px) {
  #trusteeGrid { flex-wrap: wrap; }
  #trusteeGrid > div { flex: 1 1 calc(50% - .7rem); max-width: none; }
}
@media (max-width: 420px) { #trusteeGrid > div { flex-basis: 100%; } }

/* ── Donation details: ONE straight line of 3 cards ─────────── */
#donationHubSection .max-w-4xl { max-width: 1100px !important; }
@media (min-width: 720px) {
  #donationCards { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 1rem !important; align-items: stretch; }
  #donationCards > * { padding: 1rem !important; }
  #donationCards > * > span:first-child { width: 2.5rem !important; height: 2.5rem !important; font-size: 1.1rem !important; }
}
#donationCards > a:hover { border-color: rgba(229,200,117,.7) !important; }
#donationCards .break-all { word-break: break-word; overflow-wrap: anywhere; }

/* ═══════════════════════════ DARK MODE ═══════════════════════════ */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ebe6d8; --ivory: #0d1117; --paper: #10151d; --muted: #aab1bf; --line: rgba(212,175,55,.2); --brass: #d4af37;
}
html[data-theme="dark"] body {
  background-image: radial-gradient(900px 500px at 85% -5%, rgba(212,175,55,.07), transparent 60%), radial-gradient(800px 500px at -10% 105%, rgba(255,119,34,.05), transparent 60%) !important;
}
html[data-theme="dark"] header.sticky { background: rgba(13,17,23,.92) !important; box-shadow: 0 6px 26px rgba(0,0,0,.5) !important; }
html[data-theme="dark"] header.sticky a[href="#heroSection"]>div div:nth-child(2) { color: #f4ecd4 !important; }
html[data-theme="dark"] header.sticky a[href="#donationHubSection"].tap-target { background: linear-gradient(135deg,#c9a24b,#f0d37a) !important; border-color: #e3bf5c !important; color: #17110a !important; }
html[data-theme="dark"] header.sticky #mobileNavMenu { background: #121821 !important; }
html[data-theme="dark"] header.sticky nav a:hover, html[data-theme="dark"] header.sticky #mobileNavMenu .mobile-nav-link:hover { color: #f1d98b !important; }

html[data-theme="dark"] .bg-white, html[data-theme="dark"] .bg-ivory, html[data-theme="dark"] .bg-ivory\/95 { background-color: #131923 !important; }
html[data-theme="dark"] #aboutSection, html[data-theme="dark"] #contactSection, html[data-theme="dark"] #heroOverlayBlock { background: #0f141c !important; }
html[data-theme="dark"] #constructionSection, html[data-theme="dark"] #aartiSection { background-color: #0b0f15 !important; }
html[data-theme="dark"] #constructionSection .bg-white, html[data-theme="dark"] #aartiSection .bg-white,
html[data-theme="dark"] #contactSection .bg-white, html[data-theme="dark"] #contactSection .bg-ivory,
html[data-theme="dark"] #aartiSection .bg-ivory {
  background: #171e2a !important; border: 1px solid rgba(212,175,55,.22) !important; box-shadow: 0 14px 34px rgba(0,0,0,.45) !important;
}
html[data-theme="dark"] article.gold-border:hover { box-shadow: 0 20px 44px rgba(0,0,0,.6) !important; border-color: rgba(212,175,55,.55) !important; }
html[data-theme="dark"] .gold-border { border-color: rgba(212,175,55,.3); }
html[data-theme="dark"] .bg-gray-100 { background-color: #1b2230 !important; }

html[data-theme="dark"] .text-charcoal, html[data-theme="dark"] h1, html[data-theme="dark"] section h2 { color: #f3ecd6 !important; }
html[data-theme="dark"] #donationHubSection h2, html[data-theme="dark"] #donationHubSection h3 { color: #fff !important; }
html[data-theme="dark"] .text-gray-600, html[data-theme="dark"] .text-gray-700, html[data-theme="dark"] .text-gray-500 { color: var(--muted) !important; }
html[data-theme="dark"] .text-kesariya-dark { color: #ffa466 !important; }
html[data-theme="dark"] .bg-kesariya-light { background-color: rgba(255,119,34,.14) !important; }
html[data-theme="dark"] .bg-kesariya-light.text-kesariya-dark, html[data-theme="dark"] span.uppercase { color: #ffb27a !important; }
html[data-theme="dark"] .stage-filter-btn.bg-white { color: #e9e3d2 !important; background-color: #151b26 !important; border-color: rgba(212,175,55,.3) !important; }
html[data-theme="dark"] .stage-filter-btn.bg-white:hover { background-color: rgba(255,119,34,.16) !important; }
html[data-theme="dark"] [class*="from-amber-50"] { background-image: linear-gradient(135deg,#1a2130,#141a25) !important; }
html[data-theme="dark"] #contactSection a[href^="tel:"] { color: #ffb27a; }
html[data-theme="dark"] .border-swarna\/20, html[data-theme="dark"] .border-swarna\/30 { border-color: rgba(212,175,55,.2) !important; }
html[data-theme="dark"] ::selection { background: rgba(212,175,55,.35); color: #fff; }
html[data-theme="dark"] img { color-scheme: normal; }

/* Smooth switch (only colour properties, and not for visitors who prefer less motion) */
@media (prefers-reduced-motion: no-preference) {
  body, header.sticky, section, .bg-white, .bg-ivory, article { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
