/**
 * Freikirche Overath — site template
 * Copyright (C) 2026 Freikirche Overath
 * License GNU General Public License version 2 or later
 *
 * No framework. Tokens mirror the visual language of the previous site.
 */

/* ------------------------------------------------------------------ tokens */

:root {
	/* Set from template parameters in index.php; these are the fallbacks. */
	--fko-content-width: 1200px;
	--fko-hero-height: 420px;
	--fko-logo-width: 362px;

	--fko-text: #545454;
	--fko-text-strong: #333333;
	--fko-text-muted: #777777;
	--fko-heading: #333333;

	--fko-green: #009640;
	--fko-blue: #0a75a0;
	--fko-amber: #f0ad4e;
	--fko-gold: #ffbf00;

	--fko-nav-bg: #292929;
	--fko-nav-fg: #ffffff;
	--fko-header-bg: rgba(255, 255, 255, 0.99);

	--fko-surface: #ffffff;
	--fko-surface-alt: #f5f5f5;
	--fko-tile-ring: #f3f3f3;
	--fko-border: #dddddd;
	--fko-border-soft: #ededed;

	--fko-footer-bg: #000000;
	--fko-footer-fg: #888888;
	--fko-footer-link: #cccccc;

	--fko-link: var(--fko-blue);
	--fko-link-hover: var(--fko-green);

	--fko-font-body: Arial, "Arial Unicode MS", Helvetica, sans-serif;
	--fko-font-display: "Archivo Black", Arial, Helvetica, sans-serif;

	--fko-gutter: 1rem;
	--fko-radius: 3px;
	--fko-shadow: 0 1px 3px rgba(0, 0, 0, 0.09);
	--fko-transition: 300ms ease-in-out;
}

/* -------------------------------------------------------------------- base */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--fko-surface);
	color: var(--fko-text);
	font-family: var(--fko-font-body);
	font-size: 15px;
	line-height: 1.6;
}

img,
svg,
iframe,
video {
	max-width: 100%;
	height: auto;
}

iframe {
	border: 0;
}

a {
	color: var(--fko-link);
	text-decoration: none;
	transition: color var(--fko-transition);
}

a:hover,
a:focus-visible {
	color: var(--fko-link-hover);
	text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	color: var(--fko-heading);
	font-family: var(--fko-font-body);
	font-weight: 400;
	line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p, ul, ol, dl, table, blockquote, figure, pre {
	margin: 0 0 1rem;
}

blockquote {
	padding: 0.5rem 0 0.5rem 1rem;
	border-left: 4px solid var(--fko-green);
	color: var(--fko-text-strong);
	font-style: italic;
}

hr {
	height: 0;
	margin: 1.5rem 0;
	border: 0;
	border-top: 1px solid var(--fko-border);
}

:focus-visible {
	outline: 3px solid var(--fko-amber);
	outline-offset: 2px;
}

/* --------------------------------------------------------------- utilities */

.fko-shell {
	width: 100%;
	max-width: var(--fko-content-width);
	margin: 0 auto;
	padding-inline: var(--fko-gutter);
}

.fko-sr-only,
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fko-skip {
	position: absolute;
	top: -100%;
	left: var(--fko-gutter);
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--fko-nav-bg);
	color: var(--fko-nav-fg);
	border-radius: var(--fko-radius);
}

.fko-skip:focus {
	top: 0.5rem;
	color: var(--fko-nav-fg);
}

.fko-button,
button.fko-button {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border: 2px solid var(--fko-green);
	border-radius: var(--fko-radius);
	background: var(--fko-green);
	color: #ffffff;
	font-size: 0.85rem;
	font-weight: bold;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background var(--fko-transition), color var(--fko-transition);
}

.fko-button:hover,
.fko-button:focus-visible {
	background: transparent;
	color: var(--fko-green);
	text-decoration: none;
}

/* Joomla marks up buttons with Bootstrap class names; give them a plain look. */
.btn,
a.btn,
button.btn,
input[type="submit"],
button[type="submit"] {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid var(--fko-border);
	border-radius: var(--fko-radius);
	background: var(--fko-surface-alt);
	color: var(--fko-text-strong);
	font-family: inherit;
	font-size: 0.85rem;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--fko-transition), color var(--fko-transition);
}

.btn:hover,
.btn:focus-visible,
input[type="submit"]:hover,
button[type="submit"]:hover {
	background: var(--fko-green);
	border-color: var(--fko-green);
	color: #ffffff;
	text-decoration: none;
}

