/*
Theme Name: Empersdorf 2026
Theme URI: https://empersdorf.gv.at
Author: Gemeinde Empersdorf
Description: Schlichtes, barrierearmes Theme für die Website der Gemeinde Empersdorf. Klare Typografie, Logo-Blau, Seitennavigation nach Bereichen.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: empersdorf-2026
*/

:root {
	--blue: #0A4A7F;
	--blue-dark: #06335A;
	--blue-soft: #EAF0F7;
	--ink: #1A2330;
	--ink-2: #2E3947;
	--muted: #4A5563;
	--line: #D5DBE3;
	--line-2: #E4E8EE;
	--bg-soft: #F3F5F8;
	--wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: 'Source Sans 3', Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: #fff;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid #F2A900; outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: var(--blue); padding: 10px 16px; font-weight: 700; }
.skip-link:focus { left: 16px; top: 8px; }

.h2 { margin: 0 0 20px; font-size: 28px; line-height: 1.2; font-weight: 700; }
.h3 { margin: 0 0 14px; font-size: 22px; line-height: 1.25; font-weight: 700; }
.h4 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.strong { font-weight: 600; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 22px; background: var(--blue); color: #fff; font-weight: 600; text-decoration: none; border: 1px solid var(--blue); }
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--blue); }
.btn--ghost:hover { background: var(--blue-soft); color: var(--blue-dark); }

