/* ============================================================
   Ministry Community Center — shared stylesheet
   Palette: Warm Terracotta (matches Food Pantry deck)
============================================================ */

:root {
  --terracotta: #B85042;
  --terracotta-dk: #8B3A2F;
  --wine: #5C1F18;
  --cream: #F5EFE3;
  --sand: #E7E8D1;
  --sage: #A7BEAE;
  --sage-dk: #6F8B7C;
  --gold: #D9A441;
  --espresso: #2C2620;
  --ink: #1A1411;
  --mute: #6B5E54;
  --white: #FFFFFF;

  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Calibri, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;

  --max-w: 1180px;
  --radius: 6px;
  --shadow-sm: 0 2px 6px rgba(28, 21, 17, 0.08);
  --shadow-md: 0 8px 22px rgba(28, 21, 17, 0.12);
}

/* ----- Reset / base ----- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--espresso);
  background: var(--cream);
}
img { max-width: 100%; display: block; }
a { color: var(--terracotta-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--wine); margin: 0 0 0.4em; line-height: 1.2; }
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1em; }

.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--terracotta);
}

/* ----- Layout ----- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 64px 0; }
.section-tight { padding: 40px 0; }

/* ----- Header ----- */
.site-header {
  background: var(--wine);
  color: var(--cream);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px; max-width: var(--max-w); margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--cream); text-decoration: none;
}
.brand-logo {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
}
.brand-logo img, .brand-logo svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.05rem; color: var(--cream); }
.brand-text small { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav > a, .nav .nav-group > .nav-trigger {
  color: var(--cream); padding: 8px 12px; border-radius: 4px;
  font-size: 0.92rem;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav > a:hover, .nav .nav-trigger:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.nav > a.active, .nav .nav-group.active > .nav-trigger { color: var(--gold); }

/* Dropdown groups */
.nav-group { position: relative; }
.nav-trigger {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-size: 0.92rem; font-weight: 400;
  color: var(--cream);
}
.nav-trigger::after {
  content: "▾"; font-size: 0.7rem; opacity: 0.7;
}
.dropdown {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--white); color: var(--ink);
  min-width: 240px; padding: 8px; border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.20);
  border-top: 3px solid var(--gold);
  z-index: 60;
}
.nav-group.open > .dropdown { display: block; }
.dropdown a {
  display: block;
  color: var(--ink) !important;
  padding: 10px 12px; border-radius: 4px;
  font-size: 0.95rem;
  text-decoration: none;
}
.dropdown a:hover { background: var(--cream); color: var(--terracotta-dk) !important; text-decoration: none; }
.dropdown a.active { color: var(--terracotta-dk) !important; font-weight: 700; }
.dropdown a small {
  display: block; color: var(--mute); font-size: 0.78rem; font-weight: 400; margin-top: 2px;
}

.lang-toggle {
  margin-left: 6px;
  display: inline-flex; border: 1px solid var(--gold); border-radius: 999px; overflow: hidden;
  background: transparent;
}
.lang-toggle button {
  appearance: none; border: 0; background: transparent;
  color: var(--cream); padding: 6px 14px; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
}
.lang-toggle button.active { background: var(--gold); color: var(--wine); }

.nav-toggle { display: none; }

/* ----- Hero ----- */
.hero {
  background: linear-gradient(180deg, var(--wine) 0%, var(--terracotta-dk) 100%);
  color: var(--cream);
  padding: 88px 0 96px;
  position: relative; overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  color: var(--cream);
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 0.3em;
}
.hero .lead {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--sand); max-width: 760px;
}
.hero .dots {
  position: absolute; top: 28px; left: 28px; display: flex; gap: 10px;
}
.hero .dots span {
  width: 14px; height: 14px; border-radius: 50%;
}
.hero .dots span:nth-child(1) { background: var(--gold); }
.hero .dots span:nth-child(2) { background: var(--terracotta); }
.hero .dots span:nth-child(3) { background: var(--sage); }
.hero-cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
  border: 0; cursor: pointer; font-family: var(--font-sans); font-size: 0.95rem;
}
.btn-primary { background: var(--gold); color: var(--wine); }
.btn-primary:hover { background: #c89538; text-decoration: none; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--cream); border: 2px solid var(--cream); padding: 10px 20px; }
.btn-secondary:hover { background: var(--cream); color: var(--wine); text-decoration: none; }
.btn-on-light { background: var(--terracotta); color: var(--cream); }
.btn-on-light:hover { background: var(--terracotta-dk); text-decoration: none; }

/* ----- Page banner (smaller hero for inner pages) ----- */
.banner {
  background: var(--wine); color: var(--cream);
  padding: 56px 0 48px;
}
.banner h1 { color: var(--cream); margin-bottom: 0.2em; }
.banner p { color: var(--sand); font-family: var(--font-serif); font-style: italic; max-width: 720px; }

/* ----- Cards / Service grid ----- */
.section-title { text-align: left; margin-bottom: 32px; }
.section-title h2 { margin-bottom: 4px; }
.section-title .es { color: var(--terracotta); font-style: italic; font-family: var(--font-serif); font-size: 1.05rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border-left: 4px solid var(--terracotta);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { color: var(--ink); }
.card p { color: var(--espresso); }
.card .icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sand); display: grid; place-items: center;
  color: var(--terracotta);
  margin-bottom: 16px;
  font-size: 1.6rem;
}
.card a.more {
  display: inline-block; margin-top: 12px;
  font-weight: 700; color: var(--terracotta-dk);
  letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.78rem;
}

