/*
Theme Name:        Friends of the Sierra Madre Library
Theme URI:         https://sierramadrelibraryfriends.org/
Author:            Friends of the Sierra Madre Library
Description:       A standalone theme for the Friends of the Sierra Madre Library. No page builder or parent theme required. Features the library's front-door photo on the home page with current events right beneath it, image banners with titles placed on the page (never over the photo), accessible drop-down menus, editable home-page action cards, and block patterns for events and book reviews.
Version:           1.0.6
Requires at least: 6.4
Tested up to:      6.8
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       friends-library
Tags:              one-column, custom-header, custom-logo, custom-menu, featured-images, block-patterns, wide-blocks, accessibility-ready
*/

/* =========================================================================
   1. Tokens
   ========================================================================= */

:root {
	--fl-paper: #fbf8f2;
	--fl-paper-2: #f3ede1;
	--fl-white: #ffffff;
	--fl-ink: #1e2420;
	--fl-ink-soft: #4b544e;
	--fl-line: #e2dacb;
	--fl-green: #24453a;
	--fl-green-deep: #172e26;
	--fl-green-tint: #e5ece6;
	--fl-accent: #a8482a;      /* terracotta – 5.5:1 on white */
	--fl-accent-dark: #86371f;
	--fl-gold: #d9a441;

	--fl-serif: "Fraunces", Georgia, "Times New Roman", serif;
	--fl-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

	--fl-text: 760px;
	--fl-wide: 1160px;
	--fl-gutter: clamp(16px, 4vw, 40px);
	--fl-radius: 10px;
	--fl-shadow: 0 1px 2px rgba(23, 46, 38, .06), 0 8px 24px rgba(23, 46, 38, .08);
}

/* =========================================================================
   2. Base
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
	margin: 0;
	background: var(--fl-paper);
	color: var(--fl-ink);
	font-family: var(--fl-sans);
	font-size: clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }
/* Embedded frames keep the height they were given (height:auto collapses them). */
iframe { max-width: 100%; border: 0; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--fl-serif);
	font-weight: 600;
	line-height: 1.15;
	color: var(--fl-green-deep);
	margin: 1.6em 0 .5em;
	font-variation-settings: "SOFT" 50, "opsz" 72;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 3.6vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.8vw + 1rem, 2.25rem); }
h3 { font-size: clamp(1.3rem, 0.8vw + 1rem, 1.6rem); }
h4 { font-size: 1.2rem; }
h5, h6 { font-size: 1.05rem; font-family: var(--fl-sans); font-weight: 700; letter-spacing: 0; }

p, ul, ol, dl, blockquote, figure, table, pre { margin: 0 0 1.25em; }

a { color: var(--fl-accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--fl-accent-dark); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--fl-gold); outline-offset: 2px; border-radius: 3px; }

hr { border: 0; border-top: 1px solid var(--fl-line); margin: 2.5em 0; }

blockquote {
	margin-left: 0;
	padding: .25em 0 .25em 1.25em;
	border-left: 3px solid var(--fl-accent);
	font-family: var(--fl-serif);
	font-size: 1.15em;
	font-style: italic;
	color: var(--fl-green-deep);
}
blockquote cite { display: block; margin-top: .5em; font: normal .8em var(--fl-sans); color: var(--fl-ink-soft); }

table { width: 100%; border-collapse: collapse; font-size: .95em; }
th, td { padding: .6em .75em; border-bottom: 1px solid var(--fl-line); text-align: left; vertical-align: top; }
th { font-weight: 700; color: var(--fl-green-deep); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip: auto !important; clip-path: none; height: auto; width: auto; margin: 0;
	display: block; z-index: 100000; top: 8px; left: 8px; padding: 12px 20px;
	background: var(--fl-white); color: var(--fl-green-deep); font-weight: 700; box-shadow: var(--fl-shadow);
}

.fl-wrap { width: 100%; max-width: calc(var(--fl-wide) + 2 * var(--fl-gutter)); margin: 0 auto; padding: 0 var(--fl-gutter); }
.fl-narrow { max-width: calc(var(--fl-text) + 2 * var(--fl-gutter)); }