/* Kopf */
.topbar { background: var(--blue); color: #fff; font-size: 14px; }
.topbar__inner { display: flex; flex-wrap: wrap; gap: 6px 32px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.topbar__links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.site-header { position: relative; border-bottom: 1px solid var(--line); background: #fff; z-index: 30; }
.site-header__inner { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; }
.brand__logo { height: 96px; width: auto; display: block; }
.search { display: flex; flex: 0 1 380px; min-width: 240px; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 14px; border: 1px solid #8A96A6; border-right: 0; border-radius: 0; }
.search button { font: inherit; font-size: 16px; font-weight: 600; padding: 10px 18px; background: var(--blue); color: #fff; border: 0; border-radius: 0; cursor: pointer; }
.menu-toggle { display: none; font: inherit; font-weight: 600; padding: 10px 16px; border: 1px solid var(--ink); background: #fff; cursor: pointer; }
.mainnav { border-top: 1px solid var(--line); }
.mainnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 32px; }
.mainnav__item { margin: 0; }
.mainnav__top { display: inline-flex; align-items: center; gap: 6px; padding: 14px 0 11px; font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; cursor: pointer; text-decoration: none; }
.mainnav__top:hover, .mainnav__top.is-active, .mainnav__top[aria-expanded="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(26, 35, 48, .12); }
.mega[hidden] { display: none; }
.mega__inner { display: flex; flex-wrap: wrap; gap: 24px 48px; padding-top: 28px; padding-bottom: 32px; }
.mega__head { flex: 1 1 220px; min-width: 0; }
.mega__title { font-size: 24px; font-weight: 700; color: var(--ink); text-decoration: none; }
.mega__title:hover { color: var(--blue); text-decoration: underline; }
.mega__list { flex: 3 1 560px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 32px; }
.mega__list li { border-bottom: 1px solid var(--line-2); }
.mega__link { display: block; padding: 10px 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.mega__link--sub { padding-left: 16px; font-weight: 400; color: var(--ink-2); }
.mega__link:hover { color: var(--blue); text-decoration: underline; }

/* Startseite */
.hero { position: relative; }
.hero__img { display: block; width: 100%; height: 520px; object-fit: cover; object-position: center 78%; }
.hero__box { position: relative; margin-top: -120px; background: #fff; max-width: 640px; padding: 32px 36px; border-top: 4px solid var(--blue); display: flex; flex-direction: column; gap: 14px; }
.hero__box h1 { margin: 0; font-size: 40px; line-height: 1.15; }
.hero__box p { margin: 0; font-size: 19px; color: var(--ink-2); }
.section { padding-top: 64px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.quick__item { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.quick__item svg { color: var(--blue); flex: 0 0 auto; }
.quick__item > span { display: flex; flex-direction: column; }
.quick__item strong { font-weight: 600; }
.quick__item > span > span { font-size: 15px; color: var(--muted); }
.quick__item:hover { background: var(--bg-soft); }
.quick__item:hover strong { color: var(--blue); text-decoration: underline; }
.greeting { display: flex; flex-wrap: wrap; gap: 48px; align-items: stretch; }
.greeting__img { flex: 1 1 380px; min-width: 0; margin: 0; }
.greeting__img img { display: block; width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.greeting__text { flex: 999 1 520px; min-width: 0; }
.greeting__text .h2 { font-size: 32px; margin-bottom: 14px; }
.greeting__text p { margin: 0 0 14px; }
.greeting__sig { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 32px; align-items: baseline; }
.greeting__sig > span:first-child { display: flex; flex-direction: column; }
.greeting__sig strong { font-size: 19px; }
.greeting__sig > span:first-child span { font-size: 15px; color: var(--muted); }
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split__main { flex: 999 1 560px; min-width: 0; }
.split__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 0; }
.sechead .h2 { margin: 0; }
.sechead a { font-weight: 600; }
.newslist { list-style: none; margin: 0 0 32px; padding: 0; }
.newslist__item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.newslist__item time { font-size: 15px; color: var(--muted); font-weight: 600; }
.newslist__item > span { display: flex; flex-direction: column; gap: 4px; }
.newslist__item a { font-size: 20px; font-weight: 600; color: var(--ink); text-decoration: none; }
.newslist__item a:hover { color: var(--blue); text-decoration: underline; }
.newslist__item > span > span { color: var(--ink-2); }
.newslist--full { border-top: 1px solid var(--line); }
.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.docs__item { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.docs__item svg { color: var(--blue); flex: 0 0 auto; }
.docs__item > span { display: flex; flex-direction: column; }
.docs__item strong { font-size: 18px; font-weight: 600; }
.docs__item > span > span { font-size: 14px; color: var(--muted); }
.docs__item:hover strong { color: var(--blue); text-decoration: underline; }
.box { border: 1px solid var(--line); padding: 24px; }
.box p { margin: 0 0 14px; }
.box--accent { border-top: 4px solid var(--blue); }
.box--muted { background: var(--bg-soft); border: 0; font-size: 16px; padding: 20px 22px; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { text-align: left; font-weight: 600; }
.hours td { text-align: right; }
.dw { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; font-size: 16px; }
.dw dd { margin: 0; }
.gallery3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 24px; }
.gallery3 figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery3 img { display: block; width: 100%; height: 220px; object-fit: cover; }
.gallery3 figcaption { font-size: 15px; color: var(--muted); }

/* Unterseiten */
.page-layout { padding-top: 28px; }
.crumbs { font-size: 15px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.page-layout__cols { display: flex; flex-wrap: wrap; gap: 48px; margin-top: 24px; align-items: flex-start; }
.page-layout__side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.page-layout__main { flex: 999 1 640px; min-width: 0; max-width: 860px; }
.page-title { margin: 0 0 20px; font-size: 40px; line-height: 1.15; font-weight: 700; }
.page-hero img { display: block; width: 100%; height: 360px; object-fit: cover; margin-bottom: 28px; }
.meta { margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.sidenav { border-top: 4px solid var(--blue); }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav li { border-bottom: 1px solid var(--line-2); }
.sidenav li li { border-bottom: 0; border-top: 1px solid var(--line-2); }
.sidenav__title { display: block; padding: 14px 0 10px; font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.sidenav__link { display: block; padding: 10px 12px; color: var(--ink); font-weight: 600; text-decoration: none; font-size: 16px; }
.sidenav__link--sub { padding-left: 28px; font-weight: 400; color: var(--ink-2); }
.sidenav__link:hover { color: var(--blue); text-decoration: underline; }
.sidenav__link.is-current { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tiles__item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.tiles__item svg { color: var(--blue); flex: 0 0 auto; }
.tiles__item:hover { background: var(--bg-soft); color: var(--blue); }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pagination .page-numbers, .nav-links .page-numbers { padding: 6px 12px; border: 1px solid var(--line); text-decoration: none; }
.pagination .current, .nav-links .current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Inhalte (auch aus Elementor) vereinheitlichen */
.entry-content { font-size: 17px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h1, .entry-content h2 { font-size: 26px; line-height: 1.25; margin: 36px 0 12px; font-weight: 700; color: var(--ink); }
.entry-content h3 { font-size: 21px; line-height: 1.3; margin: 28px 0 8px; font-weight: 700; color: var(--ink); }
.entry-content h4, .entry-content h5 { font-size: 18px; margin: 22px 0 6px; font-weight: 700; color: var(--ink); }
.entry-content p { margin: 0 0 14px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 22px; }
.entry-content li { margin-bottom: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 16px; }
.entry-content th, .entry-content td { padding: 10px 16px 10px 0; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; background: transparent; }
.entry-content tr:nth-child(odd) td, .entry-content tr:nth-child(even) td { background: transparent; }
.entry-content img { display: block; }
.entry-content figure { margin: 0 0 24px; }
.entry-content figcaption, .entry-content .wp-caption-text { font-size: 15px; color: var(--muted); margin-top: 8px; }
.entry-content iframe { max-width: 100%; }
.entry-content .elementor-heading-title { font-family: inherit !important; color: var(--ink) !important; }
.entry-content .elementor-widget-text-editor, .entry-content .elementor-widget-text-editor p, .entry-content .elementor-icon-list-text { font-family: inherit !important; color: var(--ink) !important; font-size: 17px !important; line-height: 1.6 !important; }
.entry-content .elementor-section, .entry-content .elementor-container, .entry-content .elementor-column, .entry-content .elementor-widget-wrap, .entry-content .elementor-column-wrap, .entry-content .e-con { background-color: transparent !important; background-image: none !important; box-shadow: none !important; }
.entry-content .elementor-section.elementor-section-boxed > .elementor-container { max-width: 100%; }
.entry-content .elementor-button { background: var(--blue) !important; color: #fff !important; border-radius: 0 !important; font-family: inherit !important; font-weight: 600 !important; }
.entry-content .elementor-divider-separator { border-color: var(--line) !important; }
.entry-content a { color: var(--blue); }

/* Fuß */
.site-footer { margin-top: 80px; background: var(--ink); color: #E8ECF1; font-size: 16px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.site-footer h2 { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: #fff; }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: #E8ECF1; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid #3A4656; font-size: 14px; color: #C3CBD5; }

.notfound { padding: 48px 0; }

/* Mobil */
@media (max-width: 820px) {
	.menu-toggle { display: inline-block; }
	.search { flex-basis: 100%; order: 3; }
	.mainnav { display: none; }
	.mainnav.is-open { display: block; }
	.mainnav__list { flex-direction: column; }
	.mainnav__top { width: 100%; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
	.mega { position: static; box-shadow: none; border: 0; }
	.mega__inner { padding-top: 8px; padding-bottom: 16px; }
	.mega__head { display: none; }
	.hero__img { height: 280px; }
	.hero__box { margin-top: -60px; padding: 24px; }
	.hero__box h1, .page-title { font-size: 30px; }
	.newslist__item { grid-template-columns: 1fr; gap: 4px; }
	.page-hero img { height: 220px; }
}
.tiles-head { margin-top: 40px; }

/* Personen-Tabellen (Team-Seiten) als Porträtkarten darstellen */
.entry-content table:has(td img) { display: block; border: 0; margin-bottom: 32px; }
.entry-content table:has(td img) > tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 280px)); gap: 16px; }
.entry-content table:has(td img) tr { display: flex; flex-direction: column; border: 1px solid var(--line); background: #fff; height: auto !important; width: auto !important; min-width: 0; overflow: hidden; }
.entry-content table:has(td img) tr:has(th) { grid-column: 1 / -1; border: 0; background: transparent; }
.entry-content table:has(td img) th { display: block; padding: 12px 0 0; border: 0; font-size: 22px; font-weight: 700; color: var(--ink); }
.entry-content table:has(td img) th:empty { display: none; }
.entry-content table:has(td img) td, .entry-content table:has(td img) th { width: auto !important; height: auto !important; text-align: left !important; }
.entry-content table:has(td img) td { display: block; padding: 0; border: 0; min-width: 0; }
.entry-content table:has(td img) td:empty { display: none; }
.entry-content table:has(td img) td img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%; background: var(--bg-soft); }
.entry-content table:has(td img) tr:has(td:nth-child(3)) td:nth-child(2) { order: 1; }
.entry-content table:has(td img) tr:has(td:nth-child(3)) td:first-child { order: 2; padding: 12px 16px 0; }
.entry-content table:has(td img) tr:has(td:nth-child(3)) td:first-child img { width: auto; height: 22px; aspect-ratio: auto; object-fit: contain; background: transparent; }
.entry-content table:has(td img) td:last-child:not(:has(img)) { order: 3; padding: 10px 16px 16px; font-size: 15px; line-height: 1.5; }
.entry-content table:has(td img) td:last-child:not(:has(img)) strong, .entry-content table:has(td img) td:last-child:not(:has(img)) b { display: block; font-size: 18px; }

/* Externe Seiten, die sich nicht einbetten lassen, ausblenden */
.entry-content iframe[src*="wikipedia.org"] { display: none; }
.entry-content table:has(td img) td { overflow-wrap: anywhere; }

.greeting__img img { object-position: center 25%; }
.greeting { padding-bottom: 8px; }

.entry-content img.aligncenter, .entry-content .aligncenter img { margin-left: auto; margin-right: auto; }
