/* 508 Ministry Community Page Stylesheet (Cormorant + Figtree, SIL OFL 1.1)
   Brown / parchment site chrome for Community page & cards.
   Blue accent (#1E5BFF / #4C8DFF) scoped STRICTLY to the FaithWorks block (.comm-fw-block) at the top.
   Blue NEVER leaks into the site menu or the rest of the Community page. */
.comm-main {
  --cm-parchment: #faf6ee;
  --cm-parchment-2: #f3ead8;
  --cm-paper: #fffdf8;
  --cm-brown-deep: #2d1f14;
  --cm-brown: #4a3525;
  --cm-umber: #614b38;
  --cm-gold: #b8872b;
  --cm-gold-soft: #e2c57e;
  --cm-border: #e1d4ba;
  --cm-serif: 'Cormorant', Georgia, 'Times New Roman', serif;
  --cm-sans: 'Figtree', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* FaithWorks-only blue tokens (used exclusively inside .comm-fw-block) */
  --fw-blue: #1e5bff;
  --fw-blue-deep: #1442bd;
  --fw-blue-soft: #4c8dff;
  --fw-blue-tint: #eef4ff;
  --fw-blue-border: #bfd4ff;

  font-family: var(--cm-sans);
  color: var(--cm-brown-deep);
  background: var(--cm-parchment);
  line-height: 1.65;
  overflow-x: clip;
}

.comm-main *,
.comm-main *::before,
.comm-main *::after {
  box-sizing: border-box;
}

.comm-wrap {
  width: min(1160px, 100% - 40px);
  margin: 0 auto;
}

/* Warm brown / parchment top header */
.comm-head {
  background: linear-gradient(180deg, #f3ead8 0%, #faf6ee 100%);
  border-bottom: 1px solid var(--cm-border);
  padding: 28px 0 32px;
}

.comm-head-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.comm-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--cm-umber);
}

.comm-crumb a {
  color: var(--cm-brown);
  font-weight: 700;
  text-decoration: none;
}

.comm-crumb a:hover {
  text-decoration: underline;
  color: var(--cm-brown-deep);
}

.comm-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #c9b48d;
  background: var(--cm-paper);
  color: var(--cm-brown-deep);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.comm-lang-pill:hover {
  background: #f0e4cc;
  border-color: var(--cm-gold);
}

.comm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a5f17;
  margin: 0 0 8px;
}

.comm-eyebrow::before {
  content: "";
  width: 26px;
  height: 2.5px;
  background: var(--cm-gold);
  display: inline-block;
  border-radius: 2px;
}

.comm-head h1 {
  font-family: var(--cm-serif);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--cm-brown-deep);
  margin: 0 0 10px;
}

.comm-head-sub {
  font-size: clamp(16.5px, 1.55vw, 18.5px);
  color: var(--cm-umber);
  max-width: 64ch;
  margin: 0;
}

/* SECTION 1: TOP BLOCK — FaithWorks (Blue Accent scoped strictly inside .comm-fw-block) */
.comm-top-sec {
  padding: 36px 0 44px;
  background: var(--cm-parchment);
}

.comm-fw-block {
  position: relative;
  border-radius: 22px;
  background: radial-gradient(120% 115% at 92% 0%, #1d499e 0%, #0f254d 52%, #08152c 100%);
  color: #f8fafc;
  border: 1px solid rgba(76, 141, 255, 0.55);
  border-top: 5px solid var(--fw-blue-soft);
  padding: 36px 36px 32px;
  box-shadow: 0 22px 48px rgba(11, 26, 51, 0.18);
}

.comm-fw-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.comm-fw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a8c7ff;
  margin: 0;
}

.comm-fw-eyebrow::before {
  content: "";
  width: 24px;
  height: 2.5px;
  background: var(--fw-blue-soft);
  border-radius: 2px;
  display: inline-block;
}

.comm-fw-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(76, 141, 255, 0.18);
  border: 1px solid rgba(168, 199, 255, 0.42);
  color: #e6efff;
  font-size: 12.5px;
  font-weight: 700;
}

.comm-fw-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fw-blue-soft);
  display: inline-block;
}

