/*
Theme Name: so2027
Description: Nachbau des Erscheinungsbilds von nws2026.ch als Basis für die neue Seite. Inhalte sind normale WordPress-Blöcke.
Version: 1.0
Requires at least: 6.6
Text Domain: so2027
*/

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--so-rot: #c8483a;
	--so-dunkel: #252525;
	--so-creme: #fbefdc;
	--so-schatten: 0 5px 15px 0 rgba(6, 13, 70, .1);
	--so-breite: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.45;
	color: var(--so-dunkel);
	background: var(--so-creme);
	-webkit-font-smoothing: antialiased;
}
/* Fest stehender Sägemehl-Hintergrund mit heller Überlagerung, links ein unverdeckter Rand */
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: url(assets/saegemehl.jpg) center / cover no-repeat; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(97% 150% at 100% 50%, rgba(255, 255, 255, .565) 100%, rgba(0, 0, 0, 0) 101%); }
img { max-width: 100%; height: auto; }
a { color: var(--so-rot); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { color: var(--so-rot); font-weight: 700; line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5, h6 { font-size: 1rem; }
p { margin: 0 0 1em; }

.so-container { max-width: var(--so-breite); margin: 0 auto; padding: 0 40px; }

/* ---------- Kopfzeile ---------- */
.so-header { background: rgba(255, 255, 255, .7); border-bottom: 4px solid var(--so-rot); position: relative; z-index: 20; }
.so-header-innen { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 124px; padding: 12px 10px; }
.so-nav { flex: 1 1 0; }
.so-nav-links .so-menu { justify-content: flex-end; }
.so-menu, .so-menu ul, .so-menu-mobil, .so-menu-mobil ul, .so-menu-fuss, .so-menu-rechtliches { list-style: none; margin: 0; padding: 0; }
.so-menu { display: flex; flex-wrap: nowrap; gap: 0 20px; white-space: nowrap; }
.so-menu > li { position: relative; }
.so-menu a { display: block; padding: 20px 0; font-size: 20px; font-weight: 700; color: var(--so-dunkel); }
.so-menu a:hover, .so-menu .current-menu-item > a, .so-menu .current-menu-parent > a, .so-menu .current_page_parent > a { color: var(--so-rot); text-decoration: none; }
.so-menu .sub-menu { display: none; position: absolute; top: 100%; left: -20px; min-width: 200px; background: #fff; border-radius: 8px; box-shadow: var(--so-schatten); padding: 10px 20px; z-index: 30; }
.so-menu > li:hover > .sub-menu, .so-menu > li:focus-within > .sub-menu { display: block; }
.so-menu .sub-menu a { padding: 8px 0; font-size: 18px; }
.so-logo { flex: 0 0 auto; display: block; font-weight: 700; font-size: 22px; }
.so-logo img { display: block; height: 100px; width: auto; }
.so-burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.so-burger span { display: block; width: 28px; height: 3px; margin: 5px 0; background: var(--so-dunkel); }
.so-mobil { padding: 10px 20px 20px; border-top: 1px solid rgba(0, 0, 0, .1); }
.so-menu-mobil a { display: block; padding: 10px 0; font-size: 20px; font-weight: 700; color: var(--so-dunkel); }
.so-menu-mobil .sub-menu a { padding-left: 20px; font-size: 18px; }

/* ---------- Startseite: Kopfbild ---------- */
.so-hero { background: #6d8a4a center / cover no-repeat; border-radius: 0 0 30px 30px; padding: 70px 20px 70px; text-align: center; }
.so-hero-text { color: var(--so-rot); font-weight: 700; line-height: 1; font-size: clamp(1.5rem, 6.4vw, 6rem); overflow-wrap: anywhere; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.so-hero-nummer { display: flex; align-items: center; justify-content: center; gap: .3em; -webkit-text-stroke: 3px var(--so-rot); -webkit-text-fill-color: transparent; text-shadow: none; }
.so-hero-nummer::before, .so-hero-nummer::after { content: ""; width: 1.4em; border-top: 3px solid #fff; }
.so-hero-logo { text-align: center; margin: 24px 0 30px; position: relative; }
.so-hero-logo img { width: 520px; max-width: 86vw; height: auto; }

/* ---------- Seitenkopf ---------- */
.so-seitenkopf { text-align: center; padding: 70px 20px 40px; }
.so-brotkrumen { font-weight: 700; }
.so-brotkrumen a { color: var(--so-dunkel); }
.so-brotkrumen span { color: var(--so-rot); }
.so-brotkrumen .so-trenner { margin: 0 .4em; }
.so-titel { margin: 10px 0 0; }
.so-titel::before { content: "❱"; margin-right: .5em; }
.so-datum { font-weight: 700; margin: .6em 0 0; }

/* ---------- Inhalt und Blöcke ---------- */
.so-main { display: block; padding-bottom: 60px; }
.so-inhalt > * { margin-top: 0; margin-bottom: 30px; }
.so-inhalt > *:last-child { margin-bottom: 0; }
.so-card { background: rgba(255, 255, 255, .8); border-radius: 8px; box-shadow: var(--so-schatten); padding: 40px; }
.so-card > *:last-child { margin-bottom: 0; }
.so-card-secondary { background: rgba(255, 255, 255, .68); }
.so-card-primary { background: var(--so-rot); color: #fff; box-shadow: 0 30px 60px 0 rgba(200, 72, 58, .25); }
.so-card-primary h1, .so-card-primary h2, .so-card-primary h3, .so-card-primary h4, .so-card-primary a, .so-card-primary .so-meta { color: #fff; }
.so-card-primary .wp-block-button__link { background: #fff; color: var(--so-rot); }
.so-card .so-card { box-shadow: none; padding: 0; background: none; }
.wp-block-columns { gap: 30px; margin-bottom: 30px; }
.wp-block-column > *:last-child { margin-bottom: 0; }
.so-item { margin-bottom: 24px; }
.so-meta { color: var(--so-rot); font-weight: 700; font-size: 1.25rem; margin: 0 0 .2em; }
.so-hinweis { opacity: .7; }
.so-linie { display: flex; align-items: center; gap: .6em; }
.so-linie::after { content: ""; flex: 0 1 140px; border-top: 2px solid currentColor; }
h2.so-linie { justify-content: center; font-size: 1.25rem; font-weight: 400; }
h2.so-linie::before { content: ""; flex: 0 1 140px; border-top: 2px solid currentColor; }

.wp-block-button__link { background: var(--so-rot); color: #fff; font-weight: 700; font-size: 1rem; border-radius: 6px; padding: .55em 1.6em; }
.wp-block-button__link:hover { text-decoration: none; filter: brightness(1.08); }
.wp-block-separator, .wp-block-separator:not(.is-style-wide):not(.is-style-dots) { border: 0; border-top: 1px solid rgba(200, 72, 58, .35); margin: 16px 0; width: 100%; max-width: none; }
.wp-block-image img { border-radius: 5px; }
.so-card .wp-block-columns { margin-bottom: 0; align-items: center; }
.so-karte, .so-einbettung { display: block; width: 100%; height: 460px; border: 0; border-radius: 8px; }

/* Galerien: Fotos, Personen (Text unter dem Bild), Logos */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 5px; box-shadow: 0 1px 4px 0 rgba(6, 13, 70, .1); }
.wp-block-gallery.so-fotos.has-nested-images figure.wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.wp-block-gallery.so-personen.has-nested-images { --wp--style--unstable-gallery-gap: 30px; gap: 30px; }
.wp-block-gallery.so-personen.has-nested-images figure.wp-block-image { flex-direction: column; align-items: stretch; }
.wp-block-gallery.so-personen.has-nested-images figure.wp-block-image::before { display: none; }
.wp-block-gallery.so-personen.has-nested-images figure.wp-block-image img { flex: none !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover; }
.wp-block-gallery.so-personen.has-nested-images figure.wp-block-image figcaption {
	position: static; background: none; color: var(--so-dunkel); text-shadow: none; text-align: left;
	padding: .6em 0 0; margin: 0; max-height: none; overflow: visible; font-size: 16px; line-height: 1.4; backdrop-filter: none;
}
.wp-block-gallery.so-personen.has-nested-images figure.wp-block-image figcaption a { color: var(--so-rot); }
.wp-block-gallery.so-logos.has-nested-images { --wp--style--unstable-gallery-gap: 24px; justify-content: center; gap: 24px; }
.wp-block-gallery.so-logos.has-nested-images figure.wp-block-image { width: auto !important; flex-grow: 0; }
.wp-block-gallery.so-logos.has-nested-images figure.wp-block-image img { flex: none !important; height: 90px !important; width: auto !important; max-width: 240px; object-fit: contain; background: #fff; }

/* Sponsoren als Namenskacheln, solange keine Logos vorliegen */
.so-sponsorliste { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.so-sponsorliste li { display: flex; align-items: center; justify-content: center; min-width: 180px; max-width: 280px; min-height: 90px; padding: 12px 20px; background: #fff; border-radius: 5px; box-shadow: 0 1px 4px 0 rgba(6, 13, 70, .1); font-weight: 700; text-align: center; }

/* Sponsoren: Logo-Kacheln und Namenskacheln gemischt in einer Reihe */
.so-sponsoren { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 24px; margin: 0 0 30px; }
.so-sponsoren > * { margin: 0; }
.so-sponsoren > .so-sponsor-name, .so-sponsoren > .wp-block-image.so-sponsor-logo {
	display: flex; align-items: center; justify-content: center; min-width: 180px; max-width: 280px; height: 114px; padding: 12px 20px;
	background: #fff; border-radius: 5px; box-shadow: 0 1px 4px 0 rgba(6, 13, 70, .1); font-weight: 700; text-align: center;
}
.so-sponsoren > .wp-block-image.so-sponsor-logo img { display: block; max-width: 230px; max-height: 90px; width: auto; height: auto; object-fit: contain; border-radius: 0; }

/* Neueste Beiträge in der roten Karte */
.so-aktuell { list-style: none; padding: 0; margin: 0 0 30px; }
.so-aktuell li { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .5); overflow: hidden; }
.so-aktuell li:last-child { border-bottom: 0; }
.so-aktuell a.wp-block-latest-posts__post-title { font-weight: 700; }
.so-aktuell time { display: block; font-size: 14px; }
.so-aktuell .wp-block-latest-posts__featured-image { width: 70px; margin: 0 14px 0 0; }
.so-aktuell .wp-block-latest-posts__featured-image img { width: 70px; height: 50px; object-fit: cover; border-radius: 4px; }

/* ---------- Beitragsliste ---------- */
.so-beitragsliste { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.so-beitragskarte { padding: 24px; }
.so-beitragsbild img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; margin-bottom: 14px; }
.so-beitragskarte .so-datum { margin: 0 0 .2em; font-size: 16px; font-weight: 400; }
.so-beitragstitel { font-size: 1.25rem; margin: 0; }
.so-beitragstitel a { color: var(--so-rot); }
.navigation.pagination { margin-top: 30px; text-align: center; font-weight: 700; }

/* ---------- Fusszeile ---------- */
.so-sponsorenband { padding: 40px 0 60px; }
.so-footer { background: rgba(255, 255, 255, .68); padding: 40px 0 24px; }
.so-footer-innen { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.so-footer h2 { font-size: 1rem; }
.so-zaehler { text-align: center; }
.so-zaehler h2.so-linie { font-weight: 400; white-space: nowrap; }
.so-zaehler h2.so-linie::before, .so-zaehler h2.so-linie::after { flex: 1 1 40px; min-width: 30px; }
.so-zaehler-werte { display: flex; justify-content: center; align-items: flex-start; gap: 10px; color: var(--so-rot); }
.so-zaehler-werte > div { display: flex; flex-direction: column; align-items: center; min-width: 2.2em; }
.so-zaehler-zahl, .so-zaehler-trenner { font-size: 2rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.so-zaehler-label { font-size: 16px; margin-top: 4px; }
.so-menu-fuss { columns: 2; column-gap: 40px; }
.so-menu-fuss li { padding: 4px 0; }
.so-knopf { display: inline-block; background: var(--so-rot); color: #fff; font-weight: 700; border-radius: 6px; padding: .55em 1.6em; }
.so-knopf:hover { text-decoration: none; filter: brightness(1.08); }
.so-footer-unten { margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(0, 0, 0, .12); }
.so-menu-rechtliches { display: flex; justify-content: center; gap: 0; }
.so-menu-rechtliches li + li { border-left: 2px solid var(--so-dunkel); margin-left: 10px; padding-left: 10px; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 1400px) {
	.so-menu { gap: 0 12px; }
	.so-menu a { font-size: 18px; }
}
@media (max-width: 1100px) {
	.so-nav { display: none; }
	.so-header-innen { justify-content: space-between; min-height: 90px; }
	.so-logo img { height: 70px; }
	.so-burger { display: block; }
}
@media (min-width: 1101px) {
	.so-mobil { display: none !important; }
}
@media (max-width: 782px) {
	.so-container { padding: 0 16px; }
	.so-card { padding: 24px; }
	.so-seitenkopf { padding: 40px 16px 24px; }
	.so-beitragsliste { grid-template-columns: 1fr; }
	.so-hero { padding: 40px 16px 90px; }
}
@media (min-width: 783px) and (max-width: 1100px) {
	.so-beitragsliste { grid-template-columns: repeat(2, 1fr); }
}