/* ----- Mission / Verse block ----- */
.verse {
  background: var(--wine); color: var(--cream);
  padding: 56px 48px; border-radius: var(--radius);
  position: relative;
}
.verse::before {
  content: "✝"; color: var(--gold);
  font-size: 2rem; display: block; margin-bottom: 14px;
}
.verse blockquote {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.6rem; line-height: 1.4; margin: 0 0 14px;
}
.verse cite {
  display: block; color: var(--gold); font-style: normal; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em;
}

/* ----- Stats / promise row ----- */
.promise {
  display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr);
}
.promise .item {
  background: var(--white); padding: 20px; border-radius: var(--radius);
  text-align: center; border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.promise .item strong {
  font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink);
  display: block; margin-bottom: 4px;
}
.promise .item span { color: var(--terracotta); font-size: 0.9rem; font-style: italic; font-family: var(--font-serif); }

/* ----- Steps (numbered) ----- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.step {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; border-top: 4px solid var(--terracotta);
  box-shadow: var(--shadow-sm);
}
.step .num {
  font-family: var(--font-serif); font-size: 3.6rem; line-height: 1; font-weight: 700;
  color: var(--terracotta); margin-bottom: 8px;
}
.step h4 { font-size: 1.1rem; color: var(--ink); margin-bottom: 6px; }
.step p { color: var(--mute); margin: 0; font-size: 0.95rem; }

/* ----- Two-column content ----- */
.two-col {
  display: grid; gap: 36px; grid-template-columns: 1.1fr 0.9fr; align-items: start;
}

/* ----- Forms ----- */
.form-card {
  background: var(--white); padding: 32px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid #d6cab8; border-radius: 4px;
  font-family: inherit; font-size: 1rem; color: var(--espresso);
  background: var(--cream);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--terracotta);
}

.checkbox-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checkbox-row label {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cream); padding: 6px 12px; border-radius: 999px;
  font-size: 0.9rem; color: var(--espresso); cursor: pointer; text-transform: none; letter-spacing: 0;
}
.checkbox-row input { width: auto; }

/* ----- Highlight box ----- */
.highlight {
  background: var(--terracotta); color: var(--cream);
  padding: 36px 32px; border-radius: var(--radius);
}
.highlight h3 { color: var(--cream); }
.highlight a.btn { background: var(--cream); color: var(--wine); }

/* ----- Info row (icon + text) ----- */
.info-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.info-row .ico {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--terracotta); color: var(--cream);
  display: grid; place-items: center; font-size: 1.05rem;
}
.info-row strong { display: block; color: var(--ink); }
.info-row .sub { color: var(--mute); font-size: 0.9rem; }

/* ----- Donate amount picker ----- */
.amounts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 8px;
}
.amounts label {
  background: var(--cream); padding: 14px 6px; border-radius: 4px;
  text-align: center; cursor: pointer; font-weight: 700;
  border: 2px solid transparent; color: var(--ink);
  text-transform: none; letter-spacing: 0;
}
.amounts input { display: none; }
.amounts input:checked + span { color: var(--cream); }
.amounts label:has(input:checked) { background: var(--terracotta); border-color: var(--terracotta-dk); color: var(--cream); }

/* ----- Footer ----- */
.site-footer {
  background: var(--wine); color: var(--sand);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
.footer-grid h4 { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--font-sans); }
.footer-grid a { color: var(--sand); display: block; padding: 4px 0; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--cream); }
/* Inline links inside paragraph (e.g., Visit/Contact card) — keep them on the same line */
.footer-grid p a { display: inline; padding: 0; }
.footer-bottom {
  margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(245,239,227,0.15);
  font-size: 0.82rem; color: var(--sand); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ----- Utilities ----- */
.text-center { text-align: center; }
.bg-cream { background: var(--cream); }
.bg-sand { background: var(--sand); }
.bg-white { background: var(--white); }
.muted { color: var(--mute); }
.spacer-sm { height: 12px; }
.spacer-md { height: 24px; }

/* ----- Bilingual swap ----- */
[data-es] { display: none; }
body.es [data-en] { display: none; }
body.es [data-es] { display: initial; }
/* For block-level elements with both translations */
body.es [data-es-block] { display: block; }
body:not(.es) [data-en-block] { display: block; }

/* ----- Responsive ----- */
@media (max-width: 920px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .promise { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  section { padding: 48px 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto;
    appearance: none; border: 1px solid var(--gold); background: transparent;
    color: var(--cream); width: 38px; height: 38px; border-radius: 6px; cursor: pointer;
    font-size: 1.1rem;
  }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--wine); padding: 12px 16px; flex-direction: column;
    align-items: stretch; gap: 4px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }
  .nav.open { display: flex; }
  .nav > a { padding: 10px 12px; }
  .lang-toggle { margin: 8px 0 0; align-self: flex-start; }
  /* Mobile: dropdowns become inline expanded sections */
  .nav-group { width: 100%; }
  .nav-trigger { width: 100%; justify-content: space-between; padding: 10px 12px; }
  .dropdown {
    display: none;
    position: static; box-shadow: none; border-top: 0;
    background: rgba(0,0,0,0.18); margin: 4px 0 8px;
    padding: 4px;
  }
  .dropdown a { color: var(--cream) !important; }
  .dropdown a:hover { background: rgba(255,255,255,0.08); color: var(--gold) !important; }
  .nav-group.open > .dropdown { display: block; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .promise, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .verse { padding: 36px 24px; }
  .verse blockquote { font-size: 1.3rem; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
}