.comm-fw-title {
  font-family: var(--cm-serif);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.06;
  color: #ffffff;
  margin: 0 0 12px;
}

.comm-fw-desc {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.52;
  color: #dbe9ff;
  max-width: 64ch;
  margin: 0 0 24px;
}

.comm-fw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.comm-fw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 11px;
  font-family: var(--cm-sans);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.comm-fw-btn:hover {
  transform: translateY(-1px);
}

.comm-fw-btn:focus-visible {
  outline: 3px solid var(--fw-blue-soft);
  outline-offset: 2px;
}

.comm-fw-btn--blue {
  background: var(--fw-blue);
  color: #ffffff;
  border-color: var(--fw-blue);
}

.comm-fw-btn--blue:hover {
  background: var(--fw-blue-deep);
  border-color: var(--fw-blue-deep);
  box-shadow: 0 10px 24px rgba(30, 91, 255, 0.34);
}

.comm-fw-btn--ghost {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(191, 212, 255, 0.55);
}

.comm-fw-btn--ghost:hover {
  background: rgba(76, 141, 255, 0.24);
  border-color: #a8c7ff;
}

/* Compact 508 Ministry Sponsored Openings inside the FaithWorks top block */
.comm-fw-openings-wrap {
  border-top: 1px solid rgba(168, 199, 255, 0.22);
  padding-top: 22px;
}

.comm-fw-openings-h {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #a8c7ff;
  margin: 0 0 14px;
}

.comm-fw-openings {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 1080px) {
  .comm-fw-openings {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

.comm-fw-opening-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  padding: 14px 15px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(168, 199, 255, 0.28);
  text-decoration: none;
  color: #ffffff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.comm-fw-opening-link:hover {
  background: rgba(76, 141, 255, 0.2);
  border-color: #8cb7ff;
  transform: translateY(-1px);
}

.comm-fw-spon-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ec0ff;
}

.comm-fw-opening-link strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
}

.comm-fw-opening-link span.comm-fw-go {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #bcd6ff;
}

/* SECTION 2: Rest of Community Items (Warm Brown / Parchment Cards — ZERO BLUE) */
.comm-grid-sec {
  padding: 20px 0 72px;
  background: var(--cm-parchment);
}

.comm-sec-head {
  margin-bottom: 28px;
}

.comm-sec-head h2 {
  font-family: var(--cm-serif);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.12;
  color: var(--cm-brown-deep);
  margin: 0 0 8px;
}

.comm-sec-head p {
  font-size: 16.5px;
  color: var(--cm-umber);
  max-width: 64ch;
  margin: 0;
}

.comm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 22px;
}

.comm-card {
  display: flex;
  flex-direction: column;
  background: var(--cm-paper);
  border: 1px solid var(--cm-border);
  border-top: 4px solid var(--cm-brown);
  border-radius: 16px;
  padding: 26px 24px 24px;
  box-shadow: 0 10px 26px rgba(45, 31, 20, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.comm-card:hover {
  transform: translateY(-2px);
  border-color: #cbb68f;
  box-shadow: 0 16px 34px rgba(45, 31, 20, 0.1);
}

.comm-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.comm-card-ic {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--cm-border);
  background: var(--cm-parchment-2);
}

.comm-card-ic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comm-card-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a5f17;
  margin-bottom: 2px;
}

.comm-card h3 {
  font-family: var(--cm-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--cm-brown-deep);
  margin: 0;
}

.comm-card p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--cm-umber);
  margin: 0 0 22px;
  flex: 1;
}

.comm-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  width: 100%;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--cm-brown);
  color: #faf6ee;
  border: 1px solid var(--cm-brown);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  transition: background 0.15s ease, transform 0.15s ease;
}

.comm-card-btn:hover {
  background: var(--cm-brown-deep);
  transform: translateY(-1px);
}

.comm-card-btn:focus-visible {
  outline: 3px solid var(--cm-gold);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .comm-fw-block {
    padding: 26px 20px 24px;
    border-radius: 18px;
  }
  .comm-fw-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .comm-fw-btn {
    width: 100%;
  }
  .comm-cards {
    grid-template-columns: 1fr;
  }
}