/* Buttons --------------------------------------------------------------- */

.fl-button,
.wp-block-button__link,
input[type="submit"], button[type="submit"] {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .7em 1.35em;
	border: 2px solid var(--fl-accent);
	border-radius: 999px;
	background: var(--fl-accent);
	color: var(--fl-white);
	font: 700 1rem/1.2 var(--fl-sans);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.fl-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover, button[type="submit"]:hover {
	background: var(--fl-accent-dark); border-color: var(--fl-accent-dark); color: var(--fl-white); text-decoration: none;
}
.fl-button--ghost,
.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--fl-accent);
}
.fl-button--ghost:hover,
.is-style-outline > .wp-block-button__link:hover { background: var(--fl-accent); color: var(--fl-white); }

/* Forms ------------------------------------------------------------------ */

input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="search"], input[type="number"], input[type="password"], textarea, select {
	width: 100%; padding: .65em .8em;
	border: 1px solid #c9c0ad; border-radius: 8px;
	background: var(--fl-white); color: var(--fl-ink);
	font: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--fl-green); outline: 3px solid rgba(217, 164, 65, .5); outline-offset: 0; }

.search-form { display: flex; gap: .5em; }
.search-form label { flex: 1; }

/* =========================================================================
   3. Header
   ========================================================================= */

.fl-topbar {
	background: var(--fl-green-deep);
	color: #dfe7e1;
	font-size: .9rem;
}
.fl-topbar .fl-wrap {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: .25em 1.5em; padding-top: .5em; padding-bottom: .5em;
}
.fl-topbar a { color: var(--fl-white); text-decoration: none; }
.fl-topbar a:hover { text-decoration: underline; color: var(--fl-white); }
.fl-topbar__info { display: flex; flex-wrap: wrap; gap: .25em 1.5em; }

.fl-header {
	background: var(--fl-white);
	border-bottom: 1px solid var(--fl-line);
	position: relative;
	z-index: 50;
}
.fl-header .fl-wrap {
	display: flex; align-items: center; justify-content: space-between; gap: 1.5em;
}

/* Logo -------------------------------------------------------------------
   The logo is sized by height (Customize > Site Identity > Logo height),
   and its width follows the logo's own shape, so it is never squashed or
   cut off. It never grows wider than the space available.               */

.fl-brand {
	flex: 0 0 auto;
	display: flex; align-items: center; gap: .9em;
	min-width: 0; max-width: 100%;
	padding: .8em 0;
	text-decoration: none;
}
.fl-brand .custom-logo {
	display: block;
	height: var(--fl-logo-h, 80px);
	width: auto;
	max-width: min(380px, 62vw);
	object-fit: contain;
	object-position: left center;
}
.fl-brand__text { display: flex; flex-direction: column; }
.fl-brand__name {
	font-family: var(--fl-serif); font-weight: 600; font-size: 1.35rem; line-height: 1.1; color: var(--fl-green-deep);
}
.fl-brand__tag { font-size: .85rem; color: var(--fl-ink-soft); }
.fl-brand:hover .fl-brand__name { color: var(--fl-accent); }

/* Navigation -------------------------------------------------------------
   Full menu when it fits on one line beside the logo. When it doesn't
   (narrow screens, a wide logo, a long menu), navigation.js adds
   .fl-compact to <html> and the menu becomes a "Menu" button.          */

.fl-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }

.fl-nav__toggle {
	display: none;
	align-items: center; gap: .5em;
	padding: .55em 1em;
	border: 1px solid var(--fl-line); border-radius: 999px;
	background: var(--fl-white); color: var(--fl-green-deep);
	font: 700 1rem var(--fl-sans); cursor: pointer;
	white-space: nowrap;
}
.fl-nav__toggle-bars, .fl-nav__toggle-bars::before, .fl-nav__toggle-bars::after {
	display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
	transition: transform .2s, opacity .2s;
}
.fl-nav__toggle-bars::before, .fl-nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.fl-nav__toggle-bars::before { top: -6px; }
.fl-nav__toggle-bars::after { top: 6px; }
.fl-nav__toggle[aria-expanded="true"] .fl-nav__toggle-bars { background: transparent; }
.fl-nav__toggle[aria-expanded="true"] .fl-nav__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.fl-nav__toggle[aria-expanded="true"] .fl-nav__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.fl-menu, .fl-menu ul { list-style: none; margin: 0; padding: 0; }
.fl-menu li { position: relative; }
.fl-menu a {
	display: block; padding: .55em .7em; border-radius: 8px;
	color: var(--fl-ink); text-decoration: none; font-weight: 700; font-size: 1rem; line-height: 1.3;
}
.fl-menu > li > a:hover,
.fl-menu > li.current-menu-item > a,
.fl-menu > li.current-menu-ancestor > a { color: var(--fl-accent); }

