/* ============================================================================
   Community — approachable. Soft blue, warm white, rounded everything.
   ----------------------------------------------------------------------------
   The reference is a village hall noticeboard: the week's timetable is the most
   important thing on the page, so it is a plain ruled list near the top rather
   than something to scroll for. Rounded corners and a generous line height do
   the rest of the work — this template is sold to ministries whose visitors are
   often nervous about walking in, and it should not look institutional.

   Palette matches the `community` row in `ministry_templates`. The two darker
   values below are NOT in that row on purpose: #617D98 is the design's fill
   colour and measures 3.87:1 on the pale blue, so anything small enough to read
   uses a darkened version. Same trap styles.css documents for the brand gold.
   ========================================================================== */

.demo-body--community {
  --wash: #eef4f8;
  --paper: #fdfbf7;
  --blue: #617d98;        /* fills and rules only — too light for small text */
  --blue-deep: #445c73;   /* 6.26:1 on the wash, 6.72:1 on the paper */
  --slate: #2e3a45;
  --ink: #1f272e;
  --ink-mute: #4c5a66;    /* 6.39:1 / 6.86:1 */
  --line: rgba(31, 39, 46, 0.12);

  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

.c-shell {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

h1, h2, h3 {
  font-family: "Lora", "Iowan Old Style", Georgia, "Songti SC", serif;
  font-weight: 600;
  line-height: 1.22;
}

.c-tag {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--wash);
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--track-label, 0.04em);
}
.c-tag--light { background: rgba(255, 255, 255, 0.16); color: #dce8f1; }

.c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--blue-deep);
  border-radius: 999px;
  background: var(--blue-deep);
  color: #fbfdff;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.c-button:hover { background: #37495c; border-color: #37495c; transform: translateY(-1px); }
.c-button--sm { min-height: 42px; padding: 0.45rem 1.15rem; font-size: 0.86rem; }
.c-button--quiet { background: transparent; color: var(--blue-deep); }
.c-button--quiet:hover { background: var(--wash); border-color: var(--blue-deep); color: var(--blue-deep); }
.c-button--light { background: #fff; border-color: #fff; color: var(--slate); }
.c-button--light:hover { background: #eef4f8; border-color: #eef4f8; color: var(--slate); }

.c-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.c-link--light { color: #dce8f1; }

/* ── Header ──────────────────────────────────────────────────────────────── */

.c-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253, 251, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.c-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.c-brand { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; text-decoration: none; color: inherit; }
.c-brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--wash);
  color: var(--blue-deep);
}
.c-brand__mark svg { width: 22px; height: 22px; }
.c-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.c-brand__text strong { font-family: "Lora", Georgia, serif; font-size: 1.16rem; font-weight: 600; }
.c-brand__text em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--track-label, 0.1em);
  text-transform: uppercase;
  color: var(--ink-mute);
}
.c-nav { display: flex; gap: 0.4rem; margin-inline-start: auto; }
.c-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-mute);
  text-decoration: none;
}
.c-nav a:hover { background: var(--wash); color: var(--blue-deep); }

@media (max-width: 900px) {
  /* Not display:none. The navigation is the only way between this
     demonstration's four pages, and a phone is where most people will look at
     it — hiding it here left them with a home page and no way out of it. It
     wraps under the wordmark instead. */
  .c-header__inner { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .c-brand { flex: 1 0 100%; }
  .c-nav { gap: 0.9rem; font-size: 0.84rem; flex-wrap: wrap; }
  .c-header__inner { justify-content: space-between; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.c-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem); background: linear-gradient(var(--wash), var(--paper)); }
.c-hero__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
}
@media (max-width: 900px) { .c-hero__inner { grid-template-columns: 1fr; } }
.c-hero__title { font-size: clamp(2rem, 5vw, 3.15rem); margin-bottom: 1.1rem; }
.c-hero__lede { color: var(--ink-mute); font-size: 1.05rem; max-width: 34rem; }
.c-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }

.c-hero__art { margin: 0; position: relative; }
.c-hero__art svg { width: 100%; height: auto; border-radius: 20px; }
.c-hero__note {
  position: absolute;
  inset-block-end: 1rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(253, 251, 247, 0.9);
  color: var(--blue-deep);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--track-label, 0.08em);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.c-section { padding-block: clamp(3rem, 7vw, 5rem); }
