/*
Theme Name: Church of Christ Fellowship
Theme URI: https://churchofchristfellowship.co.uk
Author: Church of Christ Fellowship
Author URI: https://churchofchristfellowship.co.uk
Description: Custom theme for Church of Christ Fellowship. Requires Advanced Custom Fields (free or Pro). Contact page supports Contact Form 7.
Version: 1.2.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ccf
*/

:root {
	/* Palette taken from the COCF shield logo */
	--maroon: #5a1418;
	--maroon-deep: #2b0a0c;
	--crimson: #8e1f26;
	--gold: #c99a3e;
	--gold-light: #ecd082;
	--gold-dark: #9a7124;
	--bronze: #5c3d17;
	--gold-grad: linear-gradient(160deg, #f1d88f 0%, #d1a54a 38%, #a77a2b 72%, #e0bd67 100%);
	--cream: #faf4e6;
	--paper: #ffffff;
	--text: #2e2420;
	--muted: #6e625a;
	--line: #eadfc7;
	--on-dark: #eadbc6;
	--on-dark-soft: #cdb9a2;
	--radius: 14px;
	--shadow: 0 12px 34px rgba(43, 10, 12, .10);
	--serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--crimson); }
h1, h2, h3, h4 {
	font-family: var(--serif);
	color: var(--maroon);
	line-height: 1.15;
	margin: 0 0 .5em;
	font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.screen-reader-text {
	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: 0; background: var(--gold); color: var(--maroon-deep); padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 10px; top: 10px; }

.eyebrow {
	display: inline-block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
	font-weight: 600; color: var(--gold-dark); margin-bottom: .9rem;
}
.btn {
	display: inline-block; padding: .85rem 1.8rem; border-radius: 999px; background: var(--gold-grad);
	color: var(--maroon-deep); text-decoration: none; box-shadow: 0 6px 18px rgba(43,10,12,.25), inset 0 1px 0 rgba(255,255,255,.45); font-weight: 600; font-size: .95rem; letter-spacing: .02em;
	transition: background .2s, transform .2s, color .2s; border: 0; cursor: pointer; font-family: var(--sans);
}
.btn:hover { background: var(--gold-grad); color: var(--maroon-deep); filter: brightness(1.08); transform: translateY(-1px); }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-cream { background: var(--cream); }
.section-navy { background: radial-gradient(ellipse at 50% 0%, var(--crimson) 0%, var(--maroon) 45%, var(--maroon-deep) 100%); color: var(--on-dark); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy .eyebrow { color: var(--gold); }
.text-center { text-align: center; }
.lead { font-size: 1.18rem; color: var(--muted); }
.divider { width: 60px; height: 2px; background: var(--gold); margin: 1.2rem auto 1.8rem; border: 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100; background: var(--maroon-deep);
	box-shadow: 0 6px 20px rgba(43,10,12,.25);
}
.site-header::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
	background: linear-gradient(90deg, transparent, var(--gold-dark) 15%, var(--gold-light) 50%, var(--gold-dark) 85%, transparent);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 20px; }

/* Hanging shield badge: the logo drops below the header bar */
.brand { position: relative; align-self: flex-start; height: 78px; flex: none; }
.brand .custom-logo-link, .brand .badge-link {
	position: relative; z-index: 2; display: block; margin-top: 8px;
	filter: drop-shadow(0 10px 14px rgba(0,0,0,.45));
	transition: transform .3s ease;
}
.brand .custom-logo-link:hover, .brand .badge-link:hover { transform: translateY(2px); }
.brand .custom-logo, .brand .badge-svg { height: 112px; width: auto; max-height: none; transition: height .3s ease; }
.site-header.is-scrolled .brand .custom-logo,
.site-header.is-scrolled .brand .badge-svg { height: 70px; }
@media (max-width: 860px) {
	.header-inner { min-height: 68px; }
	.brand { height: 68px; }
	.brand .custom-logo, .brand .badge-svg { height: 86px; }
	.site-header.is-scrolled .brand .custom-logo,
	.site-header.is-scrolled .brand .badge-svg { height: 58px; }
}
.custom-logo { max-height: 56px; width: auto; }
.badge-svg { display: block; }

.site-title {
	display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none;
	font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: .01em; line-height: 1.1;
}

.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav a {
	display: block; padding: .55rem 1rem; color: var(--on-dark); text-decoration: none;
	font-size: .95rem; font-weight: 500; transition: color .2s;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .3s, opacity .3s; }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.primary-nav {
		position: absolute; left: 0; right: 0; top: 100%; background: var(--maroon-deep);
		max-height: 0; overflow: hidden; transition: max-height .35s ease;
	}
	.primary-nav.is-open { max-height: 420px; }
	.primary-nav .menu { flex-direction: column; padding: 6px 20px 22px; gap: 0; }
	.primary-nav a { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
	.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
	.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero slider ---------- */
.hero-slider { position: relative; height: clamp(460px, 78vh, 760px); overflow: hidden; background: var(--maroon); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 1s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-bg {
	position: absolute; inset: 0; background-size: cover; background-position: center;
	transform: scale(1.06); transition: transform 7s ease;
}
.slide.is-active .slide-bg { transform: scale(1); }
.slide-bg.placeholder { background: radial-gradient(ellipse at 30% 20%, #8e1f26 0%, var(--maroon) 50%, var(--maroon-deep) 100%); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,10,12,.30), rgba(43,10,12,.72)); }
.slide-content {
	position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column;
	justify-content: center; align-items: center; text-align: center; color: #fff;
	max-width: 920px; margin: 0 auto; padding: 0 24px;
}
.slide-title { color: #fff; font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: .35em; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.slide-content p { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--on-dark); max-width: 640px; margin: 0 auto 1.8rem; }
.slide.is-active .slide-content > * { animation: ccf-rise .9s ease both; }
.slide.is-active .slide-content > *:nth-child(2) { animation-delay: .15s; }
.slide.is-active .slide-content > *:nth-child(3) { animation-delay: .3s; }
@keyframes ccf-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.slider-arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px;
	border-radius: 50%; border: 1px solid rgba(255,255,255,.45); background: rgba(43,10,12,.25);
	color: #fff; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: background .2s;
}
.slider-arrow:hover { background: var(--gold); border-color: var(--gold); color: var(--maroon-deep); }
.slider-prev { left: 22px; }
.slider-next { right: 22px; }
.slider-dots { position: absolute; bottom: 28px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 3; }
.slider-dots button { width: 34px; height: 4px; border: 0; border-radius: 2px; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.slider-dots button.is-active { background: var(--gold); }
@media (max-width: 640px) { .slider-arrow { display: none; } }

/* ---------- Home intro ---------- */
.intro { text-align: center; max-width: 840px; margin: 0 auto; }
.intro p { font-size: 1.2rem; color: var(--muted); }
.values { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1.8rem; }
.chip { padding: .45rem 1.1rem; border: 1px solid var(--gold); border-radius: 999px; font-size: .85rem; color: var(--maroon); background: #fff; font-weight: 500; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px;
	text-decoration: none; color: var(--text); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column;
}
.card { border-top: 3px solid var(--crimson); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-top-color: var(--gold); }
.card p { color: var(--muted); flex: 1; }
.card .more { color: var(--gold-dark); font-weight: 600; font-size: .92rem; }
.card-num { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); line-height: 1; margin-bottom: 1rem; }

/* ---------- Inner page hero ---------- */
.page-hero {
	position: relative; background: radial-gradient(ellipse at 50% 0%, var(--crimson) 0%, var(--maroon) 50%, var(--maroon-deep) 100%); color: #fff; text-align: center;
	padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 9vw, 100px); background-size: cover; background-position: center;
}
.page-hero.has-image::before { content: ""; position: absolute; inset: 0; background: rgba(43,10,12,.66); }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero h1::after { content: ""; display: block; width: 50px; height: 2px; background: var(--gold); margin: 20px auto 0; }
.page-hero p { color: var(--on-dark); font-size: 1.15rem; margin: 0 auto; max-width: 640px; }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.statement { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.35; color: var(--maroon); font-weight: 500; }
.point-list { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 14px; }
.point-list li { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.point-list .num {
	flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-grad); color: var(--maroon-deep);
	font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center;
}
.list-intro { font-weight: 600; color: var(--maroon); }
.closing { color: var(--muted); font-style: italic; }
.vision { text-align: center; max-width: 860px; margin: 0 auto; }
.vision .statement { color: #fff; margin-bottom: 1.5rem; }
.vision p { color: var(--on-dark); font-size: 1.08rem; }

/* ---------- Statement of Faith ---------- */
.beliefs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 800px) { .beliefs { grid-template-columns: 1fr; } }
.belief { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--crimson); border-radius: var(--radius); padding: 30px 30px 26px; }
.belief-num { font-family: var(--serif); color: var(--gold); font-size: 1.05rem; font-weight: 700; letter-spacing: .1em; }
.belief h3 { margin: .2em 0 .5em; }
.belief p:last-child, .belief ul:last-child { margin-bottom: 0; }
.belief ul { padding-left: 1.2em; margin: 0 0 1em; }
.belief li { margin-bottom: .3em; }
.commitment { max-width: 800px; margin: 0 auto; text-align: center; }
.commitment p { color: var(--on-dark); font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.panel-navy { background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-deep) 100%); color: var(--on-dark); border-color: var(--maroon); }
.panel-navy h3 { color: #fff; }
.detail { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.detail:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-label { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .15em; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.detail a { color: #fff; text-decoration: none; }
.detail a:hover { color: var(--gold); }
.map { margin-top: 30px; border-radius: var(--radius); overflow: hidden; }
.map iframe { width: 100%; height: 400px; border: 0; display: block; }
.admin-note { background: #fff8e6; border: 1px dashed var(--gold); padding: 16px; border-radius: 10px; font-size: .92rem; }

/* Contact Form 7 */
.wpcf7 label { display: block; font-weight: 600; font-size: .9rem; color: var(--maroon); margin-bottom: 14px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"],
.wpcf7 input[type="url"], .wpcf7 input[type="number"], .wpcf7 textarea, .wpcf7 select {
	width: 100%; margin-top: 6px; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px;
	font: inherit; font-weight: 400; color: var(--text); background: var(--cream); transition: border-color .2s, box-shadow .2s, background .2s;
}
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,154,62,.2); outline: 0; background: #fff; }
.wpcf7 textarea { min-height: 150px; resize: vertical; }
.wpcf7 input[type="submit"] {
	padding: .9rem 2rem; border-radius: 999px; background: var(--gold-grad); color: var(--maroon-deep); border: 0;
	font: 700 .95rem var(--sans); cursor: pointer; transition: background .2s;
}
.wpcf7 input[type="submit"]:hover { filter: brightness(1.08); }
.wpcf7-not-valid-tip { font-size: .82rem; font-weight: 400; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; border-radius: 10px; padding: 12px 16px; font-size: .92rem; }

/* ---------- Generic content ---------- */
.entry-content { max-width: 800px; margin: 0 auto; }
.entry-content > *:last-child { margin-bottom: 0; }
.post-list article { padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { font-size: 1.9rem; }
.post-list h2 a { color: var(--maroon); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--maroon-deep); color: var(--on-dark-soft); padding: 70px 0 0; font-size: .95rem; border-top: 3px solid var(--gold-dark); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 1rem; }
.footer-brand .custom-logo-link, .footer-brand .badge-link { display: inline-block; margin-bottom: 1.2rem; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }
.footer-brand .custom-logo, .footer-brand .badge-svg { height: 96px; width: auto; max-height: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 50px; padding: 22px 0; font-size: .85rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}
