/*
Theme Name: RRCC Ministry
Theme URI: https://ministry.riceroadcc.ca
Description: Ministry directory theme for Rice Road Community Church. Requires the RRCC Ministries plugin.
Version: 1.0.0
Author: Rice Road Community Church
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rrcc
*/

/* Brand colours taken from riceroadcc.ca and the RRCC logo. */
:root {
	--blue: #2f7bc7;
	--blue-dark: #1d5794;
	--navy: #0f2a4a;
	--blue-tint: #e8f1fb;
	--green: #199712;
	--green-dark: #12720d;
	--red: #c30505;
	--amber: #e29f1c;
	--warm: #8a5a00;
	--warm-tint: #fdf1d9;
	--ink: #141617;
	--ink-soft: #55595c;
	--line: #e4e6e8;
	--bg: #f7f8fa;
	--card: #ffffff;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(15, 42, 74, .06), 0 4px 16px rgba(15, 42, 74, .08);
	--font: "Raleway", "Helvetica Neue", Arial, sans-serif;
	--serif: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.7 var(--font); letter-spacing: .01em; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { font-family: var(--font); line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: 1.6rem; font-weight: 500; }
h3 { font-size: 1.15rem; font-weight: 600; }
strong { font-weight: 700; }
p { margin: 0 0 1em; }
.icon { flex: none; vertical-align: -3px; }
.muted { color: var(--ink-soft); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.section { padding: 40px 16px 64px; }
[hidden] { display: none !important; }

.screen-reader-text, .rrcc-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

/* Header ---------------------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__logo { height: 56px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__church { font-weight: 700; font-size: 1.05rem; letter-spacing: 0; }
.brand__site { color: var(--blue); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-weight: 600; color: var(--ink); }
.site-nav a:hover { color: var(--blue); }
.site-nav__main { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; }

/* Hero / page heads ------------------------------------------------------ */
.hero, .page-head { background: linear-gradient(160deg, var(--navy), var(--blue-dark)); color: #fff; padding: 48px 0 40px; }
.hero h1, .page-head h1 { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.hero__lead, .page-head__lead { font-size: 1.15rem; max-width: 680px; color: #e3eefb; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: #bcd6f3; margin-bottom: .6em; }
.page-head--plain { padding: 40px 0 28px; }

/* Photo banners, tinted blue like the main site's hero. */
.banner { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); }
.hero.banner { padding: 88px 0 64px; }
.page-head.banner { padding: 56px 0 48px; min-height: 340px; display: flex; align-items: flex-end; }
.page-head.banner > .wrap { width: 100%; }
.banner__bg { position: absolute; inset: 0; z-index: -3; background-size: cover; background-position: center; }
.banner__bg--raw { filter: grayscale(1) contrast(1.05) brightness(1.05); }
.banner__tint { position: absolute; inset: 0; z-index: -2; background: #2f7bc7; mix-blend-mode: color; }
.banner__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 28, 54, .9) 0%, rgba(10, 28, 54, .7) 45%, rgba(10, 28, 54, .25) 100%); }
@media (max-width: 700px) { .banner__shade { background: linear-gradient(180deg, rgba(10, 28, 54, .55), rgba(10, 28, 54, .88)); } }

.search { position: relative; max-width: 620px; margin: 24px 0 18px; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.search input { width: 100%; padding: 14px 16px 14px 46px; border-radius: 999px; border: 0; font: inherit; box-shadow: 0 4px 20px rgba(0, 0, 0, .15); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { color: #fff; text-decoration: none; font-size: .9rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); }
.chip:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; font-size: .9rem; color: #b9d3ef; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: #fff; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.page-head .rrcc-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.page-head .rrcc-btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.page-head .rrcc-btn:not(.rrcc-btn--ghost) { background: #fff; color: var(--blue-dark); border-color: #fff; }

/* Directory -------------------------------------------------------------- */
.directory { padding-top: 32px; padding-bottom: 64px; }
.area { margin-bottom: 44px; }
.area__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-bottom: 18px; }
.area__head h2 { margin: 0; }
.area__head h2 a { color: inherit; text-decoration: none; }
.area__head h2 a:hover { color: var(--blue); }
.area__count { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.grid--tight { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9d8ea; color: var(--ink); }
.card__parent { font-size: .8rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 2px; }
.card__title { margin: 0 0 6px; font-size: 1.15rem; color: var(--blue-dark); }
.card__summary { color: var(--ink-soft); font-size: .95rem; margin-bottom: 14px; }
.card__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .9rem; }
.card__leader { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.card__leader .icon { color: var(--green); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.badge--warm { background: var(--warm-tint); color: var(--warm); }
.empty { color: var(--ink-soft); text-align: center; padding: 40px 0; }
.back { font-weight: 600; text-decoration: none; display: inline-block; margin-top: 24px; }

/* Single ministry -------------------------------------------------------- */
.layout { display: grid; gap: 32px; padding-top: 36px; padding-bottom: 48px; }
@media (min-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; } }
.block { margin-bottom: 40px; }
.block h2 { padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.prose > * + * { margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.feature { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; }
.feature img { display: block; width: 100%; }
.part-of { font-size: .95rem; color: var(--ink-soft); }
.roles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.roles li { background: var(--blue-tint); color: var(--blue-dark); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; }

.materials__type { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 20px 0 8px; }
.materials { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.material { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.material:hover { border-color: var(--blue); color: var(--ink); }
.material__icon { position: relative; color: var(--blue); display: flex; flex-direction: column; align-items: center; font-size: .6rem; font-weight: 700; min-width: 34px; }
.material__icon .icon { width: 24px; height: 24px; }
.material__name { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.material__meta { color: var(--ink-soft); font-size: .85rem; white-space: nowrap; }
.material__dl { color: var(--blue); }

.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .contact-card { position: sticky; top: 24px; } }
.contact-card dl { margin: 0 0 18px; }
.contact-card dl > div { padding: 10px 0; border-top: 1px solid var(--line); }
.contact-card dl > div:first-child { border-top: 0; padding-top: 0; }
.contact-card dt { display: flex; align-items: center; gap: 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; }
.contact-card dt .icon { width: 15px; height: 15px; color: var(--blue); }
.contact-card dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* Forms ------------------------------------------------------------------ */
.forms { background: #f1eee8; border-top: 1px solid var(--line); padding: 48px 0 64px; }
.forms__grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .forms__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.forms__grid--single { max-width: 720px; grid-template-columns: 1fr !important; }
.form-panel { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); scroll-margin-top: 24px; }
.form-panel--accent { border-top: 5px solid var(--green); }
.rrcc-form { margin-top: 12px; }
.rrcc-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .rrcc-row { grid-template-columns: 1fr 1fr; } }
.rrcc-field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.rrcc-field > label, .rrcc-field legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.rrcc-field input[type=text], .rrcc-field input[type=email], .rrcc-field input[type=tel], .rrcc-field textarea {
	width: 100%; padding: 10px 12px; border: 1px solid #cfcac0; border-radius: 8px; font: inherit; background: #fff;
}
.rrcc-field input:focus, .rrcc-field textarea:focus { border-color: var(--blue); outline: 2px solid rgba(29, 95, 166, .2); outline-offset: 0; }
.rrcc-checks { display: flex; flex-direction: column; gap: 6px; }
.rrcc-checks label, .rrcc-consent label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.rrcc-checks input, .rrcc-consent input { margin-top: 5px; accent-color: var(--blue); }
.req { color: var(--warm); }
.rrcc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; border: 2px solid var(--blue); padding: 11px 22px; border-radius: 999px; font: 700 1rem var(--font); text-decoration: none; cursor: pointer; }
.rrcc-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.rrcc-btn--ghost { background: transparent; color: var(--blue); }
.rrcc-btn--block { width: 100%; }
.form-panel--accent .rrcc-btn { background: var(--green); border-color: var(--green); }
.form-panel--accent .rrcc-btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.rrcc-notice { padding: 14px 18px; border-radius: 10px; margin: 12px 0; }
.rrcc-notice ul { margin: 6px 0 0; padding-left: 1.2em; }
.rrcc-notice--ok { background: #eaf5e1; color: #2f5212; border: 1px solid #c4e0aa; }
.rrcc-notice--err { background: #fdecea; color: #8a1c13; border: 1px solid #f4c4be; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #c9d6e6; font-size: .92rem; border-top: 4px solid; border-image: linear-gradient(90deg, #0086d4 0 25%, #f5bb42 25% 50%, #c20a00 50% 75%, #3fa142 75%) 1; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; padding-bottom: 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