.c-section--tint { background: var(--wash); }

.c-head { max-width: 40rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.c-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.c-head__lede { margin-top: 0.85rem; color: var(--ink-mute); }

/* ── The week ────────────────────────────────────────────────────────────── */

.c-week { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.c-week__row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) 9rem 9rem;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem clamp(1rem, 2.5vw, 1.6rem);
}
.c-week__row + .c-week__row { border-top: 1px solid var(--line); }
.c-week__row:nth-child(odd) { background: rgba(238, 244, 248, 0.5); }
.c-week__day { font-weight: 700; color: var(--blue-deep); }
.c-week__what { font-family: "Lora", Georgia, serif; font-size: 1.1rem; }
.c-week__time, .c-week__where { font-size: 0.92rem; color: var(--ink-mute); }

@media (max-width: 780px) {
  .c-week__row { grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; }
  .c-week__what { grid-column: 1 / -1; order: -1; }
}

/* ── Programme cards ─────────────────────────────────────────────────────── */

.c-cards {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.c-card {
  padding: 1.5rem;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.c-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--wash);
  color: var(--blue-deep);
}
.c-card__icon svg { width: 22px; height: 22px; }
.c-card h3 { font-size: 1.16rem; margin-bottom: 0.4rem; }
.c-card p { color: var(--ink-mute); font-size: 0.95rem; }

/* ── Help out ────────────────────────────────────────────────────────────── */

.c-split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 900px) { .c-split { grid-template-columns: 1fr; } }
.c-split__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.c-split__text { color: var(--ink-mute); margin-bottom: 1.6rem; }

.c-help { display: grid; gap: 0.75rem; }
.c-help li {
  padding: 1.15rem 1.35rem;
  border-radius: 16px;
  background: var(--wash);
}
.c-help h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.c-help p { color: var(--ink-mute); font-size: 0.93rem; }

/* ── Giving ──────────────────────────────────────────────────────────────── */

.c-give { padding-block: clamp(3rem, 6.5vw, 4.5rem); background: var(--slate); color: #eaf1f6; }
.c-give__inner {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 820px) { .c-give__inner { grid-template-columns: 1fr; } }
.c-give h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.9rem; color: #fbfdff; }
.c-give p { color: #c3d0da; max-width: 38rem; }
.c-give__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.85rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.c-footer { padding-block: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line); }
.c-footer__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  font-size: 0.94rem;
  color: var(--ink-mute);
}
.c-footer__name { font-family: "Lora", Georgia, serif; font-size: 1.14rem; color: var(--ink); margin-bottom: 0.4rem; }
.c-footer h3 {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--track-label, 0.14em);
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 0.5rem;
}

/* The hero photograph keeps the rounded, soft corner this template uses
   everywhere else — 20px, matching the cards. */
.c-hero__art { border-radius: 20px; }

/* The text column of the hero, beside the photograph. With no rule it did not
   constrain its own measure, so the lede ran the full width of the grid cell. */
.c-hero__copy { min-width: 0; max-width: 34rem; }

/* A readable text column for the inner pages. One measure, set once, so the
   about page and the giving page do not each invent their own. */
.c-prose { max-width: 40rem; }
.c-prose p + p { margin-top: 1.05rem; }
/* The inner pages set heading-and-paragraph pairs one after another. Without
   this they run together into one block of text with bold lines in it. */
.c-prose p + h2 { margin-top: 2.2rem; }
.c-prose h2 { margin-bottom: 0.5rem; }

/* ============================================================================
   Community — the blocks a neighbourhood trust's site needs.
   Everything here is rounded and soft-shadowed, because that is this
   template's argument. Grace's equivalents are ruled and Light's are bare.
   ========================================================================== */

