/*
Theme Name: SDS Graphy
Theme URI: https://sds.news
Description: Child Theme von Twenty Twenty-Five, das Typografie und Layout von Graphy Pro nachbildet (Lora / Source Serif Pro, zentrierter Header mit Navigationsleiste, Seitenleiste nur bei Beiträgen). Ohne Elementor, Schriften lokal eingebunden.
Author: sds.news
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sds-graphy
*/

/* ------------------------------------------------------------
   Grundlagen
------------------------------------------------------------ */
body {
	word-wrap: break-word;
	-webkit-font-smoothing: antialiased;
}
@media (max-width: 781px) {
	body { font-size: 17px; }
}
::selection {
	background-color: #fffad3;
	color: #333;
}
:where(.wp-site-blocks) a {
	transition: color .2s ease-in-out, opacity .2s ease-in-out, background-color .2s ease-in-out;
}
:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-1);
	outline-offset: 2px;
}

/* Nur für Screenreader sichtbar */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px !important;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px !important;
	word-wrap: normal !important;
}

/* Titel-Links ohne Unterstreichung */
.wp-block-post-title a,
.wp-block-site-title a { text-decoration: none; }

/* Abstand zwischen Header, Inhalt, Footer: die Blöcke regeln das selbst */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ------------------------------------------------------------
   Header
------------------------------------------------------------ */
.graphy-header {
	margin-bottom: clamp(45px, 6vw, 75px);
}
.graphy-branding {
	padding-top: clamp(25px, 4vw, 40px);
	padding-bottom: clamp(40px, 5vw, 50px);
	text-align: center;
}
.graphy-branding .wp-block-site-title { margin: 0; }
.graphy-branding .wp-block-site-title a:hover { opacity: .8; }
.graphy-branding .wp-block-site-tagline { margin-top: 4px; }

/* Navigationsleiste mit Linien oben/unten */
.graphy-navbar {
	position: relative;
	border-top: 1px solid var(--wp--preset--color--accent-6);
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	min-height: 58px;
	align-items: center;
}
.graphy-navbar > .wp-block-navigation {
	flex: 1 1 auto;
	justify-content: center;
}
.graphy-navbar .wp-block-navigation .wp-block-navigation-item__content {
	padding: 17px 18px;
	line-height: 24px;
}
.graphy-navbar .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.graphy-navbar .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent-1);
}
/* Untermenü wie Graphy: weiss, feiner Schatten, nicht in Versalien */
.graphy-navbar .wp-block-navigation .wp-block-navigation__submenu-container {
	background: #fff;
	border: none !important;
	box-shadow: 0 1px 3px #ddd;
	min-width: 220px !important;
	text-transform: none;
	font-size: 16px;
}
.graphy-navbar .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	border-top: 1px solid #eee;
	padding: 14px 18px;
	line-height: 1.5;
}
.graphy-navbar .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item:first-child > .wp-block-navigation-item__content {
	border-top: none;
}
.graphy-navbar .wp-block-navigation .has-child > .wp-block-navigation-item__content { padding-right: 4px; }
.graphy-navbar .wp-block-navigation .has-child > .wp-block-navigation__submenu-icon { margin: 0 18px 0 0; }
.graphy-navbar .wp-block-navigation__submenu-container .has-child > .wp-block-navigation__submenu-icon { margin-right: 10px; }

/* Suche rechts, nur Lupe, Feld klappt auf */
.graphy-navbar .wp-block-search {
	flex: 0 0 auto;
	margin: 0;
}
.graphy-navbar .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	padding: 6px;
	border: none;
	margin-left: 0;
}
.graphy-navbar .wp-block-search .wp-block-search__button svg,
.graphy-navbar .wp-block-search__button.has-icon svg {
	width: 30px;
	height: 30px;
	fill: currentColor;
	min-width: 30px;
}
.graphy-navbar .wp-block-search__button:hover { background: transparent; color: var(--wp--preset--color--accent-1); }
.graphy-navbar .wp-block-search__input {
	border: 1px solid #eee;
	border-radius: 0;
	font-family: inherit;
	font-size: 16px;
	padding: 6px 10px;
}
.graphy-navbar .wp-block-search.wp-block-search__searchfield-hidden .wp-block-search__input { border: none; }
@media (min-width: 782px) {
	/* Suche absolut rechts, damit das Menü echt zentriert ist */
	.graphy-navbar .wp-block-search {
		position: absolute;
		right: 0;
		top: 50%;
		transform: translateY(-50%);
		background: #fff;
	}
}

/* Mobile: Hamburger mit Beschriftung «MENU» wie bei Graphy */
.wp-block-navigation__responsive-container-open {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 0;
	color: var(--wp--preset--color--contrast);
}
.wp-block-navigation__responsive-container-open::after {
	content: "Menu";
	text-transform: uppercase;
	font-size: 17px;
	letter-spacing: .02em;
}
@media (max-width: 781px) {
	.graphy-navbar > .wp-block-navigation { justify-content: flex-start; }
}
.wp-block-navigation__responsive-container.is-menu-open {
	padding: 30px clamp(20px, 5vw, 40px);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding: 10px 0 !important;
}