.fl-menu .menu-item-has-children { display: flex; align-items: center; flex-wrap: wrap; }
.fl-menu .menu-item-has-children > a { padding-right: .2em; }

.fl-submenu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 28px; margin-right: .15em; padding: 0;
	border: 0; border-radius: 6px; background: transparent; color: var(--fl-ink-soft); cursor: pointer;
}
.fl-submenu-toggle:hover { background: var(--fl-paper-2); color: var(--fl-accent); }
.fl-submenu-toggle svg { width: 12px; height: 12px; transition: transform .2s; }
.fl-submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* The CTA (Donate) item added by the theme */
.fl-menu .fl-menu-cta a {
	background: var(--fl-accent); color: var(--fl-white); border-radius: 999px; padding: .6em 1.2em; box-shadow: none;
}
.fl-menu .fl-menu-cta a:hover { background: var(--fl-accent-dark); color: var(--fl-white); }

/* Full (desktop) menu */
html:not(.fl-compact) .fl-menu { display: flex; align-items: center; gap: .1em; flex-wrap: nowrap; justify-content: flex-end; }
html:not(.fl-compact) .fl-menu > li { flex: 0 0 auto; flex-wrap: nowrap; }
html:not(.fl-compact) .fl-menu > li > a { white-space: nowrap; }
html:not(.fl-compact) .fl-menu > li.current-menu-item > a,
html:not(.fl-compact) .fl-menu > li.current-menu-ancestor > a { box-shadow: inset 0 -2px 0 var(--fl-accent); border-radius: 0; }
html:not(.fl-compact) .fl-menu .fl-menu-cta { margin-left: .5em; }
html:not(.fl-compact) .fl-menu .sub-menu {
	position: absolute; top: 100%; left: 0;
	min-width: 250px; padding: .5em;
	background: var(--fl-white); border: 1px solid var(--fl-line); border-radius: var(--fl-radius);
	box-shadow: var(--fl-shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility 0s .15s;
	z-index: 10;
}
html:not(.fl-compact) .fl-menu .sub-menu .sub-menu { top: -.5em; left: 100%; }
html:not(.fl-compact) .fl-menu > li:last-child .sub-menu,
html:not(.fl-compact) .fl-menu > li:nth-last-child(2) .sub-menu,
html:not(.fl-compact) .fl-menu > li:nth-last-child(3) .sub-menu { left: auto; right: 0; }
html:not(.fl-compact) .fl-menu > li:last-child .sub-menu .sub-menu,
html:not(.fl-compact) .fl-menu > li:nth-last-child(2) .sub-menu .sub-menu,
html:not(.fl-compact) .fl-menu > li:nth-last-child(3) .sub-menu .sub-menu { left: auto; right: 100%; }
html:not(.fl-compact) .fl-menu li:hover > .sub-menu,
html:not(.fl-compact) .fl-menu li:focus-within > .sub-menu,
html:not(.fl-compact) .fl-menu li.is-open > .sub-menu {
	opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s;
}
html:not(.fl-compact) .fl-menu .sub-menu li { width: 100%; justify-content: space-between; }
html:not(.fl-compact) .fl-menu .sub-menu a { font-weight: 400; flex: 1; }
html:not(.fl-compact) .fl-menu .sub-menu a:hover { background: var(--fl-paper); color: var(--fl-accent); }
html:not(.fl-compact) .fl-menu .sub-menu .current-menu-item > a { color: var(--fl-accent); font-weight: 700; }
html:not(.fl-compact) .fl-menu .sub-menu .fl-submenu-toggle svg { transform: rotate(-90deg); }

/* Compact menu ("Menu" button) */
.fl-compact .fl-brand .custom-logo { height: min(var(--fl-logo-h, 80px), 64px); }
.fl-compact .fl-nav__toggle { display: inline-flex; }
.fl-compact .fl-nav__panel { display: none; }
.fl-compact .fl-nav.is-open .fl-nav__panel {
	display: block;
	position: absolute; left: 0; right: 0; top: 100%;
	background: var(--fl-white); border-bottom: 1px solid var(--fl-line);
	box-shadow: 0 16px 32px rgba(23, 46, 38, .12);
	padding: .5em var(--fl-gutter) 1.25em;
	max-height: calc(100vh - 120px); overflow-y: auto;
}
.fl-compact .fl-menu { display: block; max-width: var(--fl-wide); margin: 0 auto; }
.fl-compact .fl-menu li { border-bottom: 1px solid var(--fl-paper-2); }
.fl-compact .fl-menu li:last-child { border-bottom: 0; }
.fl-compact .fl-menu a { padding: .8em .25em; flex: 1; }
.fl-compact .fl-submenu-toggle { width: 44px; height: 44px; }
.fl-compact .fl-menu .sub-menu { width: 100%; padding-left: 1em; display: none; }
.fl-compact .fl-menu li.is-open > .sub-menu { display: block; }
.fl-compact .fl-menu .sub-menu a { font-weight: 400; }
.fl-compact .fl-menu .fl-menu-cta { margin: 1em 0 0; border: 0; }
.fl-compact .fl-menu .fl-menu-cta a { display: inline-block; padding: .7em 1.4em; }

/* Without JavaScript on a small screen, the full menu simply wraps. */
@media (max-width: 960px) {
	.no-js .fl-header .fl-wrap { flex-wrap: wrap; }
	.no-js .fl-menu { flex-wrap: wrap !important; justify-content: flex-start !important; }
}

/* =========================================================================
   4. Home page
   ========================================================================= */

.fl-hero { position: relative; background: var(--fl-green); }
.fl-hero__media { margin: 0; }
.fl-hero__media img {
	display: block; width: 100%;
	height: clamp(220px, 38vh, 420px);
	object-fit: cover;
	object-position: var(--fl-focus, 50% 50%);
}
.fl-hero--tall .fl-hero__media img { height: clamp(300px, 58vh, 640px); }

/* Slim terracotta band under the photo, with the phrase in a quiet italic */
.fl-hero__caption {
	background: var(--fl-accent);
	color: var(--fl-paper);
}
.fl-hero__caption .fl-wrap { padding-top: .6em; padding-bottom: .65em; text-align: center; }
.fl-hero__phrase {
	margin: 0;
	font-family: var(--fl-serif);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(1.05rem, 0.6vw + .9rem, 1.3rem);
	line-height: 1.35;
	letter-spacing: .02em;
	color: inherit;
}

.fl-hero--empty .fl-hero__placeholder {
	height: clamp(220px, 38vh, 420px);
	display: grid; place-items: center; text-align: center;
	color: #dfe7e1; padding: 2em;
	background:
		repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 22px, transparent 22px 30px),
		linear-gradient(180deg, var(--fl-green) 0%, var(--fl-green-deep) 100%);
}
.fl-hero__placeholder a { color: var(--fl-white); }

