/*
Theme Name: versus POLEN
Description: Theme für versus-online.de – bewährter Aufbau (Tulpen-Kopf, Themenleiste, Beiträge mit Seitenleiste), modern und für alle Geräte. Deutsch und Polnisch getrennt über die Kategorien.
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: versus
*/

/* ---------- Farben & Schriften ---------- */
:root {
	--navy: #09043E;
	--navy-2: #14105A;
	--steel: #8EABC2;
	--mist: #D7E1EA;
	--mist-2: #E9EFF5;
	--line: #DCE6EE;
	--ink: #1B2440;
	--ink-2: #3B4763;
	--ink-3: #4A5A78;
	--link: #1F5A8C;
	--rose: #E7A6B9;
	--white: #FFFFFF;
	--serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
	--script: "Monotype Corsiva", "Apple Chancery", "URW Chancery L", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 14px;
}

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

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

body {
	margin: 0;
	background: var(--navy);
	color: var(--ink);
	font: 17px/1.65 var(--sans);
	padding: 24px 16px 40px;
}

a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--navy); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }

img { max-width: 100%; height: auto; }

.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 100;
	background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 16px; }

/* ---------- Rahmen ---------- */
.site {
	max-width: 1180px;
	margin: 0 auto;
	background: var(--white);
	border-radius: 16px;
	overflow: hidden;
}

/* ---------- Kopf ---------- */
.site-header {
	position: relative;
	aspect-ratio: 900 / 200;
	min-height: 150px;
	max-height: 280px;
	width: 100%;
	background-color: var(--steel);
	background-size: cover;
	background-position: center 40%;
}
.site-brand {
	position: absolute;
	right: 6%;
	bottom: 14%;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	color: var(--white);
	text-shadow: 0 1px 2px rgba(9, 4, 62, 0.55), 0 0 18px rgba(9, 4, 62, 0.35);
	text-decoration: none;
	line-height: 1.1;
}
.site-brand:hover { color: var(--white); text-decoration: none; }
.site-title { font: italic 700 clamp(28px, 4.2vw, 46px)/1 var(--script); }
.site-claim { font: italic 400 clamp(15px, 2.2vw, 26px)/1.2 var(--script); }

/* ---------- Themenleiste ---------- */
.site-nav {
	background: var(--steel);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	padding: 6px 24px;
}
.topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.topics a {
	display: block;
	padding: 10px 0 7px;
	color: var(--navy);
	font-weight: 600;
	border-bottom: 3px solid transparent;
}
.topics a:hover { text-decoration: none; border-bottom-color: rgba(9, 4, 62, 0.4); }
.topics a[aria-current] { border-bottom-color: var(--navy); font-weight: 700; }

.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 48px; min-height: 40px; padding: 0 14px;
	border: 1px solid var(--navy); border-radius: 999px;
	color: var(--navy); font-weight: 700; font-size: 14px;
}
.lang-switch a:hover { text-decoration: none; background: rgba(9, 4, 62, 0.1); }
.lang-switch a[aria-current] { background: var(--navy); color: var(--white); }

/* ---------- Inhalt + Seitenleiste ---------- */
.site-body {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	padding: 36px 24px 48px;
}
.content { flex: 999 1 600px; min-width: 0; }
.sidebar { flex: 1 1 260px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }

.page-title, .entry-title {
	margin: 0 0 22px;
	font: 600 clamp(28px, 3.4vw, 38px)/1.15 var(--serif);
	color: var(--navy);
}
.term-desc { color: var(--ink-2); margin: -8px 0 22px; }

/* ---------- Beitragskarten ---------- */
.cards { display: flex; flex-direction: column; gap: 22px; }
.card {
	display: flex;
	flex-wrap: wrap;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--white);
}
.card-thumb { flex: 1 1 240px; display: block; background: var(--mist-2); min-height: 180px; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { flex: 2 1 320px; min-width: 0; padding: 22px 26px; display: flex; flex-direction: column; gap: 8px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-3); }
.tag {
	background: var(--mist-2); color: var(--link); font-weight: 700;
	padding: 3px 11px; border-radius: 999px; font-size: 13px;
}
.card-title { margin: 0; font: 600 26px/1.2 var(--serif); }
.card-title a { color: var(--navy); }
.card-excerpt { margin: 0; color: var(--ink-2); }
.more { font-weight: 700; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--line); border-radius: 8px; font-weight: 600;
}
.pagination .current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pagination .dots { border: 0; }

/* ---------- Einzelbeitrag ---------- */
.entry-header .card-meta { margin-bottom: 12px; }
.entry-content > :not(.vgal):not(.wp-caption):not(figure):not(table) { max-width: 72ch; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content h2, .entry-content h3 { font-family: var(--serif); color: var(--navy); line-height: 1.25; margin: 1.6em 0 0.5em; }
.entry-content img { border-radius: 8px; margin: 4px 6px 4px 0; vertical-align: top; }
.entry-content a img { display: inline-block; }
.entry-content .wp-caption, .entry-content figure {
	max-width: 100% !important; margin: 0 0 1.2em; display: inline-block; vertical-align: top;
}
.entry-content .wp-caption-text, .entry-content figcaption {
	font-size: 14px; color: var(--ink-3); font-style: italic; margin: 4px 0 0;
}
.entry-content .alignleft { float: left; margin: 0 20px 12px 0; }
.entry-content .alignright { float: right; margin: 0 0 12px 20px; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--steel); color: var(--ink-2); font-style: italic; }
.entry-content table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.entry-content td, .entry-content th { border: 1px solid var(--line); padding: 6px 10px; }
.entry-content iframe { max-width: 100%; }

