/* Justice and Care Welfare Organization — justiceandcarewelfare.org
   Palette: deep navy dominant, warm off-white ground, gold hairline accents,
   red reserved for donation actions only. Solid colors throughout. */

:root {
  --navy: #1a2f5a;
  --navy-deep: #12213f;
  --ink: #201f1d;
  --paper: #faf7f2;
  --paper-warm: #f3eee5;
  --gold: #b8912e;
  --red: #b3282d;
  --red-dark: #931f24;
  --line: #d9d2c4;
  --white: #ffffff;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Tahoma, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--navy); }

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }

p + p { margin-top: 1em; }

a { color: var(--navy); }
a:hover { color: var(--gold); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

/* Gold hairline motif — echoes the seal's circular rule */
.rule {
  width: 72px;
  height: 3px;
  background: var(--gold);
  border: none;
  margin: 1.1rem 0 1.4rem;
}
.rule--center { margin-left: auto; margin-right: auto; }

.kicker {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Header ---------- */

.topbar {
  background: var(--navy-deep);
  color: #e8e4da;
  font-size: 0.9rem;
  padding: 0.4rem 0;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  justify-content: space-between;
}
.topbar a { color: #e8e4da; text-decoration: none; }
.topbar a:hover { color: var(--gold); text-decoration: underline; }

.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 56px; height: 56px; border-radius: 50%; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  line-height: 1.15;
}
.brand-name small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 1.4rem; }
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }

.btn-donate {
  display: inline-block;
  background: var(--red);
  color: var(--white) !important;
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border: none;
  border-bottom: none !important;
}
.btn-donate:hover { background: var(--red-dark); color: var(--white); }

.btn-wa {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #1da851;
  color: var(--white) !important;
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-bottom: none !important;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-wa svg {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  transition: transform 0.25s ease;
}
.btn-wa:hover {
  background: #178a42;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 168, 81, 0.35);
}
.btn-wa:hover svg { transform: rotate(-8deg) scale(1.12); }
.btn-wa:active { transform: translateY(0) scale(0.96); }
.btn-wa::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(29, 168, 81, 0.65);
  opacity: 0;
  pointer-events: none;
}
.btn-wa:active::after { animation: wa-ring 0.5s ease-out; }

@keyframes wa-ring {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18, 1.45); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-wa, .btn-wa svg { transition: none; }
  .btn-wa:active::after { animation: none; }
}

/* Floating WhatsApp bubble — fixed bottom-right on every page */
.wa-float {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #1da851;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(18, 33, 63, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.wa-float svg {
  width: 32px;
  height: 32px;
  fill: var(--white);
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(29, 168, 81, 0.55);
  animation: wa-float-pulse 2.8s ease-out infinite;
  pointer-events: none;
}
.wa-float:hover {
  background: #178a42;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 22px rgba(18, 33, 63, 0.35);
}
.wa-float:active { transform: scale(0.93); }