.fl-eyebrow {
	display: inline-block; margin: 0 0 1em;
	font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fl-accent);
}

/* Events (main column) + Be a Friend panel (side column) */
.fl-home-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
	padding-top: clamp(28px, 4vw, 48px);
	padding-bottom: clamp(40px, 5vw, 64px);
}
.fl-home-now .fl-eyebrow { margin-bottom: .6em; }
.fl-home-now .entry-content { padding-top: 0; }
.fl-home-now .entry-content > *,
.fl-home-now .entry-content > .alignwide,
.fl-home-now .entry-content > .alignfull { max-width: none; width: auto; margin-left: 0; margin-right: 0; }
.fl-home-now .entry-content > .alignleft { margin-left: 0; }
.fl-home-now .entry-content > .alignright { margin-right: 0; }
.fl-home-now .entry-content > h1:first-child,
.fl-home-now .entry-content > h2:first-child { margin-top: 0; }
.fl-grid--two { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.fl-friend-panel {
	position: sticky; top: 1.5rem;
	padding: 1.6em 1.5em 1.5em;
	background: var(--fl-white);
	border: 1px solid var(--fl-line);
	border-top: 4px solid var(--fl-green);
	border-radius: var(--fl-radius);
	box-shadow: var(--fl-shadow);
}
.fl-friend-panel h2 { margin: 0 0 .5em; font-size: 1.55rem; }
.fl-friend-panel__text { margin: 0 0 1em; font-size: .95em; color: var(--fl-ink-soft); line-height: 1.55; }
.fl-friend-panel__list { list-style: none; margin: 0 0 1.25em; padding: 0; border-top: 1px solid var(--fl-line); }
.fl-friend-panel__list li { border-bottom: 1px solid var(--fl-line); }
.fl-friend-panel__list a,
.fl-friend-panel__list li > div {
	display: flex; gap: .8em; align-items: flex-start;
	padding: .75em .25em;
	color: var(--fl-ink); text-decoration: none;
}
.fl-friend-panel__list strong { display: block; font-weight: 700; color: var(--fl-green-deep); line-height: 1.3; }
.fl-friend-panel__list small { display: block; font-size: .85rem; color: var(--fl-ink-soft); line-height: 1.4; margin-top: .15em; }
.fl-friend-panel__list a:hover strong { color: var(--fl-accent); }
.fl-friend-panel__list a:hover { background: var(--fl-paper); }
.fl-friend-panel__icon {
	flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
	background: var(--fl-green-tint); color: var(--fl-green);
}
.fl-friend-panel__icon svg { width: 18px; height: 18px; }
.fl-friend-panel__button { width: 100%; justify-content: center; }
.fl-friend-panel__link { display: block; margin-top: .85em; text-align: center; font-weight: 700; text-decoration: none; }
.fl-friend-panel__link:hover { text-decoration: underline; }

.fl-section { padding: clamp(48px, 6vw, 88px) 0; }
.fl-section--news { background: var(--fl-paper-2); border-top: 1px solid var(--fl-line); }
.fl-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin-bottom: 1.75em; }
.fl-section__head h2 { margin: 0; }

