/*
Theme Name: RSdesign
Author: RSdesign
Author URI: https://www.rs-design.at
Description: Theme von RSdesign für bud & terence. Design-Werte: assets/css/tokens.css, Bereiche: blocks/.
Version: 1.1.15
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: rsdesign
*/

/*
 * Aufbau der Styles
 * - assets/fonts/fonts.css   Open Sans (lokal)
 * - assets/css/tokens.css    Farben, Typografie, Layout-Variablen, Buttons (auch im Editor)
 * - style.css (diese Datei)  Grundlayout, Header, Footer, allgemeine Elemente (nur Website)
 * - blocks/assets/blocks.css eigene Gutenberg-Blöcke (Website + Editor)
 */

/* ========================================================================= */
/* Grundlagen                                                                */
/* ========================================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	padding: var(--site-outline-width);
	background: var(--site-outline-color);
	scroll-padding-top: calc(var(--site-outline-width) + var(--header-sticky-height));
}
/* Anker-Links (#…) sanft scrollen (bisher Impreza-Skript) – nicht bei „Bewegung reduzieren“ */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
body {
	margin: 0;
	overflow-x: hidden;
	overflow-x: clip; /* clip statt hidden: kein Scroll-Container, sonst bricht position: sticky (Safari) */
	background: var(--color-content-bg);
	-webkit-tap-highlight-color: var(--color-content-primary-faded);
}
/* Seitenrahmen: fixierter weißer Rand um das Browserfenster (bisher Impreza „Umriss“) */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 999;
	border: var(--site-outline-width) solid var(--site-outline-color);
	pointer-events: none;
}
a {
	color: var(--color-content-link);
	text-decoration: none;
	transition: color .2s, background-color .2s, border-color .2s, opacity .2s;
}
.no-touch a:hover {
	color: var(--color-content-link-hover);
}
img {
	max-width: 100%;
	height: auto;
}
figure {
	margin: 0;
}
hr {
	height: 0;
	border: 0;
	border-bottom: 1px solid var(--color-content-border);
}
h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	padding-top: 1.5rem;
	color: var(--color-content-heading);
}
h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child,
h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6 {
	padding-top: 0;
}
p, ul, ol, dl, address, pre, table, blockquote, fieldset {
	margin: 0 0 1.5rem;
}
p:empty {
	display: none;
}
/* Letztes Element ohne Abstand nach unten (wie bisher; gilt auch in den eigenen Blöcken) */
h1:last-child, h2:last-child, h3:last-child, h4:last-child, h5:last-child, h6:last-child,
p:last-child, ul:last-child, ol:last-child, li:last-child, pre:last-child, table:last-child,
address:last-child, fieldset:last-child, blockquote:last-child {
	margin-bottom: 0;
}
blockquote p,
blockquote ul,
blockquote ol {
	margin-bottom: 0.5em;
}
/* Hochgestellt/tiefgestellt ohne Einfluss auf die Zeilenhöhe */
sub,
sup {
	position: relative;
	font-size: 75%;
	line-height: 0;
	vertical-align: baseline;
}
sup {
	top: -0.5em;
}
sub {
	bottom: -0.25em;
}
@media (max-width: 600px) {
	p {
		margin-bottom: 1rem;
	}
	h1, h2, h3, h4, h5, h6 {
		padding-top: 1rem;
	}
}
ul, ol {
	padding: 0;
	margin-inline-start: 2.5rem;
}
li {
	margin: 0 0 0.5rem;
}
table {
	width: 100%;
	border-collapse: collapse;
}
input, button, select, textarea {
	font: inherit;
	letter-spacing: inherit;
}
:focus-visible {
	/* --focus-color: auf dunklen/blauen Flächen Lime (blocks.css), sonst Blau */
	outline: var(--focus-outline-width, 2px) solid var(--focus-color, var(--color-content-primary));
	outline-offset: 2px;
}
.screen-reader-text,
.skipLink:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skipLink:focus {
	position: fixed;
	top: calc(var(--site-outline-width) + 0.5rem);
	left: calc(var(--site-outline-width) + 0.5rem);
	z-index: 1000;
	padding: 0.5rem 1rem;
	background: #fff;
}
/* Fix horizontaler Scrollbalken Safari – clip statt hidden, damit der Sticky-Header funktioniert */
_::-webkit-full-page-media, _:future, :root {
	overflow-x: clip;
}

/* ========================================================================= */
/* Zeilen (Sektionen) – Klassen wie bisher, damit Blöcke unverändert bleiben */
/* ========================================================================= */

