/* Site-wide chrome: header/logo/nav, footer, before/after-agenda content
   blocks, and the Posts listing + single-post pages. Uses the same
   --fl-primary/--fl-secondary variables set inline by includes/theme.php
   (falls back to the plugin's default green if they are not set). */

/* Font: Arial (a standard system font on virtually every device) instead
   of a self-hosted webfont — this means zero font file downloads and zero
   extra network requests for text to render, which is the best possible
   result for page-speed. */

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: Arial, Helvetica, sans-serif;
	background: var(--fl-bg, #f4f5f4);
	color: #1f2a24;
	font-weight: var(--fl-body-weight, 400);
	font-size: var(--fl-body-size, 16px);
}

main { display: block; }

/* Admin-configurable heading colors (Appearance settings) — each level
   (h1/h2/h3/h4) has its own color. The site's own brand/UI text (site
   title, buttons) is not affected, only actual content headings (post
   titles, headings inside custom HTML blocks, channels section title). */
h1 { color: var(--fl-h1, #1f2a24); }
h2 { color: var(--fl-h2, #1f2a24); }
h3 { color: var(--fl-h3, #1f2a24); }
h4 { color: var(--fl-h4, #1f2a24); }

.page-wrap {
	max-width: var(--fl-max-width, 900px);
	margin: 0 auto;
	padding: 0 16px 40px;
}

.site-header {
	background: #fff;
	border-bottom: 1px solid rgba(0,0,0,0.06);
	margin-bottom: 24px;
}
.site-header-inner {
	max-width: var(--fl-max-width, 900px);
	margin: 0 auto;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.site-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}
.site-logo { height: 36px; width: auto; display: block; border-radius: 4px; }
.site-title { font-weight: 800; font-size: var(--fl-title-size, 19px); color: var(--fl-primary-safe, #3b7621); letter-spacing: 0.2px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
	color: var(--fl-primary-safe, #3b7621);
	text-decoration: none;
	font-weight: var(--fl-menu-weight, 600);
	font-size: var(--fl-menu-size, 14px);
	padding: 8px 10px;
}
.site-nav a:hover,
.site-nav a.active {
	color: var(--fl-secondary-safe, #397522);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.agenda-extra {
	max-width: var(--fl-max-width, 900px);
	margin: 0 auto 18px;
	color: #333;
	font-size: var(--fl-body-size, 16px);
	line-height: 1.6;
}
.agenda-extra img { max-width: 100%; height: auto; }
/* Any <a> link pasted into the before/after-agenda custom HTML uses the
   site's primary color instead of the browser's default blue/underline,
   so the whole site's look stays consistent. */
.agenda-extra a { color: var(--fl-primary-safe, #3b7621); text-decoration: underline; }
.agenda-extra a:hover { color: var(--fl-secondary-safe, #397522); }

.site-footer {
	margin-top: 40px;
	border-top: 1px solid rgba(0,0,0,0.06);
	padding: 18px 16px;
	text-align: center;
	color: #888;
	font-size: 13px;
}
.site-footer-social { display: flex; justify-content: center; gap: 18px; margin-bottom: 8px; }
.site-footer-social a { color: var(--fl-primary-safe, #3b7621); text-decoration: none; font-weight: 600; font-size: 13px; }
.site-footer-social a:hover { text-decoration: underline; }

/* Channels showcase section */
.channels-section { margin: 36px 0; }
.channels-section-title { text-align: center; font-size: 24px; font-weight: 800; color: #1f2a24; margin: 0 0 24px; }
.channels-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.channel-card {
	background: #fff;
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 3px 12px rgba(0,0,0,0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.channel-card:hover {
	transform: scale(1.04);
	box-shadow: 0 12px 26px rgba(0,0,0,0.16);
}
.channel-card-image { background: #f3f4f3; height: var(--fl-channel-img-height, 150px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.channel-card-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.channel-card-body { padding: 16px 18px 20px; text-align: center; flex: 1; display: flex; flex-direction: column; }
.channel-card-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: #1f2a24; }
.channel-card-desc { font-size: 13px; color: #666; line-height: 1.5; margin: 0 0 16px; flex: 1; }
.channel-card-btn { display: inline-block; background: var(--fl-secondary-safe, #397522); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; padding: 10px 22px; border-radius: 24px; align-self: center; }
.channel-card-btn:hover { background: var(--fl-primary-safe, #3b7621); }

/* Homepage FAQ section (optional, admin turns it on in Content > FAQs) */
.faqs-section { margin: 36px 0; }
.faqs-section-title { text-align: center; font-size: 24px; font-weight: 800; color: #1f2a24; margin: 0 0 24px; }
.faqs-list { display: flex; flex-direction: column; gap: 10px; max-width: 800px; margin: 0 auto; }
.faq-item {
	background: #fff;
	border: 1px solid rgba(0,0,0,0.08);
	border-radius: 10px;
	padding: 4px 18px;
}
.faq-question {
	cursor: pointer;
	list-style: none;
	padding: 14px 0;
	font-weight: 700;
	font-size: 15px;
	color: #1f2a24;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::before { content: '+'; display: inline-block; width: 18px; color: var(--fl-primary-safe, #3b7621); font-weight: 800; }
.faq-item[open] .faq-question::before { content: '\2212'; }
.faq-answer { padding: 0 0 16px 18px; color: #555; font-size: 14px; line-height: 1.6; }

/* Posts listing */
.posts-list { list-style: none; margin: 0; padding: 0; }
.posts-list li {
	background: #fff;
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 12px;
}
.posts-list a.post-title {
	font-size: 17px;
	font-weight: 700;
	color: #1f2a24;
	text-decoration: none;
}
.posts-list a.post-title:hover { color: var(--fl-primary-safe, #3b7621); }
.posts-list .post-date { color: #888; font-size: 13px; margin-top: 4px; }
.posts-empty { color: #777; padding: 30px 0; text-align: center; }

/* Single post */
.post-article h1 { font-size: 26px; margin: 0 0 6px; }
.post-article .post-date { color: #888; font-size: 13px; margin-bottom: 20px; }
.post-article .post-content { font-size: var(--fl-body-size, 16px); line-height: 1.7; color: #232323; }
.post-article .post-content img { max-width: 100%; height: auto; }
.post-article .post-content a { color: var(--fl-primary-safe, #3b7621); text-decoration: underline; }
.post-article .post-content a:hover { color: var(--fl-secondary-safe, #397522); }
.post-back { display: inline-block; margin-bottom: 18px; color: var(--fl-secondary-safe, #397522); text-decoration: none; font-weight: 600; font-size: 14px; }
.post-back:hover { text-decoration: underline; }

/* Video iframe shown BEFORE the article content (e.g. a YouTube embed) */
.post-iframe-wrap {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	margin: 0 0 22px;
	border-radius: 10px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.post-iframe-wrap iframe {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	border: 0;
}

/* Breadcrumbs (visible trail + matching JSON-LD schema in the page head) */
.breadcrumbs { max-width: var(--fl-max-width, 900px); margin: 0 auto 14px; }
.breadcrumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: #777;
}
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li + li::before { content: '/'; margin: 0 8px; color: #bbb; }
.breadcrumbs a { color: var(--fl-primary-safe, #3b7621); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span[aria-current] { color: #777; font-weight: 600; }

/* Admin-configurable ad slots — no fixed look is imposed (whatever code
   the admin pastes is shown as-is), just consistent position/spacing so
   the layout never breaks. */
.ad-slot { max-width: var(--fl-max-width, 900px); margin: 18px auto; text-align: center; overflow: hidden; }

/* Category archive + static page listing/content (category.php, page.php) */
.archive-header { max-width: var(--fl-max-width, 900px); margin: 0 auto 20px; }
.archive-title { font-size: 26px; margin: 0 0 6px; }
.archive-desc { color: #555; font-size: var(--fl-body-size, 16px); line-height: 1.6; }
.static-page-content { font-size: var(--fl-body-size, 16px); line-height: 1.7; color: #232323; }
.static-page-content img { max-width: 100%; height: auto; }
.static-page-content a { color: var(--fl-primary-safe, #3b7621); text-decoration: underline; }
.static-page-content a:hover { color: var(--fl-secondary-safe, #397522); }

/* Enhanced 404 page */
.error-404-card {
	max-width: 460px;
	margin: 60px auto;
	text-align: center;
	background: #fff;
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 16px;
	padding: 48px 32px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.error-404-code { font-size: 64px; font-weight: 800; color: var(--fl-primary-safe, #3b7621); line-height: 1; margin-bottom: 12px; }
.error-404-message { font-size: 16px; color: #444; margin: 0 0 26px; line-height: 1.5; }
.error-404-btn {
	display: inline-block;
	background: var(--fl-primary-safe, #3b7621);
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 30px;
	border-radius: 8px;
}
.error-404-btn:hover { background: var(--fl-secondary-safe, #397522); }

@media (max-width: 860px) {
	.channels-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
	.site-logo { height: 30px; }
	.site-nav a { padding: 7px 10px; }
	.channels-grid { grid-template-columns: 1fr; }
}