.btn-primary,
input[type="submit"],
button[type="submit"] {
	border-color: var(--fko-green);
	background: var(--fko-green);
	color: #ffffff;
}

/* ------------------------------------------------------------------ header */

.fko-header {
	position: relative;
	z-index: 50;
	background: var(--fko-header-bg);
}

.fko-header.is-sticky {
	position: sticky;
	top: 0;
}

.fko-topbar {
	border-bottom: 1px solid var(--fko-border-soft);
	color: var(--fko-text-muted);
	font-size: 0.8rem;
}

.fko-topbar-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: center;
	justify-content: flex-end;
	min-height: 2.2rem;
	padding-block: 0.3rem;
}

.fko-topbar-inner p {
	margin: 0;
}

.fko-brandbar-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: center;
	padding-block: 0.8rem;
}

.fko-brand {
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}

.fko-brand:hover,
.fko-brand:focus-visible {
	text-decoration: none;
}

.fko-logo {
	display: block;
	width: var(--fko-logo-width);
	max-width: 100%;
	height: auto;
}

.fko-sitetitle {
	color: var(--fko-heading);
	font-family: var(--fko-font-display);
	font-size: 1.6rem;
	line-height: 1.2;
}

.fko-tagline {
	margin: 0;
	color: var(--fko-text-muted);
	font-size: 0.85rem;
}

/*
 * Contact block beside the logo, right aligned on wide screens and centred
 * below the logo on narrow ones - the same behaviour the previous site had.
 */
.fko-headernote {
	margin-inline-start: auto;
	color: var(--fko-text-muted);
	font-size: 0.85rem;
	line-height: 1.5;
	text-align: right;
}

.fko-headernote strong {
	color: var(--fko-text-strong);
	font-size: 1rem;
}

@media (max-width: 47.999em) {
	.fko-brandbar-inner {
		justify-content: center;
		text-align: center;
	}

	.fko-headernote {
		margin-inline: auto;
		text-align: center;
	}
}

/* --------------------------------------------------------------- main menu */

/*
 * Works with the mod_menu markup of Joomla 4, 5 and 6. Joomla 6 wraps the
 * label of a separator/heading parent inside its own .mod-menu__toggle-sub
 * button and appends that button to link parents, so a top level entry can be
 * an <a>, a <span class="mod-menu__separator"> (4/5) or that button (6).
 */

.fko-navbar {
	background: var(--fko-nav-bg);
	border-bottom: 1px solid var(--fko-amber);
}

.fko-navbar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding-block: 5px;
}

.fko-nav-toggle {
	display: none;
	gap: 0.6rem;
	align-items: center;
	margin: 0;
	padding: 0.5rem 0.75rem;
	border: 2px solid transparent;
	border-radius: var(--fko-radius);
	background: transparent;
	color: var(--fko-nav-fg);
	font-family: inherit;
	font-size: 0.8rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
}

.fko-nav-toggle:hover,
.fko-nav-toggle[aria-expanded="true"] {
	border-color: var(--fko-nav-fg);
}

.fko-nav-toggle-bars,
.fko-nav-toggle-bars::before,
.fko-nav-toggle-bars::after {
	display: block;
	width: 20px;
	height: 2px;
	background: currentColor;
}

.fko-nav-toggle-bars {
	position: relative;
}

.fko-nav-toggle-bars::before,
.fko-nav-toggle-bars::after {
	position: absolute;
	left: 0;
	content: "";
}

.fko-nav-toggle-bars::before { top: -6px; }
.fko-nav-toggle-bars::after  { top: 6px; }

.fko-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
	width: 100%;
}

