/*
Theme Name: CCAK
Theme URI: https://www.ccakenya.org
Author: CCAK
Description: Custom block theme for the Church & Clergy Association of Kenya, built on the CCAK brand (Navy #2E3092, Red #ED1C24, Midnight #14152E, Plus Jakarta Sans + Cormorant Garamond).
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 0.6.10
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ccak
*/

:root {
	/* The open "C" from the CCAK mark, used as a faint watermark on navy surfaces. */
	--ccak-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23fff'%3E%3Ccircle cx='100' cy='100' r='80' stroke-width='36' pathLength='360' stroke-dasharray='290 70' stroke-dashoffset='-35'/%3E%3Ccircle cx='100' cy='100' r='44' stroke-width='16' pathLength='360' stroke-dasharray='280 80' stroke-dashoffset='-40'/%3E%3C/svg%3E");
	--ccak-on-dark: rgba(255, 255, 255, 0.82);
	--ccak-on-dark-soft: #C5C6EE;
	--ccak-shadow: 0 14px 34px rgba(20, 21, 46, 0.10);
}

/* ---------- Global ---------- */
html { scroll-behavior: smooth; }
:where(a) { text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 4px; }
summary:focus { outline: none; }
summary:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(46, 48, 146, 0.25); border-radius: 6px; }
::selection { background: var(--wp--preset--color--primary); color: #fff; }

/* Keep the footer at the bottom on short pages */
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }
.wp-site-blocks > footer { margin-block-start: 0; }

/* Small uppercase label above section headings (red on light, soft lavender on dark) */
.ccak-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-dark);
}
.has-primary-background-color .ccak-eyebrow,
.has-primary-dark-background-color .ccak-eyebrow,
.ccak-hero .ccak-eyebrow,
.ccak-page-header .ccak-eyebrow { color: var(--ccak-on-dark-soft); }

/* Brand tagline voice: Cormorant Garamond italic */
.ccak-tagline {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.35rem, 2.4vw, 1.7rem);
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.2;
}
.ccak-hero .ccak-tagline, .ccak-page-header .ccak-tagline { color: #fff; }

/* Short red rule, echoing the line under the wordmark */
.ccak-rule::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: 0.6rem;
	background: var(--wp--preset--color--accent);
}
.has-text-align-center.ccak-rule::after { margin-inline: auto; }

/* ---------- Header ---------- */
.ccak-topbar { font-size: var(--wp--preset--font-size--x-small); color: var(--ccak-on-dark); }
.ccak-topbar a { color: #fff; text-decoration: none; }
.ccak-topbar a:hover { text-decoration: underline; }
.ccak-topbar strong { color: #fff; }

/* The whole header area is sticky; the thin top bar scrolls away and the main bar stays.
   --ccak-topbar-h is measured by ccak.js (fallback 37px). */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--ccak-topbar-h, 37px));
	z-index: 50;
}
.ccak-header {
	position: relative;
	border-bottom: 3px solid var(--wp--preset--color--accent);
	box-shadow: 0 2px 14px rgba(20, 21, 46, 0.07);
	transition: background-color 0.3s ease, padding 0.25s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* Translucent "frosted glass" bar once the page scrolls. */
.ccak-header.is-scrolled.has-base-background-color {
	background-color: rgba(255, 255, 255, 0.97) !important;
	border-bottom-color: rgba(237, 28, 36, 0.85);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.ccak-header.is-scrolled.has-base-background-color {
		background-color: rgba(255, 255, 255, 0.72) !important;
		-webkit-backdrop-filter: saturate(180%) blur(16px);
		backdrop-filter: saturate(180%) blur(16px);
	}
}

.ccak-header .wp-block-site-logo img { height: auto; }

/* Menu and dropdown styles live in assets/css/navigation.css */

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border-width: 2px;
	padding-top: calc(0.85em - 2px);
	padding-bottom: calc(0.85em - 2px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { color: var(--wp--preset--color--primary); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: #fff;
}
/* Outline buttons on navy: white outline, inverts to white on hover */
.ccak-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.ccak-page-header .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-primary-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: #fff;
	border-color: #fff;
	color: var(--wp--preset--color--primary);
}
.ccak-hero .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.ccak-page-header .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.has-primary-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	background: #fff;
	color: var(--wp--preset--color--primary);
}

