/*
Theme Name: CCF Fresh
Description: Theme for Calvary Chapel Fortuna. Lightweight block theme by PSA Computer Services.
Author: PSA Computer Services
Author URI: https://psa-2.com
Version: 1.0.0
Requires at least: 6.6
Text Domain: ccf-fresh
*/

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
::selection { background: var(--wp--preset--color--amber); color: var(--wp--preset--color--forest); }

/* ---------- header ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: calc(var(--wp-admin--admin-bar--height, 32px) + env(safe-area-inset-top, 0px)); }
.ccf-header { position: relative; }
.ccf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start; }
.ccf-brand { gap: .7rem !important; }
.ccf-brand img { width: 44px; height: auto; display: block; }
.ccf-brand-name { line-height: 1.02; margin: 0; }
.ccf-brand-name a { text-decoration: none; color: inherit; }
.ccf-brand-name small { display: block; font-family: var(--wp--preset--font-family--body); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; color: var(--wp--preset--color--redwood); margin-top: .25rem; }
.ccf-header { box-shadow: 0 1px 0 rgba(19,38,31,.02), 0 6px 24px -18px rgba(19,38,31,.35); background: transparent !important; }
.ccf-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.ccf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff; }
.ccf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { color: #fff; }
.ccf-header .wp-block-navigation-item__content { position: relative; padding-block: .3rem; }
.ccf-header .wp-block-navigation-item__content::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--wp--preset--color--redwood); transition: right .2s ease; }
.ccf-header .wp-block-navigation-item__content:hover::after, .ccf-header .current-menu-item > .wp-block-navigation-item__content::after { right: 0; }
.ccf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after { display: none; }
.ccf-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--forest) !important; color: #fff !important; padding: 2rem; }
.ccf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.1rem; font-size: 1.35rem; }
.ccf-give-btn .wp-block-button__link { padding: .55rem 1.2rem !important; }

/* ---------- eyebrow / kicker ---------- */
.ccf-eyebrow { font-family: var(--wp--preset--font-family--heading); font-size: .74rem !important; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }

/* ---------- hero ---------- */
.ccf-hero { position: relative; overflow: hidden; }
.ccf-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60rem 30rem at 85% 30%, rgba(232,163,61,.18), transparent 60%); pointer-events: none; }
.ccf-hero > * { position: relative; }
.ccf-hero h1 { text-wrap: balance; }
.ccf-hero-photo img { border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); border: 8px solid rgba(255,255,255,.06); }

/* service-time chips */
.ccf-times { gap: .75rem !important; }
.ccf-time { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: .8rem 1.1rem; min-width: 10.5rem; }
.ccf-time p { margin: 0; }
.ccf-time .ccf-time-day { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--wp--preset--color--amber); font-weight: 700; }
.ccf-time .ccf-time-hour { font-family: var(--wp--preset--font-family--heading); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.ccf-time .ccf-time-what { font-size: .88rem; opacity: .8; }

/* ---------- framed content images ---------- */
.ccf-framed img { padding: 8px; background: #fff; border: 1px solid var(--wp--preset--color--line); border-bottom: 4px solid var(--wp--preset--color--redwood); box-shadow: 0 18px 40px -22px rgba(19,38,31,.45); border-radius: 14px; }

/* ---------- cards ---------- */
.ccf-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; transition: transform .2s ease, box-shadow .2s ease; }
.ccf-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(19,38,31,.5); }
.ccf-card h3 a { text-decoration: none; color: inherit; }
.ccf-card h3 a::after { content: " \2192"; color: var(--wp--preset--color--redwood); }
/* A card whose title is a link is clickable all over: the title link stretches to cover the card. Any other link inside stays on top. */
.ccf-card:has(h3 a) { position: relative; }
.ccf-card h3 a::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ccf-card:has(h3 a) a:not(h3 a) { position: relative; z-index: 1; }
.ccf-card:has(h3 a:focus-visible) { outline: 2px solid var(--wp--preset--color--redwood); outline-offset: 3px; }
.ccf-card h3 a:focus-visible { outline: none; }
.ccf-card-icon { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--color--sand); color: var(--wp--preset--color--redwood); font-size: 1.2rem; margin-bottom: .2rem !important; }
.wp-block-columns.ccf-grid > .wp-block-column { display: flex; }
.wp-block-columns.ccf-grid > .wp-block-column > .ccf-card { flex: 1; }

