/*
 * FF Gniebing Basis (Theme) · assets/theme.css
 * © 2026 FOCUSENTIAL e.u. (Dana Hauer-Zisser) · https://focusential.at · Alle Rechte vorbehalten.
 * Entwickelt ausschließlich für die Website der Freiwilligen Feuerwehr Gniebing (ff-gniebing.at).
 * Kopieren, Weitergabe, Verkauf oder Nutzung für andere Websites – auch in Teilen oder verändert –
 * ist ohne schriftliche Zustimmung von FOCUSENTIAL e.u. nicht gestattet. Siehe LIZENZ.txt.
 */
/* =====================================================================
   FF Gniebing Basis – Rahmen-Styles
   ===================================================================== */

:root {
	--ffg-rot: #c20217;
	--ffg-rot-dunkel: #8a0010;
	--ffg-orange: #ec8504;
	--ffg-grau: #707173;
	--ffg-hell: #f7f7f5;
	--ffg-schwarz: #111111;
	--ffg-head: 'Oswald', 'Arial Narrow', sans-serif;
	--ffg-body: Verdana, Geneva, sans-serif;
	--ffg-wrap: 1240px;
	--ffg-gutter: 40px;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #fff;
	color: var(--ffg-schwarz);
	font-family: var(--ffg-body);
	font-size: 15px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--ffg-rot); }

.ffg-wrap {
	max-width: var(--ffg-wrap);
	margin: 0 auto;
	padding: 0 var(--ffg-gutter);
}

.ffg-skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	background: #fff;
	color: var(--ffg-schwarz);
	padding: 10px 16px;
	font-family: var(--ffg-head);
	text-transform: uppercase;
}
.ffg-skip:focus { left: 8px; }

/* ---------- Topbar ---------- */
.ffg-topbar {
	background: var(--ffg-rot);
	color: #fff;
	font-size: 12px;
}
.ffg-topbar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 8px;
	padding-bottom: 8px;
}
.ffg-topbar__notruf {
	font-family: var(--ffg-head);
	font-weight: 500;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
.ffg-topbar__contact { opacity: .9; }
.ffg-topbar a { color: #fff; text-decoration: none; }
.ffg-topbar a:hover { text-decoration: underline; }
.ffg-dot { margin: 0 6px; }

/* ---------- Header ---------- */
.ffg-header {
	background: #fff;
	border-bottom: 1px solid #eee;
	position: relative;
	z-index: 50;
}
.ffg-header__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding-top: 18px;
	padding-bottom: 18px;
}
.ffg-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: var(--ffg-schwarz);
	flex-shrink: 0;
}
.ffg-brand__mark {
	width: 44px; height: 44px;
	border-radius: 50%;
	background: var(--ffg-rot);
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--ffg-head);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 1px;
}
.ffg-brand__logo { height: 44px; width: auto; display: block; }
.ffg-brand__text { display: flex; flex-direction: column; }
.ffg-brand__title {
	font-family: var(--ffg-head);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	line-height: 1.1;
}
.ffg-brand__sub { font-size: 11px; color: var(--ffg-grau); margin-top: 2px; }

/* Navigation */
.ffg-nav__list, .ffg-nav__list ul { list-style: none; margin: 0; padding: 0; }
.ffg-nav__list {
	display: flex;
	gap: 26px;
	font-family: var(--ffg-head);
	font-size: 13px;
	letter-spacing: .8px;
	text-transform: uppercase;
}
.ffg-nav__list > li { position: relative; }
.ffg-nav__list a {
	color: var(--ffg-schwarz);
	text-decoration: none;
	display: block;
}
.ffg-nav__list > li > a { padding: 4px 0 3px; border-bottom: 2px solid transparent; }
.ffg-nav__list > li > a:hover,
.ffg-nav__list > li.current-menu-item > a,
.ffg-nav__list > li.current-menu-ancestor > a,
.ffg-nav__list > li.current_page_parent > a,
.ffg-nav__list > li.current-page-ancestor > a {
	color: var(--ffg-rot);
	border-bottom-color: var(--ffg-rot);
}

