/* ROIS theme – layout chrome: base, header, navigation, footer.
   Colours, fonts and sizes come from theme.json (CSS custom properties). */

:root {
	--rois-header-h: 76px;
	--rois-radius: 10px;
	--rois-gutter: var(--wp--style--root--padding-left, 1.25rem);
	--rois-wide: var(--wp--style--global--wide-size, 1200px);
	--rois-shadow: 0 10px 30px -12px rgb(0 31 81 / 0.25);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--rois-header-h) + 1rem); }

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

:focus-visible { outline: 2px solid var(--wp--preset--color--red); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: 0.5rem; left: 0.5rem; z-index: 1000;
	width: auto; height: auto; clip: auto; margin: 0;
	padding: 0.75rem 1rem; background: var(--wp--preset--color--navy); color: #fff; border-radius: 6px;
}

.site-main { display: block; min-height: 40vh; }

/* ---------- Header ---------- */

.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgb(255 255 255 / 0.96);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s, box-shadow .2s;
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.site-header.is-scrolled { border-color: var(--wp--preset--color--line); box-shadow: 0 6px 20px -16px rgb(0 31 81 / .5); }
/* backdrop-filter makes the header the containing block of position:fixed children, which would
   squeeze the open mobile menu into the header height – switch it off while the menu is open. */
.nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }

.site-header__inner {
	display: flex; align-items: center; gap: 1.5rem;
	max-width: calc(var(--rois-wide) + 2 * var(--rois-gutter));
	min-height: var(--rois-header-h);
	margin: 0 auto; padding: 0 var(--rois-gutter);
}

.site-header__logo { display: inline-flex; flex: none; }
.site-header__logo svg { width: 118px; height: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }

.site-nav__list { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.site-nav__list a {
	display: block; padding: 0.5rem 0.75rem; border-radius: 6px;
	font-family: var(--wp--preset--font-family--heading); font-weight: 500; font-size: 0.975rem;
	color: var(--wp--preset--color--navy); text-decoration: none; white-space: nowrap;
}
.site-nav__list a:hover { color: var(--wp--preset--color--red); }
.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-ancestor > a { color: var(--wp--preset--color--red); }
/* In-page anchors (e.g. "Kontakt" -> #kontakt) are never the "current page". */
.site-nav__list .current-menu-item > a[href*="#"] { color: var(--wp--preset--color--navy); }
/* The menus also contain a "Kontakt/Contact" item pointing to the footer. On desktop the red
   header button does the same job, so the item is hidden there (as on the previous site). */
@media (min-width: 961px) {
	.site-nav__list > li:has(> a[href$="#kontakt"]),
	.site-nav__list > li:has(> a[href$="#contact"]) { display: none; }
}
.site-nav__list .sub-menu {
	position: absolute; min-width: 220px; margin: 0; padding: 0.5rem; list-style: none;
	background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--rois-radius); box-shadow: var(--rois-shadow);
	opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s;
}
.site-nav__list li { position: relative; }
.site-nav__list li:hover > .sub-menu,
.site-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.site-nav__tools { display: flex; align-items: center; gap: 0.75rem; flex: none; }

.site-header__cta.wp-element-button {
	display: inline-block; padding: 0.6rem 1.15rem; text-decoration: none; font-size: 0.95rem; white-space: nowrap;
}

/* Collapsed menu button: name of the current page (or "Menu") with a chevron, so it reads as a menu. */
.site-header__toggle {
	display: none; align-items: center; gap: 0.45rem; margin-left: auto; min-width: 0; max-width: 60vw;
	padding: 0.5rem 0.7rem 0.5rem 0.85rem; border: 1px solid var(--wp--preset--color--line); border-radius: 6px;
	background: #fff; cursor: pointer; color: var(--wp--preset--color--navy);
	font: 600 0.95rem/1.15 var(--wp--preset--font-family--heading);
}
.site-header__toggle:hover, .nav-open .site-header__toggle { border-color: var(--wp--preset--color--navy); }
.site-header__toggle-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header__toggle-icon { display: inline-flex; flex: none; color: var(--wp--preset--color--red); }
.site-header__toggle-icon svg { width: 18px; height: 18px; display: block; transition: transform .2s; }
.nav-open .site-header__toggle-icon svg { transform: rotate(180deg); }
/* Contact button next to the collapsed menu (the one inside the menu is hidden then). */
.site-header .site-header__cta--compact { display: none; flex: none; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-switch__toggle {
	display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem;
	border: 1px solid var(--wp--preset--color--line); border-radius: 6px; background: #fff; cursor: pointer; white-space: nowrap;
	font: 600 0.9rem/1 var(--wp--preset--font-family--heading); color: var(--wp--preset--color--navy);
}
.lang-switch__toggle svg { width: 18px; height: 18px; color: var(--wp--preset--color--red); }
.lang-switch__list {
	position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 190px;
	/* Many languages: never taller than the window, scroll inside instead. */
	max-height: calc(100vh - var(--rois-header-h) - var(--wp-admin--admin-bar--height, 0px) - 1rem);
	max-height: calc(100dvh - var(--rois-header-h) - var(--wp-admin--admin-bar--height, 0px) - 1rem);
	overflow-y: auto; overscroll-behavior: contain;
	margin: 0; padding: 0.4rem; list-style: none;
	background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--rois-radius); box-shadow: var(--rois-shadow);
}
/* Invisible bridge over the gap under the button, so hover does not drop on the way down. */
.lang-switch__list::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.lang-switch__list a {
	display: flex; gap: 0.6rem; align-items: center; padding: 0.5rem 0.6rem; border-radius: 6px;
	color: var(--wp--preset--color--ink); text-decoration: none;
}
.lang-switch__list a:hover, .lang-switch__list a[aria-current] { background: var(--wp--preset--color--soft); }
.lang-switch__code { font: 600 0.8rem/1 var(--wp--preset--font-family--heading); color: var(--wp--preset--color--red); width: 1.6rem; }