/* ---------- verse ---------- */
.ccf-verse { text-wrap: balance; }
.ccf-verse cite { font-family: var(--wp--preset--font-family--body); font-style: normal; font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: var(--wp--preset--color--redwood); }
.has-forest-background-color .ccf-verse cite, .has-redwood-background-color .ccf-verse cite { color: var(--wp--preset--color--amber); }

/* ---------- schedule / tables ---------- */
.ccf-schedule table { border-collapse: collapse; width: 100%; }
.ccf-schedule td, .ccf-schedule th { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: .75rem .6rem; vertical-align: top; text-align: left; }
.ccf-schedule th { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--slate); }
.ccf-schedule td:first-child, .ccf-schedule td:nth-child(2) { white-space: nowrap; }
.ccf-schedule td:first-child { font-weight: 700; color: var(--wp--preset--color--redwood); }
.ccf-schedule .wp-block-table { overflow-x: auto; }
.ccf-day { border-left: 3px solid var(--wp--preset--color--amber); }

/* message list */
.ccf-msg { border-bottom: 1px solid var(--wp--preset--color--line); padding-block: 1rem !important; }
.ccf-msg:last-child { border-bottom: 0; }
.ccf-msg p { margin: 0; }
.ccf-msg .ccf-msg-date { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--slate); font-weight: 600; }
.ccf-msg .ccf-msg-title { font-family: var(--wp--preset--font-family--heading); font-size: 1.2rem; font-weight: 700; }
.ccf-pill-links a { display: inline-block; font-size: .85rem; font-weight: 600; padding: .3rem .8rem; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; text-decoration: none; margin: .25rem .3rem 0 0; color: var(--wp--preset--color--forest); background: #fff; }
.ccf-pill-links a:hover { border-color: var(--wp--preset--color--redwood); color: var(--wp--preset--color--redwood); }

/* page title band */
.ccf-pagehead { position: relative; }
.ccf-pagehead h1 { text-wrap: balance; }

/* mock embeds */
.ccf-mock { border: 2px dashed rgba(255,255,255,.25); border-radius: 8px; aspect-ratio: 16/9; display: grid; place-items: center; text-align: center; }
.ccf-mock.is-light { border-color: var(--wp--preset--color--line); aspect-ratio: auto; min-height: 16rem; background: #fff; }

/* map */
.ccf-map { position: relative; background: var(--wp--preset--color--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23ffffff' stroke-opacity='.06'/%3E%3C/svg%3E"); border-radius: 6px; border-bottom: 4px solid var(--wp--preset--color--redwood); box-shadow: 0 18px 40px -22px rgba(19,38,31,.45); overflow: hidden; }
.ccf-map::before { content: "\2316  914 9th Street, Fortuna"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; }
.ccf-map iframe { position: relative; width: 100%; aspect-ratio: 4/3; border: 0; display: block; }

/* forms */
.ccf-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.ccf-form input, .ccf-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: .65rem .8rem; border: 1px solid var(--wp--preset--color--line); border-radius: 6px; background: #fff; margin-bottom: 1rem; }
.ccf-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.ccf-form button { font: inherit; font-weight: 700; background: var(--wp--preset--color--redwood); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.6rem; cursor: not-allowed; }
@media (max-width: 600px) { .ccf-form .row { grid-template-columns: 1fr; } }

/* footer */
.ccf-footer a { color: inherit; text-decoration: none; }
.ccf-footer a:hover { color: var(--wp--preset--color--amber); }
.ccf-footer ul { list-style: none; padding: 0; margin: 0; }
.ccf-footer li { margin: .35rem 0; }


@media (max-width: 781px) {
	.wp-block-buttons.is-content-justification-right { justify-content: flex-start; }
	.ccf-hero-photo { max-width: 26rem; margin-inline: auto; }
	.ccf-time { min-width: 0; flex: 1 1 9rem; }
}

/* schedule + message list on phones */
@media (max-width: 600px) {
	.ccf-schedule thead { display: none; }
	.ccf-schedule tr { display: grid; grid-template-columns: 5.4rem 1fr; border-bottom: 1px solid var(--wp--preset--color--line); padding-block: .5rem; }
	.ccf-schedule td { border: 0; padding: .15rem .3rem; }
	.ccf-schedule td:first-child { grid-column: 1 / -1; padding-top: .8rem; }
	.ccf-schedule td:first-child:empty { display: none; }
	.ccf-schedule td:nth-child(4) { grid-column: 2; font-size: .9rem; color: var(--wp--preset--color--slate); }
	.ccf-pill-links { text-align: left !important; }
}

/* tick list (home library promo) */
.ccf-ticks { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: .55rem; }
.ccf-ticks li { position: relative; padding-left: 2rem; font-weight: 500; }
.ccf-ticks li::before { content: "✓"; position: absolute; left: 0; top: .05rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--wp--preset--color--forest); color: var(--wp--preset--color--amber); font-size: .78rem; font-weight: 800; display: grid; place-items: center; }


/* ---------- split photo hero (home): copy on forest at left, photo fills the right half ---------- */
.ccf-hero-cover { padding: 0 !important; align-items: center; color: #fff; background: #1d3a33; }
.ccf-hero-cover .wp-block-cover__image-background { left: 50% !important; width: 50% !important; object-position: 100% 55%; }
.ccf-hero-cover .wp-block-cover__background { opacity: 1 !important; background:
	linear-gradient(90deg, #1d3a33 0%, #1d3a33 50%, rgba(29,58,51,.5) 53%, rgba(29,58,51,0) 60%) !important; }
.ccf-hero-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(36rem 22rem at 12% 90%, rgba(232,163,61,.14), transparent 70%); }
.ccf-hero-cover .wp-block-cover__inner-container { width: 100% !important; max-width: none !important; z-index: 2; }
.ccf-hero-wrap { max-width: 1180px; margin-inline: auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem); box-sizing: border-box; }
.ccf-hero-copy { max-width: min(34rem, calc(50vw - 6rem)); }
.ccf-hero-copy h1 { color: #fff; }
@media (max-width: 1100px) {
	.ccf-hero-cover { min-height: 0 !important; --band: clamp(17rem, 46vw, 30rem); }
	.ccf-hero-copy { max-width: 40rem; }
	.ccf-hero-cover .wp-block-cover__image-background { left: 0 !important; width: 100% !important; height: var(--band) !important; bottom: auto !important; object-position: 50% 55%; }
	.ccf-hero-cover .wp-block-cover__background { background:
		linear-gradient(180deg, rgba(29,58,51,0) 0, rgba(29,58,51,0) calc(var(--band) * .6), rgba(29,58,51,.9) calc(var(--band) * .92), #1d3a33 var(--band), #1d3a33 100%) !important; }
	.ccf-hero-wrap { padding-top: calc(var(--band) - 2rem); }
}

/* framed section photo (home study section) */
.ccf-photo-caption img { aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 30%; }

/* keep anchor targets clear of the sticky header */
[id] { scroll-margin-top: 90px; }

/* footer type colors (explicit, so they never depend on generated per-page rules) */
.ccf-footer { color: #c9d4cf; }
.ccf-footer h3.wp-block-heading { color: #ffffff !important; }
.ccf-footer h4.wp-block-heading { color: var(--wp--preset--color--amber) !important; }
.ccf-footer a { color: #e6ede9; }
.ccf-footer a:hover { color: var(--wp--preset--color--amber); }
.ccf-footer p.has-text-color { color: #9fb0a9 !important; }

/* footer bottom row: copyright + designer credit (quiet, NLCS-style) */
.ccf-footer-meta { gap: .6rem 2rem; }
.ccf-footer-meta p { margin: 0; }
.ccf-footer .ccf-copy { font-size: .82rem; color: #9fb0a9; }
.ccf-footer a.ccf-credit { display: inline-flex; align-items: center; gap: .55rem; font: 600 .68rem/1 var(--wp--preset--font-family--heading); letter-spacing: .18em; text-transform: uppercase; color: #7d918a; text-decoration: none; transition: color .2s; }
.ccf-footer a.ccf-credit::before { content: ""; width: 18px; height: 1px; background: var(--wp--preset--color--amber); opacity: .7; }
.ccf-footer a.ccf-credit span { color: #b5c4be; transition: color .2s; }
.ccf-footer a.ccf-credit:hover, .ccf-footer a.ccf-credit:hover span { color: var(--wp--preset--color--amber); }

/* embedded live stream (Dacast) and giving form (Subsplash) */
.ccf-embed { position: relative; width: 100%; overflow: hidden; }
.ccf-embed iframe { display: block; width: 100%; border: 0; }

/* Watch Live: player as large as the window allows, with green around it */
.ccf-live h1 { margin: .2rem 0 0; }
.ccf-live-times { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; justify-content: flex-end; color: #c9d4cf; font-size: 1.02rem; }
.ccf-live-times strong { color: var(--wp--preset--color--amber); font-weight: 700; margin-right: .3rem; }
.ccf-live-stage { width: min(100%, calc((100svh - 225px) * 16 / 9)); min-width: min(100%, 520px); margin: var(--wp--preset--spacing--40) auto 0; }
.ccf-embed-video { aspect-ratio: 16 / 9; background: #0b1512; border-radius: 16px; box-shadow: 0 30px 60px -28px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08); }
.ccf-embed-video iframe { position: absolute; inset: 0; height: 100%; }
.ccf-embed-video:fullscreen, .ccf-embed-video:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: #000; }
.ccf-live-note { margin: .9rem 0 0; color: #a9bdb5; font-size: .9rem; text-align: center; }
.ccf-fs-btn { display: inline-flex; align-items: center; gap: .5rem; font: 700 .92rem var(--wp--preset--font-family--heading); color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: .6rem 1.1rem; cursor: pointer; transition: border-color .15s, color .15s; }
.ccf-fs-btn svg { width: 1.15rem; height: 1.15rem; }
.ccf-fs-btn:hover { border-color: var(--wp--preset--color--amber); color: var(--wp--preset--color--amber); }
@media (max-width: 781px) { .ccf-live-times { justify-content: flex-start; } .ccf-live-stage { min-width: 0; } }

/* Give: the whole form visible at the top of the page */
.ccf-give h1 { margin: .2rem 0 1rem; }
.ccf-give-card { background: #fff; border-radius: 18px; padding: 1rem 1rem .9rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.ccf-embed-give iframe { height: 520px; }
.ccf-give-note { margin: .4rem .4rem 0; font-size: .8rem; color: var(--wp--preset--color--slate); text-align: center; }

@media (max-width: 781px) {
	/* phones: heading and verse, then the giving form, then the rest */
	.ccf-give .wp-block-columns { display: flex; flex-direction: column; }
	.ccf-give .wp-block-column { display: contents; }
	.ccf-give .wp-block-column > * { order: 1; }
	.ccf-give .ccf-give-card { order: 2; margin-bottom: 1rem; }
	.ccf-give .ccf-give-more { order: 3; }
	.ccf-give-card { padding: .6rem .4rem .7rem; }
}

/* off-site links (marked by site.js) */
.ccf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.ccf-ext::after { content: "\2197"; display: inline-block; margin-left: .2em; font-size: .8em; line-height: 1; text-decoration: none; opacity: .75; }

/* fold-out sections (core Details block, e.g. "How online giving works") */
.wp-block-details { border: 1px solid var(--wp--preset--color--line); border-radius: 12px; background: #fff; padding: 0 1.2rem; }
.wp-block-details summary { cursor: pointer; font-weight: 700; padding: .95rem 0; font-family: var(--wp--preset--font-family--heading); }
.wp-block-details summary:hover { color: var(--wp--preset--color--redwood); }
.wp-block-details[open] { padding-bottom: 1rem; }
.wp-block-details ol, .wp-block-details ul { padding-left: 1.3rem; }
.wp-block-details li { margin-bottom: .45rem; }

/* links page */
.ccf-links h2 { margin-top: 2.2rem; }
.ccf-linklist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--wp--preset--color--line); }
.ccf-linklist li { padding: .85rem 0; border-bottom: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--slate); }
.ccf-linklist li strong a { color: var(--wp--preset--color--ink); font-size: 1.05rem; }
.ccf-linklist li strong a:hover { color: var(--wp--preset--color--redwood); }

/* giving how-to under the Subsplash form (dark section) */
.ccf-give .wp-block-details.ccf-give-how { color: var(--wp--preset--color--ink); margin-top: 1rem; }
.ccf-give .ccf-give-how a { color: var(--wp--preset--color--redwood); }

/* Give: Bible verses as quotes, reference underneath */
.ccf-give .wp-block-quote.ccf-give-verse { border-left: 3px solid var(--wp--preset--color--amber); padding: .15rem 0 .15rem 1.1rem; margin: 1.6rem 0; }
.ccf-give .ccf-give-verse p { font-family: inherit; font-size: var(--wp--preset--font-size--medium); line-height: 1.6; color: #e6ede9; margin: 0; }
.ccf-give .ccf-give-verse cite { display: block; margin-top: .55rem; color: var(--wp--preset--color--amber); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-style: normal; }
/* phones: keep "How online giving works" right under the form */
@media (max-width: 781px) { .ccf-give .ccf-give-how { order: 2; } }