.l-section {
	position: relative;
	margin: 0 auto;
	padding-left: var(--padding-inline);
	padding-right: var(--padding-inline);
}
.l-section-h {
	position: relative;
	width: 100%;
	max-width: var(--site-content-width, 980px);
	margin: 0 auto;
}
.l-section.width_full_with_indents > .l-section-h {
	max-width: none;
}
.l-section.height_medium {
	padding-top: 4rem;
	padding-bottom: 4rem;
}
@media (max-width: 1024px) {
	.l-section.height_medium {
		padding-top: 2.5rem;
		padding-bottom: 2.5rem;
	}
}
@media (max-width: 600px) {
	.l-section.height_medium {
		padding-top: 1.5rem;
		padding-bottom: 1.5rem;
	}
	/* Standardzeilen (z. B. Blog, Datenschutz) und Footer bündig mit dem Logo im Header (20px vom Rand) */
	.l-section:not([class*="rs"]) > .l-section-h {
		padding-left: 0;
		padding-right: 0;
	}
}

/* ========================================================================= */
/* Header                                                                    */
/* ========================================================================= */

.siteHeader {
	position: sticky;
	top: var(--site-outline-width);
	z-index: 100;
	height: var(--header-height);
	padding: 0 var(--padding-inline);
	background: var(--color-header-middle-bg);
	color: var(--color-header-middle-text);
}
/* Streifen über dem Sticky-Header abdecken (Safari zeigt den fixierten Seitenrahmen dort nicht zuverlässig) */
.siteHeader::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: var(--site-outline-width);
	background: var(--site-outline-color);
}
.admin-bar .siteHeader {
	top: calc(var(--site-outline-width) + var(--wp-admin--admin-bar--height, 0px));
}
/* Mobil ist die Admin-Leiste nicht fixiert, scrollt also mit weg */
@media (max-width: 600px) {
	.admin-bar .siteHeader {
		top: var(--site-outline-width);
	}
}
/* iOS: Safari zeichnet Inhalt unter Statusleiste und schwebender Adressleiste –
   der fixierte Rahmen oben/unten liegt dort mitten im Bild. Daher auf iOS ohne
   Rahmen oben/unten, Header klebt direkt am oberen Rand. */
@supports (-webkit-touch-callout: none) {
	body::before {
		border-top-width: 0;
		border-bottom-width: 0;
	}
	.siteHeader {
		top: 0;
	}
	.siteHeader::before {
		display: none;
	}
	.admin-bar .siteHeader {
		top: var(--wp-admin--admin-bar--height, 0px);
	}
	@media (max-width: 600px) {
		.admin-bar .siteHeader {
			top: 0;
		}
	}
}
.siteHeader-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.4rem;
	height: 100%;
}

/* Logo + Claim: Claim sitzt auf der Grundlinie des Logos */
.headerBrand {
	display: flex;
	align-items: flex-end;
	gap: 13px;
	color: inherit;
}
.headerBrand img {
	display: block;
	width: auto;
	height: 22px;
}
.headerBrand-claim {
	margin-bottom: -1px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	color: var(--color-header-middle-text-hover);
	white-space: nowrap;
}
.no-touch .headerBrand:hover {
	color: inherit;
}

/* Hauptmenü (Desktop) */
.mainMenu {
	height: 100%;
	font-size: 0.875rem;
}
.mainMenu-list {
	display: flex;
	align-items: center;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mainMenu-list li {
	margin: 0;
}
.mainMenu-list > li {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
}
.mainMenu-list > li > a:not(.w-btn) {
	display: flex;
	align-items: center;
	gap: 0.5em;
	height: 100%;
	padding: 0 10px;
	white-space: nowrap;
	color: var(--color-header-middle-text);
}
.no-touch .mainMenu-list > li > a:not(.w-btn):hover,
.mainMenu-list > li.current-menu-item > a:not(.w-btn),
.mainMenu-list > li.current-menu-ancestor > a:not(.w-btn) {
	color: var(--color-header-middle-text-hover);
}
.mainMenu-list .w-btn {
	margin-left: 10px;
	gap: 6px;
}
.no-touch .mainMenu-list .w-btn:hover {
	color: var(--color-content-bg);
}

/* Icon-Menüpunkt (CSS-Klasse „icon-NAME“, z. B. Newsletter): dunkle Pille, gleich hoch wie der Button daneben */
.rsMenuIcon {
	gap: 0.5rem;
	min-width: 50px;
	height: 35px;
	padding: 0 14px;
	border-radius: 999em;
	background: var(--color-navy);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	transition: background-color .3s;
}
.no-touch .rsMenuIcon:hover {
	background: var(--color-blue);
	color: #fff;
}
.rsMenuIcon-glyph {
	flex-shrink: 0;
	width: 22px;
	height: 21px;
	background: currentColor;
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}
/* Text nur im mobilen Aufklapp-Menü sichtbar, sonst nur für Screenreader */
.rsMenuIcon-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
/* Leiste neben dem Hamburger: nur Tablet (siehe unten) */
.mainMenu-actions {
	display: none;
}
/* Grundlinie Menü = Grundlinie Logo/Claim (wie bisher, Desktop-Menü ab 1200px) */
@media (min-width: 900px) {
	.headerBrand {
		position: relative;
		top: -2px;
	}
}
@media (min-width: 1200px) {
	.mainMenu-list {
		position: relative;
		top: 2.5px;
	}
}

/* Pfeil (Chevron) bei Untermenüs */
.subMenuToggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	margin: 0 -3px 0 -10px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}
.subMenuToggle::before,
.rsChevron {
	content: '';
	display: block;
	width: 0.875rem;
	height: 0.5rem;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .2s;
}
.mainMenu-list > li.menu-item-has-children > a:not(.w-btn) {
	padding-right: 0.5rem;
}
.mainMenu-list > li.menu-item-has-children {
	padding-right: 10px;
}