.c-notice {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 22px 46px -30px rgba(31, 39, 46, 0.45);
}
@media (max-width: 800px) { .c-notice { grid-template-columns: 1fr; } }
.c-notice__art { position: relative; margin: 0; border-radius: 16px; overflow: hidden; }
.c-notice__art img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.c-notice__pill {
  position: absolute;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--track-label, 0.08em);
  color: var(--blue-deep);
}
.c-notice__body h3 { font-size: clamp(1.35rem, 2.8vw, 1.9rem); margin-bottom: 0.5rem; }
.c-notice__body p { color: var(--ink-mute); margin-bottom: 1.1rem; }
.c-notice__links { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.c-upcoming {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
.c-up {
  padding: 1.4rem 1.3rem;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 14px 30px -24px rgba(31, 39, 46, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.c-up:hover { transform: translateY(-3px); box-shadow: 0 20px 38px -24px rgba(31, 39, 46, 0.5); }
.c-up__chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.9rem;
  border-radius: 14px;
  background: var(--wash);
  line-height: 1.1;
}
.c-up__day { font-size: 1.35rem; font-weight: 700; color: var(--slate); }
.c-up__mon { font-size: 0.62rem; font-weight: 700; letter-spacing: var(--track-label, 0.12em); color: var(--blue-deep); }
.c-up h3 { font-size: 1.08rem; margin-bottom: 0.25rem; }
.c-up p { font-size: 0.88rem; color: var(--ink-mute); }

.c-faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.c-face { text-align: center; }
.c-face__disc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: var(--wash);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-deep);
}
.c-face h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.c-face__role { font-size: 0.72rem; font-weight: 700; letter-spacing: var(--track-label, 0.1em); color: var(--blue-deep); margin-bottom: 0.4rem; }
.c-face p { font-size: 0.88rem; color: var(--ink-mute); }

.c-find { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 860px) { .c-find { grid-template-columns: 1fr; } }
.c-map { border-radius: 22px; overflow: hidden; background: var(--wash); }
.c-map svg { display: block; width: 100%; height: auto; }
.c-find dl { display: grid; gap: 1.1rem; margin: 0; }
.c-find dt { font-size: 0.72rem; font-weight: 700; letter-spacing: var(--track-label, 0.1em); color: var(--blue-deep); margin-bottom: 0.2rem; }
.c-find dd { margin: 0; color: var(--ink-mute); }

.c-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.c-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 4.6rem;
  padding: 0.4rem 1.1rem;
  border: 1px solid rgba(253, 251, 247, 0.45);
  border-radius: 999px;
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.c-pill:hover, .c-pill.is-on { background: var(--paper); color: var(--slate); }

.c-signup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 820px) { .c-signup { grid-template-columns: 1fr; } }
.c-signup h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-bottom: 0.4rem; }
.c-signup p { color: var(--ink-mute); font-size: 0.92rem; }
.c-form { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.c-form input {
  flex: 1 1 13rem;
  min-height: 48px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
}
.c-form input:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 1px; }
.c-form__note { flex: 1 0 100%; font-size: 0.75rem; color: var(--ink-mute); }
.c-footer__inner { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 900px) { .c-footer__inner { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); } }
.c-footer__brand { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.8rem; }
.c-footer__brand svg { width: 34px; height: 34px; color: var(--blue-deep); flex: none; }
.c-footer ul { display: grid; gap: 0.4rem; }
.c-footer li a { color: var(--ink-mute); text-decoration: none; }
.c-footer li a:hover { color: var(--blue-deep); }
.c-social { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.c-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--wash); color: var(--blue-deep);
  transition: background 0.2s ease;
}
.c-social a:hover { background: #dde8f0; }
.c-social svg { width: 17px; height: 17px; }
.c-footer__base {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--ink-mute);
}
.c-footer__base a { color: inherit; }

/* ── Sermons ──────────────────────────────────────────────────────────────
   Community rounds everything, so the sermon list is soft cards on a tinted
   field rather than rules. Approachable is this template's whole argument. */
.c-sermons { display: grid; gap: 0.9rem; }
.c-sermon {
  background: #fff;
  border: 1px solid rgba(30, 58, 76, 0.1);
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
}
.c-sermon__series {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--track-label);
  color: #2f6f8f;
}
.c-sermon__title { margin: 0 0 0.3rem; font-size: 1.2rem; line-height: 1.35; }
.c-sermon__meta { margin: 0; font-size: 0.86rem; opacity: 0.7; }