.fko-nav .mod-menu {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fko-nav .mod-menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

/* The pill: every possible shape of a top level entry. */
.fko-nav .mod-menu > li > a,
.fko-nav .mod-menu > li > .mod-menu__separator,
.fko-nav .mod-menu > li > .mod-menu__toggle-sub {
	display: flex;
	gap: 0.4rem;
	align-items: center;
	margin: 0 2px;
	padding: 8px 14px;
	border: 2px solid transparent;
	border-radius: var(--fko-radius);
	background: transparent;
	color: var(--fko-nav-fg);
	font-family: inherit;
	font-size: 11.9px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	white-space: nowrap;
	transition: border-color var(--fko-transition), background-color var(--fko-transition);
}

/* A link parent gets its own toggle next to the link: keep them as one pill. */
.fko-nav .mod-menu > li:has(> a) > .mod-menu__toggle-sub {
	margin-inline-start: -0.65rem;
	padding-inline: 0.35rem;
	border: 0;
}

.fko-nav .mod-menu > li > .mod-menu__separator,
.fko-nav .mod-menu > li > .mod-menu__toggle-sub {
	cursor: pointer;
}

.fko-nav .mod-menu > li > .mod-menu__toggle-sub .mod-menu__separator {
	padding: 0;
	border: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

.fko-nav .mod-menu > li > a:hover,
.fko-nav .mod-menu > li > a:focus-visible,
.fko-nav .mod-menu > li.active > a,
.fko-nav .mod-menu > li.current > a,
.fko-nav .mod-menu > li:hover > .mod-menu__separator,
.fko-nav .mod-menu > li.active > .mod-menu__separator,
.fko-nav .mod-menu > li:hover > .mod-menu__toggle-sub,
.fko-nav .mod-menu > li.active > .mod-menu__toggle-sub,
.fko-nav .mod-menu > li > .mod-menu__toggle-sub:focus-visible {
	border-color: var(--fko-nav-fg);
	color: var(--fko-nav-fg);
	text-decoration: none;
}

.fko-nav .mod-menu > li:has(> a):hover > .mod-menu__toggle-sub,
.fko-nav .mod-menu > li:has(> a).active > .mod-menu__toggle-sub {
	border-color: transparent;
}

/*
 * Chevron drawn in CSS: Joomla emits .icon-chevron-down, which would be an
 * empty box without an icon font, and this template loads none.
 */
.fko-nav .icon-chevron-down {
	display: inline-block;
	margin-inline-start: 0;
	width: 0.42em;
	height: 0.42em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-0.12em);
	transition: transform var(--fko-transition);
}

.fko-nav li.is-open > .mod-menu__toggle-sub .icon-chevron-down,
.fko-nav .mod-menu__toggle-sub[aria-expanded="true"] .icon-chevron-down {
	transform: rotate(-135deg) translateY(-0.12em);
}

/*
 * Dropdown panels.
 *
 * Joomla 6 ships mod_menu/js/menu.js, which owns the open/closed state: it sets
 * aria-hidden on every submenu and toggles .show-menu. Its stylesheet uses
 * :where(), so it has zero specificity and loses to anything here - which means
 * this template must spell out the open state itself instead of relying on it.
 * Joomla 4 and 5 ship no such script, so there the submenu has no aria-hidden
 * and the :hover rule below is the only thing that opens it.
 */
.fko-nav .mod-menu__sub {
	display: none;
	margin: 0;
	padding: 0.35rem 0;
	list-style: none;
}

.fko-nav .mod-menu__sub[aria-hidden="false"],
.fko-nav .mod-menu__sub.show-menu,
.fko-nav li.is-open > .mod-menu__sub {
	display: block;
}

.fko-nav .mod-menu__sub li {
	display: block;
}

.fko-nav .mod-menu__sub a,
.fko-nav .mod-menu__sub .mod-menu__separator {
	display: block;
	padding: 0.5rem 1rem;
	color: var(--fko-nav-fg);
	font-size: 0.82rem;
	white-space: nowrap;
}

.fko-nav .mod-menu__sub a:hover,
.fko-nav .mod-menu__sub a:focus-visible,
.fko-nav .mod-menu__sub li.current > a,
.fko-nav .mod-menu__sub li.active > a {
	background: rgba(255, 255, 255, 0.12);
	color: var(--fko-nav-fg);
	text-decoration: none;
}

.fko-navsearch {
	margin-inline-start: auto;
}

.fko-navsearch input {
	padding: 0.4rem 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: var(--fko-radius);
	background: rgba(255, 255, 255, 0.08);
	color: var(--fko-nav-fg);
	font-family: inherit;
	font-size: 0.85rem;
}

.fko-navsearch input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

/* Fallback toggle injected by template.js on Joomla 4/5, where mod_menu has none. */
.fko-sub-toggle {
	display: none;
	width: 2.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--fko-nav-fg);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

@media (min-width: 62em) {
	.fko-nav .mod-menu__sub {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 40;
		min-width: 14rem;
		background: var(--fko-nav-bg);
		border: 1px solid rgba(255, 255, 255, 0.15);
		border-top: 2px solid var(--fko-amber);
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	}

	/* Hover keeps the feel of the previous site; the toggle button still pins. */
	.fko-nav .mod-menu > li:hover > .mod-menu__sub,
	.fko-nav .mod-menu > li:focus-within > .mod-menu__sub {
		display: block;
	}

	/* Third level opens sideways. */
	.fko-nav .mod-menu__sub .mod-menu__sub {
		top: 0;
		left: 100%;
		border-top-width: 1px;
	}

	.fko-nav .mod-menu__sub .mod-menu__sub[aria-hidden="true"] {
		display: none;
	}

	.fko-nav .mod-menu__sub li:hover > .mod-menu__sub,
	.fko-nav .mod-menu__sub li:focus-within > .mod-menu__sub {
		display: block;
	}
}

@media (max-width: 61.999em) {
	.fko-nav-toggle {
		display: inline-flex;
	}

	.fko-nav {
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-block: 0.5rem;
	}

	.fko-nav.is-open {
		display: flex;
	}

	.fko-nav .mod-menu {
		flex-direction: column;
	}

	.fko-nav .mod-menu > li {
		flex-wrap: wrap;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}

	.fko-nav .mod-menu > li > a,
	.fko-nav .mod-menu > li > .mod-menu__separator,
	.fko-nav .mod-menu > li > .mod-menu__toggle-sub {
		flex: 1;
		justify-content: space-between;
		margin: 0;
		border-color: transparent;
		font-size: 0.85rem;
		white-space: normal;
	}

	/* Line the chevron of a link parent up with the ones of separator parents. */
	.fko-nav .mod-menu > li:has(> a) > .mod-menu__toggle-sub {
		flex: 0 0 3rem;
		justify-content: flex-end;
		margin: 0;
		padding-inline: 0 14px;
	}

	.fko-sub-toggle {
		display: block;
	}

	.fko-nav .mod-menu__sub {
		flex-basis: 100%;
		padding-inline-start: 1rem;
	}

	.fko-navsearch {
		margin: 0.5rem 0 0;
	}
}

/* -------------------------------------------------------------------- hero */

.fko-hero {
	position: relative;
	background: var(--fko-nav-bg);
}

.fko-slider {
	position: relative;
	height: var(--fko-hero-height);
	overflow: hidden;
}

.fko-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 2rem var(--fko-gutter) 3rem;
	background-position: center;
	background-size: cover;
	opacity: 0;
	transition: opacity 600ms ease-in-out;
	pointer-events: none;
}