/* Dropdown (Desktop) */
.mainMenu-list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 10;
	min-width: 100%;
	margin: 0;
	padding: 0.6em 0;
	list-style: none;
	background: var(--color-header-middle-bg);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	font-size: 0.875rem;
	white-space: nowrap;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-0.5rem);
	transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.mainMenu-list > li:hover > .sub-menu,
.mainMenu-list > li:focus-within > .sub-menu,
.mainMenu-list > li.is-open > .sub-menu {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity .2s, transform .2s;
}
.mainMenu-list .sub-menu a {
	display: block;
	padding: 0.6em 20px;
	color: var(--color-header-middle-text);
}
.no-touch .mainMenu-list .sub-menu a:hover,
.mainMenu-list .sub-menu .current-menu-item > a {
	color: var(--color-header-middle-text-hover);
}

/* Hamburger (Mobil): blaue Pille mit weißen Linien */
.menuToggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 2.1875rem;
	padding: 0;
	border: 0;
	border-radius: 999em;
	background: var(--color-blue);
	color: #fff;
	cursor: pointer;
	transition: background-color .3s;
}
.no-touch .menuToggle:hover {
	background: var(--color-navy);
}
.menuToggle-icon,
.menuToggle-icon::before,
.menuToggle-icon::after {
	display: block;
	width: 24px;
	height: 1px;
	background: currentColor;
	transition: transform .3s cubic-bezier(.8, .5, .2, 1.4), opacity .3s;
}
.menuToggle-icon {
	position: relative;
}
.menuToggle-icon::before,
.menuToggle-icon::after {
	content: '';
	position: absolute;
	left: 0;
}
.menuToggle-icon::before {
	top: -7px;
}
.menuToggle-icon::after {
	top: 7px;
}
.menuToggle[aria-expanded="true"] .menuToggle-icon {
	background: transparent;
}
.menuToggle[aria-expanded="true"] .menuToggle-icon::before {
	transform: translateY(7px) rotate(45deg);
}
.menuToggle[aria-expanded="true"] .menuToggle-icon::after {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobil + Tablet (unter 1200px – darunter ist neben Logo + Claim kein Platz fürs ganze Menü): Menü als Aufklapp-Liste unter dem Header */
@media (max-width: 1199px) {
	.menuToggle {
		display: flex;
	}
	.mainMenu {
		display: flex;
		align-items: center;
	}
	.mainMenu-list {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		height: auto;
		max-height: calc(100vh - var(--header-height) - 2 * var(--site-outline-width));
		padding: 0 var(--padding-inline) 1.25rem;
		overflow-y: auto;
		background: var(--color-header-middle-bg);
		border-bottom: 1px solid var(--color-content-border);
	}
	.mainMenu.is-open .mainMenu-list,
	.mainMenu.is-closing .mainMenu-list {
		display: flex;
	}
	.mainMenu-list > li {
		flex-wrap: wrap;
		height: auto;
		padding: 0 !important;
	}
	.mainMenu-list > li > a:not(.w-btn) {
		height: auto;
		padding: 0.725rem 0;
	}
	.mainMenu-list .w-btn {
		margin: 0.75rem 0 0;
	}
	.mainMenu-list .sub-menu {
		position: static;
		display: none;
		flex-basis: 100%;
		min-width: 0;
		padding: 0 0 0.5rem 1rem;
		box-shadow: none;
		white-space: normal;
		visibility: visible;
		opacity: 1;
		transform: none;
		transition: none;
	}
	.mainMenu-list > li.is-open > .sub-menu {
		display: block;
	}
	.mainMenu-list .sub-menu a {
		padding: 0.5rem 0;
	}
	.mainMenu-list > li.is-open > .subMenuToggle::before {
		transform: rotate(180deg);
	}
	.subMenuToggle {
		width: 1.5rem;
		height: 1.5rem;
		margin: 0 0 0 -8px;
	}
}
/* Tablet (768–1199px): Buttons + Icon-Menüpunkte neben dem Hamburger statt im Aufklapp-Menü (XD „Menüs“) */
@media (min-width: 768px) and (max-width: 1199px) {
	.mainMenu-actions {
		display: flex;
		align-items: center;
		gap: 14px;
		margin-right: 14px;
	}
	.mainMenu-actions .w-btn {
		margin: 0;
	}
	.mainMenu-list > li[class*="btn-"],
	.mainMenu-list > li[class*="icon-"] {
		display: none;
	}
}
/* Mobil (unter 768px): Icon-Menüpunkt im Aufklapp-Menü als Pille mit Text */
@media (max-width: 767px) {
	.mainMenu-list .rsMenuIcon {
		align-self: flex-start;
	}
	.rsMenuIcon-label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}
}
/* Claim bis 600px Breite ausblenden (wie bisher) */
@media (max-width: 600px) {
	.headerBrand-claim {
		display: none;
	}
}