/* ---------- Navy surfaces with the C watermark ---------- */
.ccak-hero,
.ccak-page-header {
	background-color: var(--wp--preset--color--primary);
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.ccak-hero::before,
.ccak-page-header::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 50%;
	right: -6%;
	width: min(640px, 70vw);
	aspect-ratio: 1;
	transform: translateY(-50%);
	background: var(--ccak-watermark) center / contain no-repeat;
	opacity: 0.08;
	pointer-events: none;
}
.ccak-page-header::before { width: min(420px, 60vw); right: -4%; }
.ccak-hero h1, .ccak-hero h2, .ccak-page-header h1 { color: #fff; }
.ccak-hero p, .ccak-page-header p { color: var(--ccak-on-dark); }
.ccak-hero a:not(.wp-block-button__link), .ccak-page-header a:not(.wp-block-button__link) { color: #fff; }
.ccak-hero strong { color: #fff; }
.ccak-hero .ccak-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	padding: 0.45em 1.1em;
	font-size: var(--wp--preset--font-size--small);
}
.ccak-hero .ccak-hero-badge::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
}

/* ---------- Cards ---------- */
.ccak-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: var(--wp--preset--spacing--40);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	height: 100%;
}
.ccak-card > :first-child { margin-top: 0; }
.ccak-card:hover { transform: translateY(-3px); box-shadow: var(--ccak-shadow); border-color: #CFD0E6; }
.ccak-card h3 { margin-top: 0; font-size: clamp(1.1rem, 1.6vw, 1.3rem); hyphens: manual; }
.ccak-hero .has-large-font-size,
.ccak-page-header .has-large-font-size { font-size: clamp(1.05rem, 1.8vw, 1.25rem) !important; line-height: 1.6; }
.ccak-card-link a { font-weight: 700; text-decoration: none; color: var(--wp--preset--color--primary); }
.ccak-card-link a::after { content: " \2192"; color: var(--wp--preset--color--accent-dark); transition: margin 0.2s ease; }
.ccak-card-link a:hover::after { margin-left: 0.2em; }

.ccak-quicklinks { margin-top: calc(-1 * var(--wp--preset--spacing--60)) !important; position: relative; z-index: 2; }
.ccak-quicklinks .ccak-card { box-shadow: var(--ccak-shadow); }

/* Card with the red brand rule on top */
.ccak-pillar { border-top: 4px solid var(--wp--preset--color--accent); }

/* ---------- Stats ---------- */
.ccak-stat-number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2.4rem, 5vw, 3.4rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1;
	color: #fff;
	margin-bottom: 0.3em !important;
}
.ccak-stat-number::after {
	content: "";
	display: block;
	width: 32px;
	height: 3px;
	margin: 0.45em auto 0;
	background: var(--wp--preset--color--accent);
}
.ccak-stat-label { color: var(--ccak-on-dark-soft); margin-top: 0 !important; }

/* ---------- Welcome / photos ---------- */
.ccak-photo-placeholder {
	aspect-ratio: 4 / 5;
	border-radius: 14px;
	background:
		var(--ccak-watermark) 120% 110% / 80% no-repeat,
		linear-gradient(160deg, var(--wp--preset--color--primary-soft), #DCDDF2);
	border: 1px dashed #A9ABD6;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--wp--preset--color--muted);
	padding: 1rem;
}
.ccak-signoff { border-left: 4px solid var(--wp--preset--color--accent); padding-left: 1em; }
.ccak-signoff em {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.35em;
	color: var(--wp--preset--color--primary);
}

/* ---------- Page header band ---------- */
.ccak-page-header .ccak-crumbs { font-size: var(--wp--preset--font-size--x-small); letter-spacing: 0.04em; }
.ccak-page-header .ccak-crumbs a { text-decoration: none; }
.ccak-page-header .ccak-crumbs a:hover { text-decoration: underline; }

/* ---------- News cards ---------- */
.ccak-news .wp-block-post { height: 100%; }
.ccak-news .wp-block-post-featured-image img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; }
.ccak-news .wp-block-post-title a { text-decoration: none; }
.ccak-news .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-dark); }