.fko-slide {
	z-index: 0;
}

.fko-slide.is-active {
	z-index: 1;
	opacity: 1;
	pointer-events: auto;
}

/* Dark wash so white type stays readable over any photo. */
.fko-slide::before {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 75%);
	content: "";
}

.fko-slide-inner {
	position: relative;
	width: 100%;
	max-width: var(--fko-content-width);
	margin: 0 auto;
}

.fko-slide-title {
	margin: 0 0 0.25rem;
	color: #ffffff;
	font-family: var(--fko-font-display);
	font-size: 36px;
	line-height: 1.2;
	text-transform: uppercase;
	text-shadow: 1px 1px 1px #545454, 2px 2px 1px #545454, 3px 3px 1px #545454;
}

.fko-slide-subtitle {
	margin: 0;
	color: var(--fko-gold);
	font-size: 22px;
	font-weight: bold;
	line-height: 1.3;
	text-transform: uppercase;
}

.fko-slide a.fko-slide-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.fko-slide-cta {
	display: inline-block;
	margin-top: 1rem;
}

.fko-slider-control {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 3rem;
	height: 3rem;
	transform: translateY(-50%);
	border: 1px solid rgba(255, 255, 255, 0.75);
	border-radius: 0;
	background: rgba(0, 0, 0, 0.15);
	color: #ffffff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: background var(--fko-transition);
}

.fko-slider-control:hover,
.fko-slider-control:focus-visible {
	background: rgba(0, 0, 0, 0.7);
}

.fko-slider-control.is-prev { left: 0.75rem; }
.fko-slider-control.is-next { right: 0.75rem; }