@media (max-width: 960px) {
	.site-header__inner { gap: 0.75rem; }
	.site-header__toggle { max-width: none; flex: 0 1 auto; }
	.site-header__toggle { display: inline-flex; }
	.site-nav {
		position: fixed; inset: var(--rois-header-h) 0 0 0; z-index: 99;
		flex-direction: column; align-items: stretch; gap: 1.5rem;
		padding: 1.5rem var(--rois-gutter) 2rem; background: #fff; overflow-y: auto;
		/* Fade/slide down, not in from the side: a sideways offset would widen the page. */
		opacity: 0; transform: translateY(-8px); visibility: hidden;
		transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}
	.admin-bar .site-nav { top: calc(var(--rois-header-h) + var(--wp-admin--admin-bar--height, 46px)); }
	.nav-open .site-nav { opacity: 1; transform: none; visibility: visible; }
	.nav-open { overflow: hidden; }
	.site-nav__list { flex-direction: column; gap: 0; }
	.site-nav__list a { padding: 0.9rem 0; font-size: 1.25rem; border-bottom: 1px solid var(--wp--preset--color--line); border-radius: 0; }
	.site-nav__list .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 1rem; }
	.site-nav__tools { justify-content: space-between; }
	.site-nav .lang-switch__list { left: 0; right: auto; }
}

/* Tight header: first step when the menu does not fit (nav.js) – smaller gaps and type. */
.nav-tight .site-header__inner, .nav-tight .site-nav { gap: 0.6rem; }
.nav-tight .site-nav__tools { gap: 0.5rem; }
.nav-tight .site-nav__list { gap: 0; }
.nav-tight .site-nav__list a { padding: 0.5rem 0.4rem; font-size: 0.875rem; }
.nav-tight .site-header__logo svg { width: 104px; }
.nav-tight .site-header__cta.wp-element-button { padding: 0.55rem 0.85rem; font-size: 0.875rem; }
/* Compact header (wide screens): nav.js adds .nav-compact to <body> when the menu does not fit on one
   line even in the tight variant (long labels in some languages). The menu then opens as a dropdown
   under the button – on hover with a mouse, on click otherwise. */
.nav-compact .site-header__inner { position: relative; gap: 0.75rem; }
.nav-compact .site-header__toggle { display: inline-flex; }
.nav-compact .site-header .site-header__cta--compact { display: inline-block; }
.nav-compact .site-nav__tools .site-header__cta { display: none; }
.nav-compact .site-nav {
	position: absolute; top: calc(100% - 8px); right: var(--rois-gutter); z-index: 99; margin: 0;
	width: min(380px, calc(100vw - 2 * var(--rois-gutter)));
	max-height: calc(100vh - var(--rois-header-h) - var(--wp-admin--admin-bar--height, 0px) - 1rem);
	overflow-y: auto; overscroll-behavior: contain;
	flex-direction: column; align-items: stretch; gap: 0.75rem; padding: 0.5rem 1rem 1rem;
	background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--rois-radius); box-shadow: var(--rois-shadow);
	opacity: 0; transform: translateY(-4px); visibility: hidden;
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
/* Invisible bridge over the gap under the button, so hover does not drop on the way down. */
.nav-compact .site-nav::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-compact.nav-open .site-nav { opacity: 1; transform: none; visibility: visible; }
.nav-compact .site-nav__list { flex-direction: column; gap: 0; }
.nav-compact .site-nav__list a { padding: 0.75rem 0.25rem; font-size: 1rem; white-space: normal; border-bottom: 1px solid var(--wp--preset--color--line); border-radius: 0; }
.nav-compact .site-nav__list .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 1rem; }
.nav-compact .site-nav__tools { justify-content: flex-start; }
/* Inside the dropdown the language list opens in place (an absolutely positioned list would be clipped). */
.nav-compact .site-nav .lang-switch__list { position: static; margin-top: 0.5rem; max-height: none; box-shadow: none; }
.nav-compact .site-nav .lang-switch__list::before { display: none; }
/* nav.js moves the language switcher next to the menu button when there is room. */
.site-header__inner > .lang-switch { flex: none; }