@media (max-width: 900px) {
	.fl-home-grid { grid-template-columns: 1fr; }
	.fl-friend-panel { position: static; }
}

/* =========================================================================
   5. Page banner + title (title sits on the page, below the image)
   ========================================================================= */

.fl-banner { margin: 0; background: var(--fl-green); }
.fl-banner img {
	display: block; width: 100%;
	height: clamp(200px, 34vh, 400px);
	object-fit: cover;
	object-position: var(--fl-focus, 50% 50%);
}

.fl-page-head { padding: clamp(36px, 5vw, 64px) 0 0; }
.fl-page-head h1 { margin: 0; }
.fl-page-head .fl-eyebrow { margin-bottom: .75em; }
.fl-page-head .fl-eyebrow a { color: inherit; text-decoration: none; }
.fl-page-head .fl-eyebrow a:hover { text-decoration: underline; }
.fl-page-head__rule { width: 72px; height: 3px; margin: 1.25em 0 0; border: 0; background: var(--fl-gold); }
.fl-page-head__desc { margin-top: 1em; color: var(--fl-ink-soft); }
.fl-page-head__desc > :last-child { margin-bottom: 0; }


/* =========================================================================
   6. Content
   ========================================================================= */

.fl-main { padding-bottom: clamp(56px, 7vw, 96px); }

.entry-content { padding-top: clamp(28px, 4vw, 44px); }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > * { max-width: var(--fl-text); margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--fl-wide); }
.entry-content > .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { margin-top: 1.75em; }

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content > .alignleft, .entry-content > .alignright { max-width: 50%; }
.entry-content > .alignleft { margin-left: max(0px, calc((100% - var(--fl-text)) / 2)); }
.entry-content > .alignright { margin-right: max(0px, calc((100% - var(--fl-text)) / 2)); }