@keyframes wa-float-pulse {
  0% { transform: scale(1); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float { transition: none; }
  .wa-float::before { animation: none; opacity: 0; }
}

@media (max-width: 480px) {
  .wa-float { width: 52px; height: 52px; right: 1rem; bottom: 1rem; }
  .wa-float svg { width: 28px; height: 28px; }
}

.hero-actions .btn-wa { padding: 0.75rem 1.6rem; font-size: 1.05rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
  font-size: 1.2rem;
  color: var(--navy);
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--navy);
  color: #edeae2;
}
.hero .container {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 2.5rem;
  align-items: center;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.hero h1 { color: var(--white); }
.hero .rule { margin: 1.3rem 0; }
.hero p.lead { font-size: 1.15rem; max-width: 34em; }
.hero-phones { margin-top: 1.4rem; font-size: 1.05rem; }
.hero-phones a { color: var(--white); text-decoration: none; font-weight: 700; }
.hero-phones a:hover { color: var(--gold); }
.hero-actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-actions .btn-donate { padding: 0.75rem 1.8rem; font-size: 1.05rem; }
.hero-actions .link-quiet { color: #cfc8b8; font-weight: 600; }
.hero-figure { margin: 0; }
.hero-figure img { border: 4px solid var(--white); }
.hero-figure figcaption { font-size: 0.85rem; color: #b9b2a2; margin-top: 0.5rem; }

/* ---------- Sections ---------- */

.section { padding: 3.5rem 0; }
.section--warm { background: var(--paper-warm); }
.section--navy { background: var(--navy); color: #edeae2; }
.section--navy h2, .section--navy h3 { color: var(--white); }

.section-head { max-width: 46em; margin-bottom: 2.2rem; }

/* Pillars — bordered panels, square corners, no shadows */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.pillar {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.6rem 1.4rem;
  background: var(--white);
}
.pillar h3 { margin-bottom: 0.5rem; }
.pillar h3 a { text-decoration: none; }
.pillar p { font-size: 0.96rem; }
.pillar .pillar-mark {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.6rem;
}

/* Alternating media sections */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
}
.media-row:last-child { border-bottom: none; }
.media-row--flip .media-row-img { order: 2; }
.media-row-img img { border: 1px solid var(--line); }
.media-row h3 { font-size: 1.55rem; margin-bottom: 0.3rem; }

.checklist { list-style: none; margin: 1rem 0 0; }
.checklist li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.45rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.65em;
  height: 0.32em;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

/* Campaign gallery */
.campaigns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.campaign { border: 1px solid var(--line); background: var(--white); }
.campaign img { width: 100%; }
.campaign figcaption { padding: 0.9rem 1.1rem; font-size: 0.95rem; }
.campaign figcaption strong { font-family: var(--serif); color: var(--navy); font-size: 1.05rem; }

/* Quotes — plain editorial style, no star cards */
.quote {
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 1.6rem 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--navy);
}
.quote footer {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink);
  margin-top: 0.5rem;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.member { border: 1px solid var(--line); background: var(--white); text-align: center; }
.member img { width: 100%; }
.member figcaption { padding: 1rem; }
.member figcaption strong { font-family: var(--serif); font-size: 1.1rem; color: var(--navy); display: block; }
.member figcaption span { font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* Leadership strip on home */
.leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  background: var(--white);
  margin-bottom: 0.7rem;
}
.faq summary {
  cursor: pointer;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.05rem;
}
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding: 0.9rem 1.2rem; }

/* Donate page */
.donate-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 2.5rem; align-items: start; }
.donate-panel {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}
.donate-panel h3 { margin-bottom: 0.7rem; }
.donate-number {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--navy);
  font-weight: 700;
}
.note { font-size: 0.92rem; color: #5a564e; }

.contact-list { list-style: none; }
.contact-list li { margin-bottom: 0.9rem; padding-left: 1.4rem; position: relative; }
.contact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5em;
  height: 0.5em;
  background: var(--gold);
}
.contact-list a { font-weight: 600; }

/* CTA band */
.cta-band { background: var(--navy); color: #edeae2; text-align: left; }
.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2.6rem;
  padding-bottom: 2.6rem;
}
.cta-band h2 { color: var(--white); margin-bottom: 0.3rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: #cfc8b8;
  font-size: 0.95rem;
  padding: 3rem 0 1.5rem;
}
.site-footer a { color: #e8e4da; }
.site-footer a:hover { color: var(--gold); }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #2b3f68;
}
.footer-cols h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 0.8rem; }
.footer-cols ul { list-style: none; }
.footer-cols li { margin-bottom: 0.45rem; }
.footer-brand { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.9rem; }
.footer-brand img { width: 52px; height: 52px; border-radius: 50%; }
.footer-brand strong { font-family: var(--serif); color: var(--white); font-size: 1.05rem; }
.footer-bottom { padding-top: 1.3rem; font-size: 0.85rem; color: #9a937f; }

/* ---------- Page banner (inner pages) ---------- */

.page-banner { background: var(--navy); color: #edeae2; padding: 2.6rem 0; }
.page-banner h1 { color: var(--white); }
.page-banner p { max-width: 40em; margin-top: 0.6rem; font-size: 1.1rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .container, .media-row, .donate-grid { grid-template-columns: 1fr; }
  .media-row--flip .media-row-img { order: 0; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .campaigns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--navy);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.25rem 1rem; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: none; padding-top: 0.8rem; }
  .site-nav a { display: block; padding: 0.7rem 0; }
  .topbar { display: none; }
}

@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  body { font-size: 1rem; }
}