/* ---------- Inner pages ---------- */
[id] { scroll-margin-top: 120px; }
.wp-block-post-content > .alignfull { margin-block-start: 0; }

/* Placeholder for content CCAK still has to supply. Remove once filled. */
.ccak-todo {
	background: #FFF8E1;
	border: 1px dashed #C9A227;
	border-radius: 8px;
	padding: 0.75em 1em;
	color: #6B5310;
	font-size: var(--wp--preset--font-size--small);
}

.ccak-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-weight: 800;
	margin-bottom: 0 !important;
	box-shadow: 0 0 0 4px var(--wp--preset--color--primary-soft);
}

.ccak-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.ccak-tags.has-text-align-center { justify-content: center; }
.ccak-tags span {
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary);
	border-radius: 999px;
	padding: 0.35em 1em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ccak-check-list { list-style: none; padding-left: 0; }
.ccak-check-list li { padding-left: 1.7em; position: relative; margin-bottom: 0.45em; }
.ccak-check-list li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0.1em;
	width: 1.2em;
	height: 1.2em;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent-dark);
	font-size: 0.85em;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ccak-fee { border-top: 1px solid var(--wp--preset--color--border); padding-top: 0.75em; font-weight: 700; color: var(--wp--preset--color--primary); }

.ccak-paybill {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2.2rem, 5vw, 3rem);
	font-weight: 800;
	letter-spacing: 0.08em;
	color: #fff;
	line-height: 1;
}

.ccak-coming-soon { opacity: 0.8; }
.ccak-badge {
	display: inline-block;
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary);
	border-radius: 999px;
	padding: 0.2em 0.75em;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* FAQ accordion (core/details) */
.ccak-faq .wp-block-details {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: 1em 1.25em;
	background: var(--wp--preset--color--base);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ccak-faq .wp-block-details[open] { border-color: #CFD0E6; box-shadow: var(--ccak-shadow); border-left: 4px solid var(--wp--preset--color--accent); }
.ccak-faq .wp-block-details + .wp-block-details { margin-top: 0.75rem; }
.ccak-faq .wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--medium);
}
.ccak-faq .wp-block-details summary::marker { color: var(--wp--preset--color--accent-dark); }
.ccak-faq .wp-block-details[open] summary { margin-bottom: 0.5em; }