/* ---------- Galerie-Raster ---------- */
.vgal {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 14px;
	margin: 1.6em 0 2em;
}
.vgal-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.vgal-item { margin: 0; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.vgal-link {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 10px;
	background: var(--mist-2);
}
.entry-content .vgal-link img {
	width: 100%; height: 100%;
	object-fit: cover;
	margin: 0; border-radius: 0;
	display: block;
	transition: transform 0.35s ease;
}
.vgal-link::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(9, 4, 62, 0.35), transparent 45%);
	opacity: 0; transition: opacity 0.25s ease;
}
.vgal-link:hover img, .vgal-link:focus-visible img { transform: scale(1.05); }
.vgal-link:hover::after, .vgal-link:focus-visible::after { opacity: 1; }
.vgal-item figcaption {
	font-size: 14px; line-height: 1.35; color: var(--ink-3);
	overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.entry-content a[data-lightbox="single"] { cursor: zoom-in; }

/* ---------- Bildbetrachter ---------- */
html.vlb-open { overflow: hidden; }
.vlb {
	width: 100vw; height: 100dvh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0;
	background: rgba(6, 3, 30, 0.96);
	color: var(--white);
}
.vlb::backdrop { background: rgba(6, 3, 30, 0.96); }
.vlb[open] { display: grid; grid-template-rows: 1fr auto; }
.vlb-stage {
	display: flex; align-items: center; justify-content: center;
	padding: 64px 72px 12px; min-height: 0;
}
.vlb-img {
	max-width: 100%; max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	opacity: 0; transition: opacity 0.25s ease;
}
.vlb-img.is-ready { opacity: 1; }
.vlb-bar {
	display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
	padding: 12px 24px 20px; max-width: 1100px; width: 100%; margin: 0 auto; box-sizing: border-box;
}
.vlb-cap { margin: 0; font: italic 17px/1.4 var(--serif); color: #E6ECF2; }
.vlb-count { font-size: 14px; color: #B8C6D6; white-space: nowrap; margin-left: auto; }
.vlb-btn {
	position: absolute;
	width: 48px; height: 48px; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.08);
	color: var(--white);
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; transition: background 0.2s ease;
}
.vlb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.vlb-btn[hidden] { display: none; }
.vlb-close { top: 14px; right: 14px; }
.vlb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.vlb-next { right: 14px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
	.vgal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.vgal-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vlb-stage { padding: 60px 8px 8px; }
	.vlb-prev, .vlb-next { top: auto; bottom: 14px; transform: none; }
	.vlb-bar { padding: 10px 16px 76px; }
}
@media (prefers-reduced-motion: reduce) {
	.vgal-link img, .vlb-img, .vgal-link::after { transition: none; }
}

.post-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-nav a {
	flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px;
	padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); font-weight: 600;
}
.post-nav a span { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.post-nav .next { text-align: right; }

/* ---------- Seitenleiste ---------- */
.box { border-radius: var(--radius); padding: 20px 22px; }
.box-light { background: var(--mist); }
.box-dark { background: var(--navy); color: var(--white); }
.box-outline { border: 1px solid var(--line); }
.box-title {
	display: block; margin: 0 0 10px;
	font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #2A3A55;
}
.box-dark .box-title { color: var(--rose); }
.box-heading { margin: 0 0 8px; font: 600 24px/1.2 var(--serif); color: var(--navy); }
.box-outline p { margin: 0 0 8px; font-size: 15px; color: var(--ink-2); }

.search-row { display: flex; gap: 6px; }
.search-row input[type="search"] {
	flex: 1; min-width: 0; min-height: 44px; padding: 0 12px;
	border: 1px solid #A9BED0; border-radius: 8px; font: inherit; font-size: 15px; background: var(--white);
}
.search-row button {
	min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px;
	background: var(--navy); color: var(--white); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}

.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.events a { display: flex; gap: 12px; align-items: center; color: var(--white); }
.events a:hover { color: var(--white); }
.ev-date {
	flex: 0 0 60px; height: 60px; border-radius: 10px; background: var(--steel); color: var(--navy);
	font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1;
}
.ev-title { font-size: 15px; line-height: 1.35; }

.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-list a {
	display: flex; justify-content: space-between; gap: 8px;
	padding: 8px 0; border-bottom: 1px solid #C3D2DF; color: var(--navy);
}
.topic-list li:last-child a { border-bottom: 0; }
.topic-list a[aria-current] { font-weight: 700; }
.topic-list .count { color: var(--ink-3); font-size: 14px; }

/* ---------- Fuß ---------- */
.site-footer {
	background: var(--steel); color: var(--navy);
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
	padding: 16px 24px; font-size: 15px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 24px; }
.site-footer a { color: var(--navy); font-weight: 600; display: inline-block; padding: 8px 0; }

/* ---------- Handy ---------- */
@media (max-width: 640px) {
	body { padding: 0; font-size: 16px; }
	.site { border-radius: 0; }
	.site-header { min-height: 130px; }
	.site-nav { padding: 6px 16px; }
	.topics { gap: 0 18px; }
	.site-body { padding: 24px 16px 36px; gap: 28px; }
	.card-body { padding: 18px; }
	.card-title { font-size: 22px; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 0 0 12px; }
}

/* WordPress-Pflichtklassen */
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
.sticky, .gallery-caption, .bypostauthor { }