/* Untermenü */
.ffg-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 220px;
	background: #fff;
	border-top: 2px solid var(--ffg-rot);
	box-shadow: 0 12px 28px rgba(0,0,0,.1);
	padding: 8px 0;
	margin-top: 12px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.ffg-nav__list .sub-menu::before { /* Hover-Brücke */
	content: '';
	position: absolute;
	top: -16px; left: 0; right: 0;
	height: 16px;
}
/* Untermenüs der letzten Menüpunkte rechtsbündig, damit sie nicht über den Rand ragen */
.ffg-nav__list > li:nth-last-child(-n+2) > .sub-menu { left: auto; right: -16px; }
.ffg-nav__list > li:hover > .sub-menu,
.ffg-nav__list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.ffg-nav__list .sub-menu a {
	padding: 8px 16px;
	font-size: 12px;
	letter-spacing: 1px;
}
.ffg-nav__list .sub-menu a:hover,
.ffg-nav__list .sub-menu .current-menu-item > a { color: var(--ffg-rot); background: var(--ffg-hell); }

/* Burger (nur mobil) */
.ffg-burger {
	display: none;
	align-items: center;
	gap: 10px;
	background: none;
	border: 1px solid #ddd;
	padding: 8px 12px;
	cursor: pointer;
	font-family: var(--ffg-head);
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--ffg-schwarz);
}
.ffg-burger { min-height: 44px; }
.ffg-burger__lines,
.ffg-burger__lines::before,
.ffg-burger__lines::after {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--ffg-rot);
	position: relative;
	transition: transform .2s, background .2s;
}
.ffg-burger__lines::before, .ffg-burger__lines::after { content: ''; position: absolute; left: 0; }
.ffg-burger__lines::before { top: -6px; }
.ffg-burger__lines::after { top: 6px; }
.ffg-nav-open .ffg-burger__lines { background: transparent; }
.ffg-nav-open .ffg-burger__lines::before { transform: translateY(6px) rotate(45deg); }
.ffg-nav-open .ffg-burger__lines::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Seitenkopf (Unterseiten, Beiträge, Übersichten) ---------- */
.ffg-pagehead {
	background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
	color: #fff;
	padding: 48px 0;
}
.ffg-pagehead__kicker {
	font-family: var(--ffg-head);
	color: var(--ffg-orange);
	letter-spacing: 3px;
	text-transform: uppercase;
	font-size: 13px;
	font-weight: 500;
	margin: 0 0 10px;
}
.ffg-pagehead__title {
	font-family: var(--ffg-head);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 36px;
	line-height: 1.1;
	margin: 0;
	color: #fff;
}

/* ---------- Inhalt ---------- */
.ffg-content { padding: 48px 0 56px; }
.ffg-content--full { padding: 0; }

/* Normale Inhalte (Texte, Bilder) auf Lesebreite; FF-Blöcke und Vollbreite-Elemente laufen durch */
.ffg-content > *:not(.ffb):not(.alignfull):not(.alignwide) {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--ffg-gutter);
	padding-right: var(--ffg-gutter);
	box-sizing: content-box;
}
.ffg-content > .alignwide { max-width: 1160px; margin-left: auto; margin-right: auto; padding: 0 var(--ffg-gutter); }
.ffg-content > .alignfull { max-width: none; }
.ffg-content--full > *:not(.ffb):not(.alignfull):not(.alignwide):first-child { margin-top: 48px; }
.ffg-content--full > *:not(.ffb):not(.alignfull):not(.alignwide):last-child { margin-bottom: 56px; }