@media (min-width: 600px) and (max-width: 960px) {
	.site-header .site-header__cta--compact { display: inline-block; }
	.site-nav__tools .site-header__cta { display: none; }
}

@media (max-width: 480px) {
	.site-header__toggle { font-size: 0.85rem; padding: 0.45rem 0.55rem 0.45rem 0.7rem; }
	.site-header__logo svg { width: 100px; }
}

/* ---------- Footer ---------- */

.site-footer { color: #fff; background: var(--wp--preset--color--navy); }
/* Pages built from sections end with their own padding; plain pages need room before the footer. */
.text-page, .site-main > article:not(:has(.alignfull:last-child)) { padding-bottom: var(--wp--preset--spacing--60); }
.site-footer a { color: inherit; }
.site-footer a:hover { color: #fff; text-decoration-color: var(--wp--preset--color--red); }

.footer-cta, .footer-main, .footer-bottom { padding: 0 var(--rois-gutter); }
.footer-cta__inner, .footer-main__inner, .footer-bottom__inner { max-width: var(--rois-wide); margin: 0 auto; }

.footer-cta { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--50); }
.footer-cta__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--wp--preset--spacing--50); align-items: start; }
.footer-cta__title {
	margin: 0 0 0.75rem; color: #fff;
	font: 600 var(--wp--preset--font-size--x-large)/1.1 var(--wp--preset--font-family--heading); letter-spacing: -0.01em;
}
.footer-cta__lead { margin: 0; font-size: var(--wp--preset--font-size--medium); color: rgb(255 255 255 / .8); }

.footer-main { border-top: 1px solid rgb(255 255 255 / .12); }
.footer-main__inner {
	display: grid; grid-template-columns: 1.1fr 1fr 1.6fr; gap: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--50) 0;
}
.footer-main__logo svg { width: 130px; display: block; }
.footer-main__tagline { margin: 1rem 0 0; max-width: 24ch; color: rgb(255 255 255 / .72); }
.footer-main__heading {
	margin: 0 0 1rem; color: var(--wp--preset--color--red);
	font: 600 0.8rem/1.2 var(--wp--preset--font-family--heading); letter-spacing: .12em; text-transform: uppercase;
}
.footer-main__contact p { margin: 0 0 0.75rem; color: rgb(255 255 255 / .85); }
.footer-main__email { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.1rem; }
.footer-main__email svg { width: 20px; height: 20px; color: var(--wp--preset--color--red); }

.people { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.person {
	display: flex; gap: 1rem; align-items: center;
	padding: 0.75rem 1rem 0.75rem 0.75rem; border-radius: 12px;
	background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .1);
	color: #fff; text-decoration: none;
}
.person--link { transition: background-color .15s, border-color .15s, transform .15s; }
.person--link:hover, .person--link:focus-visible {
	background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .25); transform: translateY(-1px);
}
.person__photo { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; }
.person__photo--empty { display: grid; place-items: center; background: var(--wp--preset--color--navy-soft); font: 600 1.25rem var(--wp--preset--font-family--heading); }
.person__text { display: grid; gap: 0.15rem; min-width: 0; flex: 1; }
.person__name { font-weight: 600; font-size: 1.05rem; }
.person__role { font-size: 0.9rem; line-height: 1.35; color: rgb(255 255 255 / .7); }
.person__cta {
	display: inline-flex; align-items: center; gap: 0.45rem; flex: none;
	padding: 0.4rem 0.85rem 0.4rem 0.4rem; border-radius: 999px;
	background: #fff; color: var(--wp--preset--color--navy);
	font: 600 0.85rem/1 var(--wp--preset--font-family--heading);
	transition: background-color .15s, color .15s;
}
.person__cta-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #0A66C2; color: #fff; }
.person__cta-icon svg { width: 14px; height: 14px; }
.person--link:hover .person__cta { background: var(--wp--preset--color--red); color: #fff; }
@media (max-width: 480px) {
	.person { flex-wrap: wrap; }
	.person__cta { margin-left: calc(56px + 1rem); }
}

.footer-bottom { padding: 0 var(--rois-gutter); }
.footer-cta__inner, .footer-main__inner, .footer-bottom__inner { max-width: var(--rois-wide); margin: 0 auto; }

.footer-cta { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--50); }
.footer-cta__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--wp--preset--spacing--50); align-items: start; }
.footer-cta__title {
	margin: 0 0 0.75rem; color: #fff;
	font: 600 var(--wp--preset--font-size--x-large)/1.1 var(--wp--preset--font-family--heading); letter-spacing: -0.01em;
}
.footer-cta__lead { margin: 0; font-size: var(--wp--preset--font-size--medium); color: rgb(255 255 255 / .8); }