/* ========================================================================= */
/* Inhalt                                                                    */
/* ========================================================================= */

.l-main {
	display: block;
}
/* Standardinhalte (Absatz, Überschrift, Bild …) außerhalb der eigenen Bereiche */
.l-section-h > .alignwide {
	max-width: none;
}

/* ========================================================================= */
/* Footer ([rs_footer], Einstellungen unter Design → Footer)                */
/* ========================================================================= */

.footerGrid {
	display: grid;
	/* Spalten so breit wie ihr Inhalt, freier Platz gleichmäßig dazwischen → optisch gleiche Abstände */
	grid-template-columns: repeat(4, auto);
	justify-content: space-between;
	gap: 2.5rem 3rem;
	margin-top: 3rem;
	padding: 3.5rem 0 4rem;
	border-top: 1px solid var(--color-navy);
	font-size: 0.875rem;
	color: var(--color-navy);
}
.footerLogo {
	display: inline-block;
}
.footerLogoImg {
	display: block;
	width: auto;
	height: 22px;
}
.footerText {
	margin-top: 2.5rem;
	line-height: 1.5625rem;
}
.footerText p {
	margin: 0;
}
.footerCol nav + nav {
	margin-top: 1.5rem;
}
.footerMenu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.footerMenu li {
	margin: 0 0 0.3125rem;
}
.footerMenu a {
	color: inherit;
	transition: color .3s;
}
.no-touch .footerMenu a:hover {
	color: var(--color-blue);
}
.footerCol--bold a {
	font-weight: 700;
}
/* Unter 1200px (wie das Menü) reicht der Platz nicht für 4 Spalten nebeneinander */
@media (max-width: 1199px) {
	.footerGrid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 600px) {
	.footerGrid {
		grid-template-columns: 1fr;
	}
}

/* Menüpunkte mit CSS-Klasse „strong“ (Design → Menüs) fett darstellen */
.menu-item.strong > a {
	font-weight: 700;
}

/* ========================================================================= */
/* „Nach oben“-Button (js/to-top.js) – wie bisher bei Impreza                */
/* ========================================================================= */

.toTop {
	position: fixed;
	right: var(--site-outline-width);
	bottom: var(--site-outline-width);
	z-index: 99;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	margin: 15px;
	border-radius: var(--site-border-radius);
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
	transform: translate3d(0, 150%, 0);
	transition: background-color 0.2s, transform 0.2s;
}
.toTop.is-visible,
.toTop:focus-visible {
	transform: none;
}
.no-touch .toTop:hover {
	background: var(--color-content-primary);
	color: #fff;
}
@media (max-width: 600px) {
	.toTop {
		margin: 10px;
	}
}
@media print {
	.toTop {
		display: none;
	}
}

/* ========================================================================= */
/* Kreis unter dem Mauszeiger (js/cursor.js) – blendet über Links aus       */
/* ========================================================================= */

.cursorDot {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	width: 1rem;
	height: 1rem;
	margin: -0.5rem 0 0 -0.5rem;
	border-radius: 50%;
	background: var(--color-blue);
	pointer-events: none;
	opacity: 0;
	transition: opacity .3s;
	will-change: transform;
}
.cursorDot.is-visible {
	opacity: 1;
}
.cursorDot.is-visible.is-hidden {
	opacity: 0;
}