.entry-content img { border-radius: 6px; }
.wp-caption, figcaption, .wp-element-caption { font-size: .85rem; color: var(--fl-ink-soft); margin-top: .5em; }
.wp-caption { max-width: 100%; }

.wp-block-separator { border-top-width: 1px; }
.wp-block-pullquote { border-color: var(--fl-accent); }
.wp-block-button { margin: 0; }
.wp-block-buttons { margin-bottom: 1.25em; }
.wp-block-cover, .wp-block-image img, .wp-block-media-text__media img { border-radius: 8px; }

/* Older page-builder output degrades gracefully */
.entry-content .elementor-section,
.entry-content .elementor-container,
.entry-content .elementor-widget-wrap { display: block; }

.page-links { clear: both; margin: 2em auto; max-width: var(--fl-text); }


/* =========================================================================
   7. Post cards / archives
   ========================================================================= */

.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: clamp(20px, 2.5vw, 32px); }
.fl-archive-body { padding-top: clamp(28px, 4vw, 44px); }

.fl-post-card {
	display: flex; flex-direction: column;
	background: var(--fl-white); border: 1px solid var(--fl-line); border-radius: var(--fl-radius); overflow: hidden;
	transition: box-shadow .15s, transform .15s;
}
.fl-post-card:hover { box-shadow: var(--fl-shadow); transform: translateY(-2px); }
.fl-post-card__media { display: block; aspect-ratio: 3 / 2; background: var(--fl-green-tint); overflow: hidden; }
.fl-post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.fl-post-card__media--empty { display: grid; place-items: center; color: var(--fl-green); }
.fl-post-card__media--empty svg { width: 44px; height: 44px; opacity: .55; }
.fl-post-card__body { padding: 1.25em 1.35em 1.5em; display: flex; flex-direction: column; flex: 1; }
.fl-post-card__title { font-size: 1.3rem; margin: 0 0 .5em; }
.fl-post-card__title a { color: var(--fl-green-deep); text-decoration: none; }
.fl-post-card__title a::after { content: ""; position: absolute; inset: 0; }
.fl-post-card { position: relative; }
.fl-post-card__title a:hover { color: var(--fl-accent); }
.fl-post-card__excerpt { font-size: .95em; color: var(--fl-ink-soft); margin: 0; }
.fl-post-card__excerpt p { margin: 0; }

.fl-pagination { margin-top: 3em; }
.fl-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4em; justify-content: center; }
.fl-pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .8em;
	border: 1px solid var(--fl-line); border-radius: 999px; background: var(--fl-white);
	color: var(--fl-ink); text-decoration: none; font-weight: 700;
}
.fl-pagination .page-numbers.current { background: var(--fl-green); border-color: var(--fl-green); color: var(--fl-white); }
.fl-pagination a.page-numbers:hover { border-color: var(--fl-accent); color: var(--fl-accent); }

.fl-empty { text-align: center; padding: 2em 0; }
.fl-empty .search-form { max-width: 480px; margin: 1.5em auto 0; }

/* =========================================================================
   8. Comments (rarely used, but tidy)
   ========================================================================= */

.comments-area { max-width: var(--fl-text); margin: 3em auto 0; padding-top: 2em; border-top: 1px solid var(--fl-line); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5em; }
.comment-body { padding: 1em 0; border-bottom: 1px solid var(--fl-line); }
.comment-meta { font-size: .9rem; color: var(--fl-ink-soft); }
.comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: .5em; }

/* =========================================================================
   9. Footer
   ========================================================================= */