/* ------------------------------------------------------------
   Inhalt allgemein
------------------------------------------------------------ */
.graphy-main {
	margin-bottom: clamp(60px, 8vw, 80px);
}
.entry-content > h1:first-child,
.entry-content > h2:first-child,
.entry-content > h3:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 2em; margin-bottom: 1em; }
.entry-content h3, .entry-content h4 { margin-top: 1.5em; margin-bottom: 1em; }
.entry-content img { height: auto; }

/* Seitenkopf zentriert (Vorlage «Seite mit Titel») */
.graphy-page-header { text-align: center; margin-bottom: 40px; }

/* ------------------------------------------------------------
   Beitrag (single)
------------------------------------------------------------ */
.graphy-cats {
	margin-bottom: 8px;
	font-size: 13px;
	letter-spacing: .02em;
}
.graphy-cats .wp-block-post-terms__separator { color: #ccc; margin: 0 4px; }
.graphy-cats a:hover { opacity: .8; }

.graphy-meta {
	color: #999;
	font-size: 15px;
	margin-top: 12px !important;
	gap: .3em;
}
.graphy-meta p { margin: 0; }
.graphy-meta a {
	color: #999;
	text-decoration: none;
	border-bottom: 1px solid #ccc;
}
.graphy-meta a:hover { color: #666; }

.graphy-entry-header { margin-bottom: 40px; }
.graphy-entry-header > * { margin-top: 0; margin-bottom: 0; }
.graphy-entry-header > .graphy-cats { margin-bottom: 8px; }
.graphy-single .wp-block-post-featured-image { margin-bottom: 40px; overflow: hidden; }

/* Schlagwörter unter dem Beitrag */
.graphy-tags {
	color: #999;
	font-size: 15px;
	text-align: center;
	padding-top: 25px;
	text-transform: none;
}
.graphy-tags a { color: #777 !important; }
.graphy-tags .wp-block-post-terms__prefix { color: #bbb; }

/* Autorenprofil (Graphy «Author Profile») */
.graphy-author-box {
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	margin-top: 60px !important;
	padding: 30px 0 35px;
	gap: 20px;
	align-items: center;
}
.graphy-author-box .wp-block-avatar img { border-radius: 50%; }
.graphy-author-box .wp-block-post-author-name { font-weight: 700; font-size: 16px; }
.graphy-author-box .wp-block-post-author-biography { font-size: 16px; margin-top: 6px; color: #555; }

/* Zweispaltig: Inhalt | Seitenleiste mit vertikaler Linie */
@media (min-width: 980px) {
	.graphy-layout { gap: 0 !important; flex-wrap: nowrap !important; }
	.graphy-layout > .graphy-content-col {
		flex-basis: 62.5% !important;
		border-right: 1px solid var(--wp--preset--color--accent-6);
		padding-right: 5.36%;
	}
	.graphy-layout > .graphy-sidebar-col {
		flex-basis: 37.5% !important;
		padding-left: 5.36%;
	}
}
@media (max-width: 979px) {
	.graphy-layout { flex-direction: column; }
	.graphy-layout > .wp-block-column { flex-basis: 100% !important; }
	.graphy-sidebar-col {
		border-top: 1px solid #eee;
		padding-top: 60px;
		margin-top: 20px;
	}
}

/* ------------------------------------------------------------
   Seitenleiste (Widgets)
------------------------------------------------------------ */
.graphy-sidebar {
	color: #555;
	font-size: 15px;
	line-height: 1.5;
}
.graphy-sidebar > * + * { margin-top: 0; }
.graphy-widget { margin-bottom: 60px !important; }
.graphy-widget-title {
	font-family: var(--wp--preset--font-family--lora) !important;
	font-size: 15px !important;
	letter-spacing: .075em !important;
	text-transform: uppercase;
	margin: 0 0 16px !important;
	color: var(--wp--preset--color--accent-3);
}
.graphy-sidebar p { margin: 0; }
.graphy-sidebar a { color: inherit; }
.graphy-sidebar a:hover { color: #111; }
.graphy-sidebar select {
	font-family: inherit;
	font-size: 15px;
	padding: 5px 8px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
	max-width: 100%;
}
/* Schlagwort-Wolke: graue Kästchen wie Graphy */
.graphy-sidebar .wp-block-tag-cloud {
	line-height: 2.1;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.graphy-sidebar .wp-block-tag-cloud a {
	background-color: #eee;
	border-radius: 3px;
	color: #777;
	display: inline-block;
	font-size: 13px !important;
	line-height: 1.6;
	padding: 3px 8px;
	text-decoration: none;
	margin: 0 !important;
}
.graphy-sidebar .wp-block-tag-cloud a:hover { background-color: #ddd; color: #333; }
.graphy-sidebar .wp-block-button__link {
	background: var(--wp--preset--color--navy);
	color: #fff;
	border-radius: 5px;
	font-size: 14px;
	text-decoration: underline;
}
.graphy-sidebar .wp-block-button__link:hover { background: #1d4566; color: #fff; }

/* ------------------------------------------------------------
   Beitragsraster (Startseite, Archive, Suche)
------------------------------------------------------------ */
.graphy-section-title {
	text-align: center;
	font-size: clamp(2rem, 4vw, 2.5rem) !important;
	margin-top: 0 !important;
	margin-bottom: clamp(40px, 5vw, 60px) !important;
}
.graphy-grid .wp-block-post-template {
	row-gap: 75px !important;
	column-gap: 6% !important;
}
@media (max-width: 599px) {
	.graphy-grid .wp-block-post-template { grid-template-columns: 1fr !important; }
}
@media (min-width: 600px) and (max-width: 979px) {
	.graphy-grid .wp-block-post-template.columns-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.graphy-card > * + * { margin-top: 0; }
.graphy-card .wp-block-post-title {
	font-size: 1.75rem !important;
	line-height: 1.3;
	margin: 0 0 4px;
}
.graphy-card .wp-block-post-date { font-size: 13px; margin-bottom: 20px; }
.graphy-card .wp-block-post-featured-image {
	margin: 0 0 24px;
	overflow: hidden;
}
.graphy-card .wp-block-post-featured-image img {
	transition: transform .3s ease-in-out, opacity .3s ease-in-out;
}
.graphy-card .wp-block-post-featured-image a:hover img {
	transform: scale(1.03);
	opacity: .9;
}
.graphy-card .wp-block-post-excerpt { margin: 0; }
.graphy-card .wp-block-post-excerpt__excerpt { margin: 0 0 20px; }
.graphy-card .wp-block-read-more {
	display: inline-block;
	border: 1px solid #333;
	color: #333;
	font-size: 13px;
	padding: 8px 14px;
	text-decoration: none;
	margin-bottom: 20px;
}
.graphy-card .wp-block-read-more:hover { background: #333; color: #fff; }
.graphy-card .wp-block-post-author-name { color: #999; font-size: 13px; }
.graphy-card .wp-block-post-title a { color: var(--wp--preset--color--accent-3); text-decoration: none; }
.graphy-card .wp-block-post-title a:hover { color: #555; }

.graphy-grid .wp-block-query-pagination {
	margin-top: 60px;
	font-size: 15px;
	justify-content: center;
}
.graphy-grid .wp-block-query-pagination a { text-decoration: none; color: #555; }
.graphy-grid .wp-block-query-pagination .page-numbers {
	display: inline-block;
	padding: 4px 10px;
}
.graphy-grid .wp-block-query-pagination .page-numbers.current {
	background: #333;
	color: #fff;
	border-radius: 3px;
}

/* ------------------------------------------------------------
   Themen-Kacheln (Muster «Aktuelle Themen»)
------------------------------------------------------------ */
.graphy-tiles { gap: clamp(20px, 4vw, 46px) !important; }
.graphy-tile {
	position: relative;
	min-height: 120px !important;
}
.graphy-tile .wp-block-cover__inner-container { text-align: center; }
.graphy-tile h3 {
	color: #fff !important;
	font-size: clamp(1.4rem, 2.5vw, 1.75rem) !important;
	line-height: 1.2;
	margin: 0;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.graphy-tile h3 a { color: #fff !important; text-decoration: none !important; }
/* Ganze Kachel klickbar */
.graphy-tile h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}
.graphy-tile:hover { opacity: .92; }
.graphy-tile h3 { width: 100%; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 699px) {
	.graphy-tiles { grid-template-columns: 1fr !important; }
}

/* ------------------------------------------------------------
   Block-Stil «Pfeil-Liste» (ersetzt Elementor Icon-Liste)
------------------------------------------------------------ */
ul.is-style-pfeil-liste {
	list-style: none;
	padding-left: 0;
}
ul.is-style-pfeil-liste li {
	position: relative;
	padding-left: 1.6em;
	margin-bottom: .1em;
}
ul.is-style-pfeil-liste li::before {
	content: "";
	position: absolute;
	left: .15em;
	top: .62em;
	width: .42em;
	height: .42em;
	border-right: 2.5px solid currentColor;
	border-top: 2.5px solid currentColor;
	transform: rotate(45deg);
}

/* Block-Stil «Infobox» (graue Zusammenfassung) */
.is-style-infobox {
	background: #eef1f4;
	border-left: 4px solid var(--wp--preset--color--accent-1);
	padding: 20px 24px !important;
	font-size: 16px;
}

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
.graphy-footer {
	border-top: 1px solid #eee;
	color: #999;
	font-size: 14px;
	padding-top: 40px;
	padding-bottom: 40px;
	text-align: center;
}
.graphy-footer a { color: #777; text-decoration: none; }
.graphy-footer a:hover { color: #333; }

/* ------------------------------------------------------------
   Übernommen aus dem bisherigen Zusätzlichen CSS
------------------------------------------------------------ */
/* Beitrag «Convertible Loan Agreement» (ID 2862): Autorenprofil ausblenden */
.postid-2862 .graphy-author-box { display: none; }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