.ccak-profile-photo { aspect-ratio: 4 / 5; }
.ccak-profile-photo img { border-radius: 14px; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.ccak-footer { border-top: 4px solid var(--wp--preset--color--accent); color: var(--ccak-on-dark); }
.ccak-footer a { color: var(--ccak-on-dark); text-decoration: none; }
.ccak-footer a:hover { color: #fff; text-decoration: underline; }
.ccak-footer h4 { color: #fff; font-size: var(--wp--preset--font-size--x-small); letter-spacing: 0.16em; text-transform: uppercase; }
.ccak-footer ul { list-style: none; padding-left: 0; }
.ccak-footer li { margin-bottom: 0.5em; }
.ccak-footer strong { color: #fff; }
.ccak-footer-logo img { width: 260px; max-width: 100%; height: auto; }
.ccak-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.62); }

/* WhatsApp floating button */
.ccak-whatsapp-float {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 60;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #25D366;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}
.ccak-whatsapp-float:hover { transform: scale(1.06); }
.ccak-whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }

@media (max-width: 781px) {
	.ccak-topbar .ccak-topbar-extra { display: none; }
	.ccak-header-actions { display: none !important; }
	.ccak-quicklinks { margin-top: 0 !important; }
	.ccak-header .wp-block-site-logo img { width: 170px !important; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ccak-card, .ccak-whatsapp-float { transition: none; }
	.ccak-card:hover { transform: none; }
}

/* =====================================================================
   Interactions (v0.3)
   ===================================================================== */

/* ---------- Hero slider ----------
   Markup: a full-width Group with class "ccak-slider" holding Cover blocks with class "ccak-slide".
   In the editor the slides simply stack, so each can be edited like a normal Cover. */
.ccak-slider { position: relative; margin-top: 0 !important; background: var(--wp--preset--color--primary); }
.ccak-slider > .ccak-slide { margin: 0 !important; }
.ccak-js .ccak-slider:not(.is-ready):not(.is-single) > .ccak-slide:not(:first-child) { display: none; }

.ccak-slide.wp-block-cover {
	min-height: clamp(520px, 78vh, 720px);
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: calc(var(--wp--preset--spacing--70) + var(--wp--preset--spacing--60) + 2rem);
	align-items: center;
	overflow: hidden;
	isolation: isolate;
}
/* Faint "C" watermark on every slide (sits above any photo overlay). */
.ccak-slide.wp-block-cover::after {
	content: "";
	position: absolute;
	z-index: 1;
	top: 50%;
	right: -8%;
	width: min(680px, 75vw);
	aspect-ratio: 1;
	transform: translateY(-50%);
	background: var(--ccak-watermark) center / contain no-repeat;
	opacity: 0.08;
	pointer-events: none;
}
.ccak-slide .wp-block-cover__inner-container { position: relative; z-index: 2; }
.ccak-slide h1, .ccak-slide h2 { color: #fff; }
.ccak-slide h2 { font-size: var(--wp--preset--font-size--display); line-height: 1.08; }
.ccak-slide p { color: var(--ccak-on-dark); }
.ccak-slide .has-large-font-size { font-size: clamp(1.05rem, 1.8vw, 1.25rem) !important; line-height: 1.6; }
.ccak-slide .ccak-tagline { color: #fff; }
.ccak-slide .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--wp--preset--color--primary); }
.ccak-slide .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--primary); }
/* Photo slides: slow zoom on the active slide. */
.ccak-slide .wp-block-cover__image-background { transform: scale(1.08); transition: transform 8s ease-out; }
.ccak-slide.is-active .wp-block-cover__image-background { transform: scale(1); }

.ccak-slider.is-ready { display: grid; }
.ccak-slider.is-ready > .ccak-slide {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.9s ease, visibility 0.9s ease;
}
.ccak-slider.is-ready > .ccak-slide.is-active { opacity: 1; visibility: visible; }
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > * {
	animation: ccak-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > :nth-child(2) { animation-delay: 0.1s; }
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > :nth-child(3) { animation-delay: 0.2s; }
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > :nth-child(n+4) { animation-delay: 0.3s; }

@keyframes ccak-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

.ccak-slider__controls {
	position: absolute;
	z-index: 5;
	left: max(clamp(1rem, 4vw, 2rem), calc((100% - 1320px) / 2));
	bottom: calc(var(--wp--preset--spacing--60) + 1.5rem);
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.ccak-slider__arrow,
.ccak-slider__toggle {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.45);
	background: rgba(20, 21, 46, 0.25);
	color: #fff;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.ccak-slider__arrow:hover,
.ccak-slider__toggle:hover { background: #fff; border-color: #fff; color: var(--wp--preset--color--primary); }
.ccak-slider__toggle span { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.ccak-slider__toggle.is-paused span { width: 0; height: 0; border: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.ccak-slider__dots { display: flex; gap: 0.4rem; padding: 0 0.3rem; }
.ccak-slider__dot {
	position: relative;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	transition: width 0.3s ease;
}
.ccak-slider__dot::before {
	content: "";
	display: block;
	width: 100%;
	height: 4px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.35);
}
.ccak-slider__dot.is-active { width: 54px; }
.ccak-slider__dot span {
	position: absolute;
	left: 0;
	top: 50%;
	height: 4px;
	margin-top: -2px;
	width: 0;
	border-radius: 4px;
	background: var(--wp--preset--color--accent);
}
.ccak-slider__dot.is-active span { width: 100%; }
.ccak-slider.is-playing .ccak-slider__dot.is-active span { animation: ccak-progress var(--ccak-slide-interval, 7000ms) linear both; }
@keyframes ccak-progress { from { width: 0; } to { width: 100%; } }

/* ---------- Scroll reveal ---------- */
.ccak-reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ccak-reveal.is-visible { opacity: 1; transform: none; }
.ccak-card.ccak-reveal.is-visible:hover { transform: translateY(-3px); }

/* ---------- Compact header on scroll ---------- */
.ccak-header { transition: padding 0.25s ease, box-shadow 0.25s ease; }
.ccak-header.is-scrolled { padding-top: 0.45rem !important; padding-bottom: 0.45rem !important; box-shadow: 0 6px 24px rgba(20, 21, 46, 0.12); }
.ccak-header .wp-block-site-logo img { transition: width 0.25s ease; }
@media (min-width: 782px) {
	.ccak-header.is-scrolled .wp-block-site-logo img { width: 190px !important; }
}

/* ---------- Scripture band ---------- */
.ccak-scripture .ccak-scripture-text {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.7rem, 3.6vw, 2.6rem);
	line-height: 1.3;
	color: var(--wp--preset--color--primary);
}
.ccak-scripture .ccak-scripture-text::before {
	content: "\201C";
	display: block;
	font-size: 2.2em;
	line-height: 0.6;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.15em;
}
.ccak-scripture .ccak-scripture-ref { font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--accent-dark); }

/* ---------- Copy Paybill ---------- */
.ccak-copy-button {
	display: block;
	margin: 0.9rem auto 0;
	border: 1.5px solid rgba(255, 255, 255, 0.5);
	background: transparent;
	color: #fff;
	border-radius: 999px;
	padding: 0.5em 1.2em;
	font: inherit;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.ccak-copy-button:hover,
.ccak-copy-button.is-copied { background: #fff; color: var(--wp--preset--color--primary); }
span.ccak-copy { cursor: pointer; font-weight: 700; border-bottom: 1.5px dashed currentColor; }
span.ccak-copy::after { content: " \29C9"; font-size: 0.85em; opacity: 0.7; }
span.ccak-copy.is-copied::after { content: " \2713"; opacity: 1; }

.ccak-toast {
	position: fixed;
	left: 50%;
	bottom: 90px;
	z-index: 80;
	transform: translate(-50%, 20px);
	opacity: 0;
	pointer-events: none;
	background: var(--wp--preset--color--primary-dark);
	color: #fff;
	padding: 0.7em 1.2em;
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.ccak-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile quick-action bar ---------- */
.ccak-action-bar { display: none; }
@media (max-width: 781px) {
	.ccak-action-bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 70;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		background: #fff;
		border-top: 1px solid var(--wp--preset--color--border);
		box-shadow: 0 -6px 20px rgba(20, 21, 46, 0.1);
		padding-bottom: env(safe-area-inset-bottom);
	}
	.ccak-action-bar a {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		padding: 0.55rem 0 0.5rem;
		font-size: 0.75rem;
		font-weight: 700;
		color: var(--wp--preset--color--primary);
		text-decoration: none;
	}
	.ccak-action-bar svg { width: 22px; height: 22px; fill: currentColor; }
	.ccak-action-bar a.is-give { background: var(--wp--preset--color--accent-dark); color: #fff; }
	.ccak-whatsapp-float { display: none; }
	body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
	.ccak-toast { bottom: 80px; }
	.ccak-slider__controls { bottom: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
	.ccak-reveal { opacity: 1; transform: none; transition: none; }
	.ccak-slider.is-ready > .ccak-slide { transition: none; }
	.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > * { animation: none; }
	.ccak-slide .wp-block-cover__image-background { transform: none; transition: none; }
}

.ccak-paybill span.ccak-copy { border-bottom: 0; cursor: text; }
.ccak-paybill span.ccak-copy::after { content: none; }
@media (max-width: 600px) {
	.ccak-stats.wp-block-columns { flex-wrap: wrap !important; row-gap: 2rem; }
	.ccak-stats.wp-block-columns > .wp-block-column { flex-basis: calc(50% - 1rem) !important; }
}

/* Crossfade: the outgoing slide leaves quickly, the incoming one arrives just after, so text never overlaps. */
.ccak-slider.is-ready > .ccak-slide { transition: opacity 0.35s ease, visibility 0.35s ease; }
.ccak-slider.is-ready > .ccak-slide.is-active { transition: opacity 0.8s ease 0.25s, visibility 0s linear 0s; }
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > * { animation-delay: 0.25s; }
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > :nth-child(2) { animation-delay: 0.35s; }
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > :nth-child(3) { animation-delay: 0.45s; }
.ccak-slider.is-ready > .ccak-slide.is-active .wp-block-cover__inner-container > * > :nth-child(n+4) { animation-delay: 0.55s; }

/* ---------- Editor section patterns (v0.3.1) ---------- */
.ccak-event-date {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	padding: 0.45rem 0.6rem;
	border-radius: 10px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.1;
	text-transform: uppercase;
}
.ccak-event-date strong { font-size: 1.6rem; letter-spacing: 0; color: #fff; }

.ccak-member { text-align: center; }
.ccak-member-photo img { width: 140px !important; height: 140px !important; margin-inline: auto; border-radius: 50%; border: 4px solid var(--wp--preset--color--primary-soft); background: var(--wp--preset--color--surface); }
.ccak-member-photo { display: flex; justify-content: center; }

.ccak-testimonial { position: relative; }
.ccak-testimonial-text {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 1.3rem;
	line-height: 1.45;
	color: var(--wp--preset--color--primary);
}
.ccak-testimonial-text::before { content: "\201C"; display: block; font-size: 3rem; line-height: 0.6; color: var(--wp--preset--color--accent); margin-bottom: 0.2rem; }
.ccak-testimonial-name { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); border-top: 1px solid var(--wp--preset--color--border); padding-top: 0.75rem; }
.ccak-testimonial-name strong { color: var(--wp--preset--color--primary); }

.ccak-rounded img { border-radius: 16px; }

/* ---------- Scroll to top (v0.3.2) ---------- */
.ccak-to-top {
	position: fixed;
	right: 22px;
	bottom: 88px;
	z-index: 65;
	width: 50px;
	height: 50px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 26px rgba(20, 21, 46, 0.28);
	opacity: 0;
	visibility: hidden;
	transform: translateY(16px) scale(0.85);
	transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1.3), visibility 0.3s, background-color 0.2s ease;
}
.ccak-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.ccak-to-top:hover { background: var(--wp--preset--color--accent-dark); }
.ccak-to-top__arrow { width: 22px; height: 22px; fill: currentColor; position: relative; transition: transform 0.25s ease; }
.ccak-to-top:hover .ccak-to-top__arrow { transform: translateY(-3px); animation: ccak-nudge 0.9s ease-in-out infinite; }
@keyframes ccak-nudge {
	0%, 100% { transform: translateY(-1px); }
	50% { transform: translateY(-5px); }
}
/* Progress ring: fills in red as the visitor scrolls down the page. */
.ccak-to-top__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	pointer-events: none;
}
.ccak-to-top__ring circle {
	fill: none;
	stroke: var(--wp--preset--color--accent);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	transition: stroke-dashoffset 0.15s linear;
}
.ccak-to-top:hover .ccak-to-top__ring circle { stroke: #fff; }

@media (max-width: 781px) {
	.ccak-to-top { right: 14px; bottom: calc(62px + 14px + env(safe-area-inset-bottom)); width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	.ccak-to-top { transition: opacity 0.2s ease, visibility 0.2s; transform: none; }
	.ccak-to-top:hover .ccak-to-top__arrow { animation: none; }
}

/* Wider layout: keep long text comfortable to read on big screens. */
.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol { max-width: 820px; }

/* Slides with a background image don't need the drawn "C" watermark. */
.ccak-slide.wp-block-cover:has(.wp-block-cover__image-background)::after { display: none; }
/* On phones, keep the artwork's right-hand focus visible behind the text. */
@media (max-width: 781px) { .ccak-slide .wp-block-cover__image-background { object-position: 70% 50%; } }

/* ---------- Button hover fix ----------
   White-outline buttons carry WordPress's .has-base-color (white text, !important). On hover they turn white,
   so the text colour must be forced to navy too, or it becomes white-on-white. */
.wp-block-button .wp-block-button__link.has-base-color:hover,
.wp-block-button .wp-block-button__link.has-base-color:focus-visible {
	background-color: #fff !important;
	border-color: #fff !important;
	color: var(--wp--preset--color--primary) !important;
}
/* Filled buttons on navy surfaces: hover to white with navy text (never navy-on-navy). */
.ccak-hero .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.ccak-page-header .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.ccak-slide .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.has-primary-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.has-primary-dark-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	background-color: #fff !important;
	color: var(--wp--preset--color--primary) !important;
}
/* Outline buttons on light backgrounds: hover to solid navy with white text. */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover {
	background-color: var(--wp--preset--color--primary) !important;
	border-color: var(--wp--preset--color--primary) !important;
	color: #fff !important;
}
.wp-block-button__link { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