.footer-main { border-top: 1px solid rgb(255 255 255 / .12); }
.footer-main__inner {
	display: grid; grid-template-columns: 1.1fr 1fr 1.6fr; gap: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--50) 0;
}
.footer-main__logo svg { width: 130px; display: block; }
.footer-main__tagline { margin: 1rem 0 0; max-width: 24ch; color: rgb(255 255 255 / .72); }
.footer-main__heading {
	margin: 0 0 1rem; color: var(--wp--preset--color--red);
	font: 600 0.8rem/1.2 var(--wp--preset--font-family--heading); letter-spacing: .12em; text-transform: uppercase;
}
.footer-main__contact p { margin: 0 0 0.75rem; color: rgb(255 255 255 / .85); }
.footer-main__email { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.1rem; }
.footer-main__email svg { width: 20px; height: 20px; color: var(--wp--preset--color--red); }

.people { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.person { display: flex; gap: 1rem; align-items: center; }
.person__photo { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; }
.person__photo--empty { display: grid; place-items: center; background: var(--wp--preset--color--navy-soft); font: 600 1.25rem var(--wp--preset--font-family--heading); }
.person__text { display: grid; gap: 0.15rem; }
.person__name { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; text-decoration: none; }
.person__name svg { width: 16px; height: 16px; color: rgb(255 255 255 / .7); }
.person__role { font-size: 0.95rem; color: rgb(255 255 255 / .7); }

.footer-bottom { border-top: 1px solid rgb(255 255 255 / .12); font-size: 0.9rem; color: rgb(255 255 255 / .7); }
.footer-bottom__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: 1.25rem 0; }
.footer-bottom__copy { margin: 0; }
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.footer-bottom__social { display: flex; gap: 0.75rem; margin: 0 0 0 auto; padding: 0; list-style: none; }
.footer-bottom__social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / .1); }
.footer-bottom__social a:hover { background: var(--wp--preset--color--red); }
.footer-bottom__social svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
	.footer-cta__inner, .footer-main__inner { grid-template-columns: 1fr; }
	.footer-bottom__social { margin-left: 0; }
}

/* ---------- Text pages ---------- */

.text-page, .text-page__header { padding-top: var(--wp--preset--spacing--50); }
.text-page__title { margin-top: 0; margin-bottom: var(--wp--preset--spacing--40); font-size: var(--wp--preset--font-size--x-large); }


/* ---------- Cookiebot consent banner (ported from the previous site, new fonts) ---------- */

#CybotCookiebotDialog,
.CookiebotWidget-contents { font-family: var(--wp--preset--font-family--body) !important; color: var(--wp--preset--color--navy) !important; }
#CybotCookiebotDialogHeader { display: none !important; }
#CybotCookiebotDialog h2 { font-family: var(--wp--preset--font-family--heading) !important; color: var(--wp--preset--color--navy) !important; }
#CybotCookiebotDialogFooter .CybotCookiebotDialogBodyButton {
	background-color: transparent !important; border: 2px solid var(--wp--preset--color--navy) !important;
	border-radius: 8px !important; color: var(--wp--preset--color--navy) !important;
	font-family: var(--wp--preset--font-family--heading) !important; font-weight: 600 !important;
}
#CybotCookiebotDialogFooter #CybotCookiebotDialogBodyButtonAccept,
#CybotCookiebotDialogFooter #CybotCookiebotDialogBodyLevelButtonAccept,
#CybotCookiebotDialogFooter #CybotCookiebotDialogBodyLevelButtonLevelOptinAllowAll {
	background-color: var(--wp--preset--color--navy) !important; border-color: var(--wp--preset--color--navy) !important; color: #fff !important;
}
#CybotCookiebotDialog.CybotEdge #CybotCookiebotDialogBodyEdgeMoreDetails a,
#CybotCookiebotDialog a { color: var(--wp--preset--color--navy) !important; }
#CybotCookiebotDialog input:checked + .CybotCookiebotDialogBodyLevelButtonSlider { background-color: var(--wp--preset--color--red) !important; }