.fko-slider-dots {
	position: absolute;
	right: 0;
	bottom: 0.75rem;
	left: 0;
	z-index: 3;
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fko-slider-dots button {
	width: 0.75rem;
	height: 0.75rem;
	padding: 0;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.fko-slider-dots button[aria-current="true"] {
	background: var(--fko-gold);
	border-color: var(--fko-gold);
}

/* A single slide needs no chrome. */
.fko-slider[data-count="1"] .fko-slider-control,
.fko-slider[data-count="1"] .fko-slider-dots {
	display: none;
}

@media (max-width: 47.999em) {
	.fko-slider {
		height: auto;
		min-height: 15rem;
	}

	.fko-slide {
		position: relative;
		opacity: 1;
		pointer-events: auto;
	}

	.fko-slide:not(.is-active) {
		display: none;
	}

	.fko-slide-title { font-size: 1.5rem; }
	.fko-slide-subtitle { font-size: 1.05rem; }
}

/* ------------------------------------------------------------ main content */

.fko-main {
	padding-block: 2rem;
}

.fko-main-inner {
	display: grid;
	gap: 2rem;
}

body.has-sidebar .fko-main-inner {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 62em) {
	body.has-sidebar .fko-main-inner {
		grid-template-columns: minmax(0, 1fr) 20rem;
	}
}

.fko-content > *:last-child {
	margin-bottom: 0;
}

/* Module chrome from html/layouts/chromes/fko.php */
.fko-module {
	margin-bottom: 1.5rem;
}

.fko-module:last-child {
	margin-bottom: 0;
}

.fko-module-title {
	margin: 0 0 0.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--fko-amber);
	font-size: 1.05rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.fko-sidebar .fko-module {
	padding: 1rem;
	background: var(--fko-surface-alt);
	border-radius: var(--fko-radius);
}

/* ------------------------------------------------------- Joomla core bits  */

.mod-breadcrumbs__wrapper {
	margin-bottom: 1.25rem;
}

ol.mod-breadcrumbs,
ol.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8rem;
	color: var(--fko-text-muted);
}

ol.mod-breadcrumbs .mod-breadcrumbs__divider {
	display: none;
}

/* Bootstrap utility classes Joomla puts on the markup; this template has none. */
ol.mod-breadcrumbs .float-start,
ol.mod-breadcrumbs .float-end {
	float: none;
}

ol.mod-breadcrumbs li + li::before,
ol.breadcrumb li + li::before {
	margin-inline-end: 0.35rem;
	color: var(--fko-border);
	content: "/";
}

.fko-content .page-header h1,
.fko-content .page-header h2,
.fko-content .com-content-article__title {
	margin-bottom: 1.25rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--fko-border-soft);
	color: var(--fko-green);
	font-size: 1.6rem;
}

.fko-content .page-header h1 a,
.fko-content .com-content-article__title a {
	color: inherit;
}

.com-content-article__body img,
.item-page img,
.blog img {
	height: auto;
}

.com-content-article__info,
.article-info {
	margin-bottom: 1rem;
	color: var(--fko-text-muted);
	font-size: 0.8rem;
}

.com-content-article__info dd,
.article-info dd {
	display: inline;
	margin: 0 0.75rem 0 0;
}

/*
 * The "Details" term is a label for a list whose every entry already carries
 * its own ("Speaker:", "Series:", "Date:"), so it only adds noise.
 */
.article-info-term {
	display: none;
}

.pagination,
.com-content-category-blog__pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.pagination li {
	display: block;
}

/* Only style the links; the wrapper itself is a span in some core layouts. */
.pagination a,
.pagination li > span {
	display: inline-block;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--fko-border);
	border-radius: var(--fko-radius);
	font-size: 0.85rem;
}

.pagination a.btn {
	padding: 0.4rem 0.7rem;
}

.pagination .counter {
	border: 0;
	color: var(--fko-text-muted);
}

joomla-alert,
.alert {
	display: block;
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	border-inline-start: 4px solid var(--fko-blue);
	border-radius: var(--fko-radius);
	background: var(--fko-surface-alt);
}

.alert-danger,
joomla-alert[type="danger"] {
	border-inline-start-color: #d9534f;
}

.alert-success,
joomla-alert[type="success"] {
	border-inline-start-color: var(--fko-green);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th, td {
	padding: 0.5rem;
	border-bottom: 1px solid var(--fko-border-soft);
	text-align: start;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
	max-width: 100%;
	padding: 0.5rem 0.65rem;
	border: 1px solid var(--fko-border);
	border-radius: var(--fko-radius);
	background: #ffffff;
	color: inherit;
	font-family: inherit;
	font-size: 0.95rem;
}

.fko-field {
	margin-bottom: 0.9rem;
}

.fko-field label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.85rem;
	font-weight: bold;
}

