/* CLC ministry finder (ministries.html) */

/* ---- top: title, search, quick picks ---- */
.mf-top { position: relative; background: #000; color: #fff; padding: calc(var(--hdr) + clamp(36px, 7vh, 80px)) 0 clamp(36px, 6vh, 64px); overflow: hidden; }
.mf-title { margin: 6px 0 clamp(22px, 3.4vw, 40px); font-size: clamp(48px, 9.4vw, 150px); font-weight: 700; line-height: .86; letter-spacing: -.025em; text-transform: uppercase; }
.mf-title .red { color: var(--red); }
.mf-search { max-width: 860px; }
.mf-search input { height: 64px; font-size: 18px; background: #fff; color: #000; border-color: transparent; }
.mf-search input::placeholder { color: #666; }
.mf-search svg { color: #000; }
.mf-search .search-x { color: #000; top: 12px; }
.mf-search .search-x:hover { background: #eee; }
.mf-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.mf-quick span { margin-right: 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.mf-quick button { height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.28); color: #fff; font: 600 14px/1 var(--font); transition: background-color .2s, border-color .2s, color .2s, transform .16s; }
.mf-quick button:hover { border-color: #fff; }
.mf-quick button[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.mf-quick button:active { transform: scale(.96); }

/* ---- body: filters | results ---- */
.mf { background: var(--paper); padding: clamp(28px, 4vw, 56px) 0 clamp(64px, 9vw, 120px); }
.mf-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(24px, 3.4vw, 56px); align-items: start; }
.mf-side { position: sticky; top: calc(var(--hdr) + 20px); }
.mf-toggle { display: none; }
.mf-g { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.mf-g legend { padding: 0; margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.mf-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mf-chip { height: 36px; padding: 0 14px; font-size: 11.5px; }
.mf-chips-col { flex-direction: column; align-items: stretch; }
.mf-chips-col .mf-chip { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 42px; text-align: left; }
.mf-chip small { font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: none; opacity: .62; }
.mf-age { display: grid; grid-template-columns: 42px 76px 42px; gap: 6px; align-items: center; }
.mf-age button { height: 42px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 20px; line-height: 1; transition: border-color .2s, background-color .2s; }
.mf-age button:hover { border-color: var(--ink); }
.mf-age input { height: 42px; width: 100%; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); text-align: center; font: 700 17px/1 var(--font); -moz-appearance: textfield; }
.mf-age input::-webkit-outer-spin-button, .mf-age input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mf-age input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(62,168,242,.35); }
.mf-age-hint { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.mf-switch { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; cursor: pointer; font-size: 14.5px; font-weight: 600; }
.mf-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mf-switch i { position: relative; flex: none; width: 44px; height: 26px; border-radius: 99px; background: var(--grey); transition: background-color .2s; }
.mf-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .24s var(--ease); }
.mf-switch input:checked + i { background: var(--red); }
.mf-switch input:checked + i::after { transform: translateX(18px); }
.mf-switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.mf-reset { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; opacity: .35; pointer-events: none; transition: opacity .2s; }
.is-filtered .mf-reset { opacity: 1; pointer-events: auto; }

/* results bar */
.mf-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1.5px solid var(--ink); }
.mf-count { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.mf-count b { color: var(--ink); }
.mf-sort { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mf-sort select { height: 36px; padding: 0 30px 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center / 10px; color: var(--ink); font: 600 13px/1 var(--font); appearance: none; cursor: pointer; }

/* coming up rail */
.mf-up { margin: 0 0 30px; }
.mf-up[hidden] { display: none; }
.mf-up-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.mf-up-h h2 { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; }
.mf-up-h a { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mf-up-h a:hover { color: var(--red); }
.mf-up-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 248px); gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.mf-up-rail:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 12px; }
.mf-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 16px 16px 14px; border-radius: 18px; background: var(--paper-2); color: var(--ink); text-align: left; text-decoration: none; scroll-snap-align: start; border-top: 0; box-shadow: inset 0 0 0 1.5px transparent; transition: transform .24s var(--ease), box-shadow .24s; }
.mf-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px var(--ac); }
.mf-card-m { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.mf-card-m::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ac); }
.mf-card b { font-size: 16.5px; line-height: 1.2; font-weight: 700; }
.mf-card i { font-style: normal; font-size: 13px; color: var(--ink-3); }
.mf-card em { margin-top: auto; align-self: flex-start; padding: 4px 9px; border-radius: 99px; background: var(--ac); color: #fff; font: 700 10.5px/1.2 var(--font); letter-spacing: .1em; text-transform: uppercase; font-style: normal; }
.mf-card-all { background: var(--ink); color: var(--paper); }
.mf-card-all i { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.mf-card-all .mf-card-m { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.mf-card.is-hit, .mf-ev.is-hit { box-shadow: inset 0 0 0 2px var(--red); }

/* ministry rows */
.mf-list { display: grid; gap: 14px; }
.mf-row { display: grid; grid-template-columns: 210px minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(18px, 2.2vw, 30px); padding: 16px; border-radius: 26px; background: var(--paper-2); }
.mf-list.is-in .mf-row { animation: mfIn .5s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes mfIn { from { opacity: 0; transform: translateY(14px); } }
.mf-fig { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; background: #111; }
.mf-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.mf-row:hover .mf-fig img { transform: scale(1.04); }
.mf-body { display: flex; flex-direction: column; padding: 6px 0; min-width: 0; }
.mf-k { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.mf-k::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ac); flex: none; }
.mf-body h3 { margin: 0 0 10px; font-size: clamp(26px, 2.5vw, 36px); line-height: .95; font-weight: 700; text-transform: uppercase; letter-spacing: -.015em; }
.mf-body h3 a { color: inherit; text-decoration: none; }
.mf-body h3 a:hover { color: var(--red); }
.mf-d { margin: 0 0 14px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.mf-meta { display: grid; gap: 6px; margin: 0 0 16px; font-size: 13.5px; }
.mf-meta div { display: grid; grid-template-columns: 58px 1fr; gap: 8px; }
.mf-meta dt { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.mf-meta dd { margin: 0; font-weight: 600; }
.mf-go { margin-top: auto; align-self: flex-start; display: inline-flex; gap: 8px; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: background-color .2s, transform .2s var(--ease); }
.mf-go:hover { background: var(--red); color: #fff; }
.mf-go span { transition: transform .2s var(--ease); }
.mf-go:hover span { transform: translateX(3px); }

.mf-next { padding: 6px 4px 6px 0; min-width: 0; }
.mf-next-h { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.mf-evs { display: grid; gap: 8px; }
.mf-ev { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border-radius: 16px; background: var(--paper); color: var(--ink); text-align: left; transition: transform .2s var(--ease), box-shadow .2s; }
.mf-ev-wk .mf-ev-d { background: transparent; color: var(--ac); box-shadow: inset 0 0 0 2px var(--ac); flex-direction: column-reverse; }
.mf-ev-wk .mf-ev-d b { font-size: 15px; }
button.mf-ev:hover { transform: translateX(3px); box-shadow: inset 0 0 0 1.5px var(--ac); }
.mf-ev-d { display: grid; place-items: center; align-content: center; height: 50px; border-radius: 12px; background: var(--ac); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.1; }
.mf-ev-d b { font-size: 20px; letter-spacing: 0; }
.mf-ev-t { display: grid; gap: 3px; min-width: 0; }
.mf-ev-t b { font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-ev-t i { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.mf-ev em { margin-right: 8px; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
.mf-more { display: inline-block; margin: 4px 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.mf-more:hover { color: var(--red); }
.mf-ev-none, .mf-ev-wait { margin: 0; padding: 14px 16px; border-radius: 16px; border: 1.5px dashed var(--line); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.mf-ev-wait { color: var(--ink-3); }

.mf-empty { padding: 56px 24px; border-radius: 26px; border: 1.5px dashed var(--line); text-align: center; }
.mf-empty h3 { margin: 0 0 8px; font-size: 26px; font-weight: 700; text-transform: uppercase; }
.mf-empty p { margin: 0 0 18px; color: var(--ink-2); }

@media (max-width: 1180px) {
  .mf-row { grid-template-columns: 170px minmax(0, 1fr); }
  .mf-next { grid-column: 2; padding-top: 0; }
  .mf-fig { grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
}
@media (max-width: 900px) {
  .mf-grid { grid-template-columns: minmax(0, 1fr); }
  .mf-side { position: static; }
  .mf-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 50px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); font: 700 13px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
  .mf-toggle b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 12px; letter-spacing: 0; }
  .mf-toggle b:empty { display: none; }
  .mf-toggle::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); transition: transform .24s; margin-left: auto; }
  .mf-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
  .mf-toggle span { margin-right: 10px; }
  .mf-panel { display: none; padding: 22px 4px 4px; }
  .mf-panel.is-open { display: block; }
  .mf-chips-col { flex-direction: row; flex-wrap: wrap; }
  .mf-chips-col .mf-chip { height: 40px; }
}
@media (max-width: 640px) {
  .mf-quick span { flex-basis: 100%; }
  .mf-search input { height: 56px; font-size: 16px; }
  .mf-search .search-x { top: 8px; }
  .mf-row { grid-template-columns: 84px minmax(0, 1fr); padding: 14px; gap: 0 14px; border-radius: 22px; }
  .mf-body { display: contents; }
  .mf-fig { grid-row: 1 / span 2; aspect-ratio: 1; min-height: 0; align-self: start; }
  .mf-k { grid-column: 2; align-self: end; margin-bottom: 6px; }
  .mf-body h3 { grid-column: 2; align-self: start; }
  .mf-d, .mf-meta, .mf-go { grid-column: 1 / -1; }
  .mf-d { margin-top: 12px; }
  .mf-go { margin-bottom: 18px; justify-self: start; }
  .mf-next { grid-column: 1 / -1; padding: 0; }
  .mf-body h3 { font-size: 24px; }
  .mf-d { font-size: 14.5px; }
  .mf-meta div { grid-template-columns: 1fr; gap: 2px; }
  .mf-bar { flex-wrap: wrap; }
  .mf-ev-t b { white-space: normal; }
  .mf-up-h h2 { font-size: 19px; }
  .mf-up-h a { font-size: 11px; }
  .mf-up-rail { grid-auto-columns: 74%; }
  .mf-top { padding-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) { .mf-list.is-in .mf-row { animation: none; } }