/* Typografie für Fließtext */
.ffg-content h1:not(.ffb *), .ffg-content h2:not(.ffb *), .ffg-content h3:not(.ffb *), .ffg-content h4:not(.ffb *) {
	font-family: var(--ffg-head);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
	line-height: 1.2;
	color: var(--ffg-schwarz);
	margin-top: 1.8em;
	margin-bottom: .6em;
}
.ffg-content h2:not(.ffb *) { font-size: 26px; }
.ffg-content h3:not(.ffb *) { font-size: 20px; }
.ffg-content h4:not(.ffb *) { font-size: 16px; }
.ffg-content > *:first-child:not(.ffb) { margin-top: 0 !important; }
.ffg-content p:not(.ffb *), .ffg-content ul:not(.ffb *), .ffg-content ol:not(.ffb *) { margin-top: 0; margin-bottom: 1.1em; }
.ffg-content li:not(.ffb *) { margin-bottom: .3em; }
.ffg-content ul:not(.ffb *) li::marker { color: var(--ffg-rot); }
.ffg-content a:hover:not(.ffb *) { color: var(--ffg-rot-dunkel); }
.ffg-content blockquote:not(.ffb *) {
	border-left: 3px solid var(--ffg-rot);
	margin: 1.5em auto;
	padding: 4px 0 4px 20px;
	color: #444;
	font-style: italic;
}
.ffg-content hr:not(.ffb *), .ffg-content .wp-block-separator:not(.ffb *) {
	border: 0;
	border-top: 1px solid #e5e5e5;
	margin: 2em auto;
}
.ffg-content figure:not(.ffb *) { margin-top: 0; margin-bottom: 1.5em; }
.ffg-content figcaption:not(.ffb *) { font-size: 12px; color: var(--ffg-grau); margin-top: 6px; }
.ffg-content img:not(.ffb *) { border-radius: 4px; }
.ffg-content table:not(.ffb *) { width: 100%; border-collapse: collapse; font-size: 14px; }
.ffg-content th:not(.ffb *), .ffg-content td:not(.ffb *) { border-bottom: 1px solid #e5e5e5; padding: 8px 6px; text-align: left; }
.ffg-content th:not(.ffb *) { font-family: var(--ffg-head); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; }
.ffg-featured img { width: 100%; }

/* Buttons (auch Core-Button-Block) */
.ffg-btn,
.ffg-content .wp-block-button__link:not(.ffb *) {
	display: inline-block;
	background: var(--ffg-rot);
	color: #fff !important;
	padding: 12px 24px;
	border-radius: 0;
	font-family: var(--ffg-head);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	transition: transform .15s;
}
.ffg-btn:hover, .ffg-content .wp-block-button__link:hover { transform: translateY(-1px); }

.ffg-back { margin-top: 2.5em !important; }
.ffg-back a {
	font-family: var(--ffg-head);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 13px;
	text-decoration: none;
}

/* ---------- Übersichten (Beiträge, Kategorien) ---------- */
.ffg-list { padding-top: 48px; padding-bottom: 56px; }
.ffg-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.ffg-card {
	display: block;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	transition: transform .25s, box-shadow .25s;
}
.ffg-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.ffg-card__media { height: 180px; background: #d8d8d4; position: relative; }
.ffg-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ffg-card__badge {
	position: absolute;
	top: 10px; left: 10px;
	background: var(--ffg-rot);
	color: #fff;
	font-family: var(--ffg-head);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 4px 10px;
}
.ffg-card__body { padding: 14px 16px; }
.ffg-card__meta { font-size: 11px; color: var(--ffg-grau); letter-spacing: 1px; text-transform: uppercase; margin: 0 0 6px; }
.ffg-card__title {
	font-family: var(--ffg-head);
	font-size: 15px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
	line-height: 1.2;
	margin: 0 0 8px;
}
.ffg-card__excerpt { font-size: 12px; color: #555; line-height: 1.55; margin: 0; }
.ffg-empty { color: var(--ffg-grau); }

.ffg-pagination { margin-top: 32px; }
.ffg-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ffg-pagination .page-numbers {
	display: inline-block;
	min-width: 38px;
	padding: 8px 12px;
	text-align: center;
	border: 1px solid #ddd;
	color: var(--ffg-schwarz);
	text-decoration: none;
	font-family: var(--ffg-head);
	font-size: 13px;
	text-transform: uppercase;
}
.ffg-pagination .page-numbers.current,
.ffg-pagination .page-numbers:hover { background: var(--ffg-rot); border-color: var(--ffg-rot); color: #fff; }

/* ---------- Footer ---------- */
.ffg-footer { background: #0a0a0a; color: #fff; padding-top: 40px; }
.ffg-footer__cols {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 28px;
	padding-bottom: 28px;
}
.ffg-footer__title {
	font-family: var(--ffg-head);
	font-weight: 500;
	text-transform: uppercase;
	font-size: 13px;
	color: var(--ffg-orange);
	letter-spacing: 1.5px;
	margin: 0 0 10px;
}
.ffg-footer p { font-size: 12px; color: #aaa; line-height: 1.8; margin: 0 0 10px; }
.ffg-footer a { color: #aaa; text-decoration: none; }
.ffg-footer a:hover { color: #fff; }
.ffg-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 12px;
	line-height: 1.8;
	color: #aaa;
}
.ffg-footer__notruf {
	background: var(--ffg-rot);
	padding: 16px var(--ffg-gutter);
	text-align: center;
	font-family: var(--ffg-head);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-top: 0;
	border-top: 1px solid rgba(255,255,255,.1);
}

/* ---------- Responsiv ---------- */
@media (max-width: 960px) {
	.ffg-burger { display: inline-flex; }
	.ffg-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0; right: 0;
		background: #fff;
		border-top: 2px solid var(--ffg-rot);
		box-shadow: 0 16px 32px rgba(0,0,0,.12);
		max-height: calc(100vh - 140px);
		overflow-y: auto;
	}
	.ffg-nav-open .ffg-nav { display: block; }
	.ffg-nav__list { flex-direction: column; gap: 0; padding: 8px var(--ffg-gutter) 16px; font-size: 15px; }
	.ffg-nav__list > li { border-bottom: 1px solid #eee; }
	.ffg-nav__list > li > a { padding: 14px 0; border-bottom: 0; }
	.ffg-nav__list .sub-menu,
	.ffg-nav__list > li:nth-last-child(-n+2) > .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border-top: 0;
		margin: -6px 0 10px;
		padding: 0 0 0 14px;
		border-left: 2px solid var(--ffg-rot);
		min-width: 0;
	}
	.ffg-nav__list .sub-menu::before { display: none; }
	.ffg-nav__list .sub-menu a { padding: 8px 0; font-size: 13px; }
	.ffg-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
	:root { --ffg-gutter: 24px; }
	.ffg-topbar__inner { flex-direction: column; align-items: flex-start; gap: 2px; }
	.ffg-pagehead { padding: 36px 0; }
	.ffg-pagehead__title { font-size: 28px; }
	.ffg-footer { padding-top: 30px; }
	.ffg-footer__cols { grid-template-columns: 1fr 1fr; }
	.ffg-footer__col--main { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
	.ffg-brand__sub { display: none; }
	.ffg-burger__label { display: none; }
	.ffg-cards { grid-template-columns: 1fr; }
	.ffg-footer__cols { grid-template-columns: 1fr; }
}

/* Abstand, wenn normaler Text direkt auf einen FF-Block folgt */
.ffg-content > .ffb + *:not(.ffb):not(.alignfull) { margin-top: 32px; }

/* Lange Wörter (z. B. „Mannschaftstransportfahrzeug“) umbrechen */
/* Ab 1.1.5: Kurze Wörter wie „Feuerwehr“ werden nie mehr abgeteilt – getrennt wird nur bei sehr
   langen Wörtern (mind. 6 Buchstaben vor und nach dem Trennstrich). */
.ffg-pagehead__title, .ffg-content h1, .ffg-content h2, .ffg-card__title {
	overflow-wrap: break-word;
	hyphens: auto;
	-webkit-hyphenate-limit-before: 6;
	-webkit-hyphenate-limit-after: 6;
	hyphenate-limit-chars: 13 6 6;
}
.ffg-brand__title { hyphens: manual; overflow-wrap: normal; }
@media (max-width: 600px) { .ffg-pagehead__title { font-size: clamp(22px, 7.4vw, 28px); } }

/* Ab 1.1.4: Hinweis „Symbolbild“ (kommt aus dem Plugin FF Gniebing – Inhaltsblöcke) */
.ffg-featured { position: relative; }
.ffg-card__media .ffb-symbol, .ffg-featured .ffb-symbol {
	position: absolute; right: 8px; bottom: 8px; z-index: 2;
	font-family: var(--ffg-head, 'Oswald', sans-serif); font-weight: 500; font-size: 9px; line-height: 1; letter-spacing: 1.3px; text-transform: uppercase;
	color: rgba(255,255,255,.92); background: rgba(0,0,0,.38); padding: 4px 6px; border-radius: 2px; pointer-events: none;
}