/* ------------------------------------------------------------- promo tiles */

.fko-promo {
	padding-block: 2.5rem 1rem;
	border-top: 1px solid var(--fko-border-soft);
	color: #555555;
	font-size: 13px;
	text-align: center;
}

.fko-tiles {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.fko-tile {
	margin: 0;
}

.fko-tile-image {
	display: inline-block;
	width: 200px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	margin-bottom: 1em;
	overflow: hidden;
	border: 7px solid var(--fko-tile-ring);
	border-radius: 50%;
	transition: border-color var(--fko-transition), transform var(--fko-transition);
}

.fko-tile-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fko-tile a:hover .fko-tile-image,
.fko-tile a:focus-visible .fko-tile-image {
	border-color: var(--fko-green);
	transform: translateY(-3px);
}

.fko-tile-title,
.fko-promo h3 {
	margin: 0 0 0.5rem;
	color: var(--fko-text-strong);
	font-family: var(--fko-font-body);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.fko-tile a {
	color: inherit;
}

.fko-tile a:hover,
.fko-tile a:focus-visible {
	text-decoration: none;
}

.fko-tile p {
	margin: 0;
}

/* ------------------------------------------------------- listing tables ---- */

/*
 * Joomla and its extensions mark listings up with Bootstrap class names. This
 * template ships no framework, so without these rules a sermon list is an
 * unstyled table and the "hidden-phone" columns never actually hide.
 */
table.table {
	width: 100%;
	margin-bottom: 1.5rem;
	border-collapse: collapse;
	font-size: 0.9rem;
}

table.table th,
table.table td {
	padding: 0.55rem 0.7rem;
	border-bottom: 1px solid var(--fko-border-soft);
	text-align: start;
	vertical-align: middle;
}

table.table thead th {
	border-bottom: 2px solid var(--fko-amber);
	color: var(--fko-text-strong);
	font-size: 0.78rem;
	font-weight: bold;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	white-space: nowrap;
}

table.table thead th a {
	color: inherit;
}

table.table-striped tbody tr:nth-of-type(odd) {
	background: var(--fko-surface-alt);
}

table.table-hover tbody tr:hover {
	background: var(--fko-border-soft);
}

/* table-bordered would box every cell in; the horizontal rules read better. */
table.table-bordered th,
table.table-bordered td {
	border-inline: 0;
}

/* Long listings scroll sideways instead of pushing the layout out. */
.cat-items,
.com-sermonspeaker-sermons__sermons {
	max-width: 100%;
	overflow-x: auto;
}

/* Bootstrap 2 helpers the extension still emits. */
@media (max-width: 47.999em) {
	.hidden-phone {
		display: none !important;
	}
}

@media (max-width: 61.999em) {
	.hidden-tablet {
		display: none !important;
	}
}

/* -------------------------------------------------------- sermon listings -- */

.com-sermonspeaker-sermons__table .ss-title {
	width: 38%;
}

.com-sermonspeaker-sermons__table .ss-title a {
	font-weight: bold;
}

/* A wrapped speaker name makes every other row a different height. */
.com-sermonspeaker-sermons__table .ss-date,
.com-sermonspeaker-sermons__table .ss-length,
.com-sermonspeaker-sermons__table .ss-speaker {
	white-space: nowrap;
}

.com-sermonspeaker-sermons__table .ss-date,
.com-sermonspeaker-sermons__table .ss-speaker,
.com-sermonspeaker-sermons__table .ss-series {
	color: var(--fko-text-muted);
}

.com-sermonspeaker-sermons__table .num {
	width: 3rem;
	color: var(--fko-text-muted);
}

/* The per-page selector above the list. */
.com-sermonspeaker-sermons__sermons select,
.com-sermonspeaker-sermons select {
	margin-bottom: 0.75rem;
}

/* Sermon detail: the speaker/series tabs come with no styling of their own. */
.com-sermonspeaker-sermon h2,
.com-sermonspeaker-sermon h3 {
	font-size: 1.15rem;
}

/* ---------------------------------------------------------------- contacts */

/*
 * com_contact renders a table by default; the override in
 * html/com_contact/category/default_items.php turns it into these cards, with
 * the round portrait the previous site used.
 */
.fko-contacts-filter {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 1.5rem;
}

.fko-contact-list {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.fko-contact {
	display: flex;
	gap: 1rem;
	align-items: center;
	padding: 1rem;
	border: 1px solid var(--fko-border-soft);
	border-radius: var(--fko-radius);
	background: var(--fko-surface);
}

.fko-contact-photo {
	flex: 0 0 auto;
	display: block;
	width: 5.5rem;
	height: 5.5rem;
	overflow: hidden;
	border: 4px solid var(--fko-tile-ring);
	border-radius: 50%;
	transition: border-color var(--fko-transition);
}

.fko-contact:hover .fko-contact-photo {
	border-color: var(--fko-green);
}

.fko-contact-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fko-contact-body {
	min-width: 0;
}

.fko-contact-name {
	margin: 0 0 0.15rem;
	font-family: var(--fko-font-body);
	font-size: 1rem;
	font-weight: bold;
}

.fko-contact-name a {
	color: var(--fko-text-strong);
}

.fko-contact-name a:hover,
.fko-contact-name a:focus-visible {
	color: var(--fko-green);
	text-decoration: none;
}

.fko-contact-position {
	margin: 0 0 0.15rem;
	color: var(--fko-text);
	font-size: 0.85rem;
	font-weight: bold;
}

.fko-contact-place,
.fko-contact-line {
	margin: 0;
	color: var(--fko-text-muted);
	font-size: 0.85rem;
}

/* --------------------------------------------------------- Joomla forms ---- */

/*
 * Joomla renders forms with Bootstrap's control-group markup. Without a
 * framework none of it means anything, so the contact form comes out as bare
 * labels and inputs. These rules give it the same look as the rest of the site.
 */
.control-group {
	margin-bottom: 1rem;
}

.control-label label {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--fko-text-strong);
	font-size: 0.85rem;
	font-weight: bold;
}

.control-label label .star,
.control-label .required .star {
	color: #d9534f;
}

.controls input.form-control,
.controls select.form-control,
.controls textarea.form-control,
.controls input[type="text"],
.controls input[type="email"],
.controls textarea {
	width: 100%;
	max-width: 34rem;
}

.controls textarea {
	min-height: 9rem;
	resize: vertical;
}

/*
 * Checkbox rows: Joomla puts the caption in .control-label and the box in
 * .controls, which stacks them. Reversing the row puts the box first, the way
 * a checkbox is normally read.
 */
.form-check {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.form-check input {
	width: auto;
	margin: 0;
}

.control-group:has(.form-check) {
	display: flex;
	flex-direction: row-reverse;
	gap: 0.5rem;
	align-items: center;
	justify-content: flex-end;
}

.control-group:has(.form-check) .control-label label {
	margin: 0;
	font-weight: normal;
}

/* The "* Required field" note Joomla renders as a spacer field. */
.field-spacer .control-label label,
.control-group .spacer label {
	color: var(--fko-text-muted);
	font-size: 0.8rem;
	font-weight: normal;
}

.field-spacer .controls {
	display: none;
}

.invalid,
input.invalid,
textarea.invalid {
	border-color: #d9534f;
}

/* ------------------------------------------------------- contact details --- */

.com-contact__container h2,
.com-contact__form h2 {
	margin-top: 1.5rem;
	font-size: 1.1rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.com-contact__thumbnail img {
	max-width: 10rem;
	border: 5px solid var(--fko-tile-ring);
	border-radius: 50%;
}

dl.dl-horizontal {
	display: grid;
	gap: 0.15rem 0.75rem;
	grid-template-columns: auto 1fr;
	margin: 0 0 1rem;
}

dl.dl-horizontal dt {
	color: var(--fko-text-muted);
	font-weight: normal;
}

dl.dl-horizontal dd {
	margin: 0;
}

/*
 * The address list has one <dt> and several <dd>s, which the two column grid
 * above would wrap onto the wrong rows. Lay it out as plain lines and keep the
 * term for screen readers only - it holds an icon this template does not load.
 */
dl.com-contact__address {
	display: block;
}

dl.com-contact__address dt {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

dl.com-contact__address dd {
	display: block;
}

dl.com-contact__address .contact-postcode {
	margin-inline-start: 0.35rem;
}

.com-contact__form {
	max-width: 34rem;
	margin-top: 1rem;
}

.com-contact__form fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.com-contact__form legend {
	margin-bottom: 0.75rem;
	padding: 0;
	color: var(--fko-text-strong);
	font-size: 1rem;
	font-weight: bold;
}

/* Single contact page */
.com-contact__contact .contact-image img {
	max-width: 12rem;
	border: 5px solid var(--fko-tile-ring);
	border-radius: 50%;
}

/* ----------------------------------------------------- embedded media / FAQ */

/*
 * The old site rendered videos through the AllVideos plugin and collapsible
 * blocks through Regular Labs Sliders. Neither exists here, so the content is
 * migrated to a plain responsive iframe and to <details>.
 */
.fko-video {
	position: relative;
	max-width: 46rem;
	margin: 0 0 1.25rem;
	aspect-ratio: 16 / 9;
	background: #000000;
}

.fko-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/*
 * Audio player. The SermonSpeaker "generic" plugin is configured to emit a
 * plain <audio class="fko-audio">, so the browser's own controls are all that
 * is needed - no player library.
 */
.fko-audio {
	display: block;
	width: 100%;
	max-width: 34rem;
	margin: 0.75rem 0 1.25rem;
}

.fko-accordion {
	margin: 0 0 0.75rem;
	border: 1px solid var(--fko-border);
	border-radius: var(--fko-radius);
	background: var(--fko-surface);
}

.fko-accordion > summary {
	padding: 0.7rem 1rem;
	background: var(--fko-surface-alt);
	color: var(--fko-text-strong);
	font-weight: bold;
	cursor: pointer;
	list-style: none;
}

.fko-accordion > summary::-webkit-details-marker {
	display: none;
}

.fko-accordion > summary::before {
	display: inline-block;
	width: 0.9em;
	color: var(--fko-green);
	content: "\25B8";
	transition: transform var(--fko-transition);
}

.fko-accordion[open] > summary::before {
	transform: rotate(90deg);
}

.fko-accordion.is-blue > summary::before {
	color: var(--fko-blue);
}

.fko-accordion > summary:hover {
	background: var(--fko-border-soft);
}

.fko-accordion-body {
	padding: 1rem;
}

.fko-accordion-body > *:last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------------- bottom/map */

.fko-bottom {
	padding-block: 2rem;
	background: var(--fko-surface-alt);
}

.fko-map,
.fko-map > div {
	min-height: 22rem;
}

.fko-map iframe {
	display: block;
	width: 100%;
	height: 22rem;
	border: 0;
}

/* ------------------------------------------------------------------ footer */

.fko-footer {
	background: var(--fko-footer-bg);
	color: var(--fko-footer-fg);
	font-size: 13px;
}

.fko-footer a {
	color: var(--fko-footer-link);
}

.fko-footer a:hover,
.fko-footer a:focus-visible {
	color: #ffffff;
}

.fko-footer .fko-module-title {
	border-bottom-color: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	font-size: 0.9rem;
}

.fko-footer-cols {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	padding-block: 2rem;
}

.fko-footer ul.menu,
.fko-footer ul.mod-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fko-footer ul.menu li,
.fko-footer ul.mod-menu li {
	padding: 0.2rem 0;
}

.fko-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-block: 1rem;
	text-align: center;
}

.fko-copyright {
	margin: 0;
}

/* ------------------------------------------------------------- back to top */

.fko-backtotop {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 60;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 50%;
	background: var(--fko-nav-bg);
	color: #ffffff;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity var(--fko-transition), background var(--fko-transition);
}

.fko-backtotop:hover,
.fko-backtotop:focus-visible {
	background: var(--fko-green);
	opacity: 1;
}

.fko-backtotop[hidden] {
	display: none;
}

/* --------------------------------------------------------- error / offline */

.fko-error {
	max-width: 42rem;
	padding-block: 2rem;
}

.fko-error-code {
	margin: 0;
	color: var(--fko-amber);
	font-family: var(--fko-font-display);
	font-size: 4rem;
	line-height: 1;
}

.fko-error-title {
	font-size: 1.5rem;
}

.fko-error-debug {
	margin-top: 2rem;
	padding: 1rem;
	overflow: auto;
	background: var(--fko-surface-alt);
	font-size: 0.8rem;
}

.fko-offline-card {
	max-width: 26rem;
	padding-block: 3rem;
	text-align: center;
}

.fko-offline-form {
	margin-top: 1.5rem;
	text-align: start;
}

/* ------------------------------------------------------------------- print */

@media print {
	.fko-navbar,
	.fko-hero,
	.fko-backtotop,
	.fko-skip,
	.fko-sidebar,
	.fko-promo,
	.fko-map {
		display: none !important;
	}

	body {
		color: #000;
		font-size: 11pt;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