.fl-footer { background: var(--fl-green-deep); color: #cfdad2; font-size: .98rem; }
.fl-footer a { color: var(--fl-white); }
.fl-footer a:hover { color: var(--fl-gold); }
.fl-footer__grid {
	display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(28px, 4vw, 64px);
	padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(36px, 5vw, 56px);
}
.fl-footer h2, .fl-footer .widget-title {
	color: var(--fl-white); font-size: 1.2rem; margin: 0 0 .9em;
}
.fl-footer__name { font-family: var(--fl-serif); font-size: 1.5rem; color: var(--fl-white); line-height: 1.2; margin: 0 0 .6em; }
.fl-footer address { font-style: normal; margin-bottom: 1em; }
.fl-footer ul { list-style: none; margin: 0; padding: 0; }
.fl-footer li { margin: 0 0 .5em; }
.fl-footer li a { text-decoration: none; }
.fl-footer li a:hover { text-decoration: underline; }
.fl-footer .widget { margin-bottom: 1.5em; }
.fl-footer .fl-button { margin-top: .5em; }
.fl-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; color: #a9bab0; }
.fl-footer__bottom .fl-wrap { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; padding-top: 1.25em; padding-bottom: 1.25em; }
.fl-footer__bottom a { color: #dfe7e1; }

.fl-to-top {
	position: fixed; right: 18px; bottom: 18px; z-index: 40;
	display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
	background: var(--fl-green); color: var(--fl-white); box-shadow: var(--fl-shadow);
	opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
}
.fl-to-top.is-visible { opacity: 1; visibility: visible; transition: opacity .2s; }
.fl-to-top:hover { background: var(--fl-accent); color: var(--fl-white); }
.fl-to-top svg { width: 18px; height: 18px; }

/* =========================================================================
   10. Responsive
   ========================================================================= */

@media (max-width: 900px) {
	.fl-footer__grid { grid-template-columns: 1fr 1fr; }
	.fl-footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
	.fl-topbar__info span:not(:first-child) { display: none; }
	.fl-footer__grid { grid-template-columns: 1fr; }
			.alignleft, .alignright, .entry-content > .alignleft, .entry-content > .alignright { float: none; max-width: 100%; margin-left: auto; margin-right: auto; }
}

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

@media print {
	.fl-topbar, .fl-nav, .fl-footer, .fl-to-top, .fl-banner, .fl-hero { display: none; }
	body { background: #fff; }
}

/* Breathing room after boxed blocks (event details, call to action) */
.entry-content > .wp-block-group,
.entry-content > .wp-block-cover,
.entry-content > .wp-block-media-text { margin-bottom: 1.5em; }

/* =========================================================================
   Link colors, locked for every state
   -------------------------------------------------------------------------
   Visited, hover, focus and active links always use the theme palette, so
   colors left over from other tools (e.g. a page builder's global "accent"
   color) can never show up in the menu or footer.
   ========================================================================= */

a:visited { color: var(--fl-accent); }

.fl-header .fl-menu a,
.fl-header .fl-menu a:visited,
.fl-header .fl-menu a:active { color: var(--fl-ink); background-color: transparent; }

.fl-header .fl-menu a:hover,
.fl-header .fl-menu a:focus-visible,
.fl-header .fl-menu .current-menu-item > a,
.fl-header .fl-menu .current-menu-item > a:visited,
.fl-header .fl-menu .current-menu-ancestor > a,
.fl-header .fl-menu .current-menu-ancestor > a:visited,
.fl-header .fl-menu .current_page_item > a,
.fl-header .fl-menu .current_page_ancestor > a { color: var(--fl-accent); }

.fl-header .fl-menu .sub-menu a:hover,
.fl-header .fl-menu .sub-menu a:focus-visible { background-color: var(--fl-paper); }

.fl-header .fl-menu .fl-menu-cta a,
.fl-header .fl-menu .fl-menu-cta a:visited,
.fl-header .fl-menu .fl-menu-cta a:active { color: var(--fl-white); background-color: var(--fl-accent); }
.fl-header .fl-menu .fl-menu-cta a:hover,
.fl-header .fl-menu .fl-menu-cta a:focus-visible { color: var(--fl-white); background-color: var(--fl-accent-dark); }

.fl-header .fl-brand,
.fl-header .fl-brand:visited { color: inherit; }

.fl-topbar a, .fl-topbar a:visited,
.fl-footer a, .fl-footer a:visited { color: var(--fl-white); }
.fl-footer a:hover, .fl-footer a:focus-visible { color: var(--fl-gold); }
.fl-footer__bottom a, .fl-footer__bottom a:visited { color: #dfe7e1; }

.fl-button, .fl-button:visited,
.wp-block-button__link, .wp-block-button__link:visited { color: var(--fl-white); }
.fl-button--ghost, .fl-button--ghost:visited,
.is-style-outline > .wp-block-button__link:not(.has-text-color),
.is-style-outline > .wp-block-button__link:not(.has-text-color):visited { color: var(--fl-accent); }
.fl-button--ghost:hover { color: var(--fl-white); }

.fl-post-card__title a, .fl-post-card__title a:visited,
.fl-friend-panel__list a, .fl-friend-panel__list a:visited { color: inherit; }
.fl-post-card__title a { color: var(--fl-green-deep); }
.fl-post-card__title a:hover { color: var(--fl-accent); }

.fl-submenu-toggle:hover, .fl-submenu-toggle:focus-visible { color: var(--fl-accent); }
.fl-submenu-toggle:active { background: var(--fl-paper-2); }

/* Mobile: no colored flash when tapping a menu item */
.fl-menu a, .fl-submenu-toggle, .fl-nav__toggle { -webkit-tap-highlight-color: transparent; }

/* Focus rings: none after a mouse click or tap (so no colored box appears
   around a menu item you just used), a clear gold ring for keyboard users. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.fl-header a:focus:not(:focus-visible),
.fl-header button:focus:not(:focus-visible) { outline: none; }

.fl-header a:focus-visible,
.fl-header button:focus-visible,
.fl-footer a:focus-visible { outline: 3px solid var(--fl-gold); outline-offset: 2px; }
body a:focus-visible,
body button:focus-visible,
body [tabindex]:focus-visible { outline: 3px solid var(--fl-gold); outline-offset: 2px; }
.fl-header .fl-menu li a:focus-visible,
.fl-header .fl-menu li button:focus-visible { outline: 3px solid var(--fl-gold); outline-offset: 2px; }
.fl-header .fl-menu li a:focus:not(:focus-visible) { outline: none; }

/* =========================================================================
   Embeds: Google Calendar
   ========================================================================= */

/* Full width of the page (wider than the text column) and tall enough to
   show a whole month without scrolling inside the frame. */
.entry-content > :has(iframe[src*="calendar.google.com"]),
.entry-content > iframe[src*="calendar.google.com"] { max-width: var(--fl-wide); }

.entry-content iframe[src*="calendar.google.com"] {
	display: block;
	width: 100% !important;
	height: clamp(640px, 82vh, 900px) !important;
	border: 1px solid var(--fl-line) !important;
	border-radius: var(--fl-radius);
	background: var(--fl-white);
}
/* Phones switch to the list (agenda) view, see embeds.js */
@media (max-width: 640px) {
	.entry-content iframe[src*="calendar.google.com"] { height: 75vh !important; min-height: 520px; }
}

/* =========================================================================
   "Form first, text below" page template (used by the Donate page)
   ========================================================================= */

.fl-formfirst .entry-content { padding-top: 0; }
.fl-formfirst { padding-top: clamp(28px, 4vw, 44px); }
.fl-formfirst__form { margin-bottom: clamp(32px, 4vw, 48px); }
.fl-formfirst__form > :first-child { margin-top: 0; }
.fl-formfirst__form p:empty { display: none; }
.fl-formfirst iframe { display: block; width: 100%; margin-left: auto; margin-right: auto; }
.fl-formfirst__text { border-top: 1px solid var(--fl-line); padding-top: clamp(28px, 4vw, 40px) !important; }

/* Forms added later by a donation service's script are lifted to the top
   (see embeds.js): the wrappers become simple columns and the part holding
   the form is shown first. Nothing is moved, so the form never reloads. */
.fl-formfirst .fl-col { display: flex; flex-direction: column; }
.fl-formfirst .fl-col > * { flex: 0 0 auto; width: 100%; }
.fl-formfirst .fl-first { order: -1; }
.fl-formfirst__text.fl-col > .fl-first { margin-bottom: clamp(32px, 4vw, 48px); }
.fl-formfirst__text.fl-has-late-form { border-top: 0; padding-top: 0 !important; }

