/*
 * backOffice Fischer – Ergänzungen zu theme.json.
 * Nur was Core-Blöcke nicht abbilden: Pill-Header, Burger-Overlay,
 * Back-to-Top, Karten-Hover, Häkchen-Listen, Footer-Schriftzug, Grid-Feinheiten.
 * Werte 1:1 aus der Design-Quelle (design-source.dc.html der Übergabe).
 */

/* ---------- Grundlagen ---------- */

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--wp--custom--header-offset);
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection {
	background: var(--wp--preset--color--blue-300);
}

.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.bo-main {
	flex: 1;
}

h1,
h2,
h3,
.bo-balance {
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

:where(a, button, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--wp--preset--color--blue-600);
	outline-offset: 3px;
}

.bo-break-all a,
a[href^="mailto:"] {
	word-break: break-all;
}

/* ---------- Rahmen & Sektionen ---------- */

.bo-frame {
	padding: 12px;
}

.bo-section {
	padding: var(--wp--preset--spacing--section) 20px;
}

.bo-section.bo-section--flush-top {
	padding-top: 0;
}

.bo-section.bo-section--flush-bottom {
	padding-bottom: 0;
}

.bo-section.bo-section--teaser {
	padding-top: 16px;
}

/* ---------- Block-Stile ---------- */

/* Eyebrow-Pill */
.is-style-pill {
	width: fit-content;
	padding: 7px 14px;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
}

.is-style-pill.has-text-align-center,
.is-style-chip.has-text-align-center {
	margin-inline: auto;
}

/* Chip */
.is-style-chip {
	width: fit-content;
	padding: 8px 16px;
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--blue-300);
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--nav);
	font-weight: 700;
}

/* Buttons */
.wp-block-button__link {
	transition: transform 0.2s, background-color 0.2s;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
}

.wp-block-button.is-style-secondary .wp-block-button__link,
.wp-block-button.is-style-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-secondary .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
}

.bo-btn-small .wp-block-button__link {
	padding: 12px 22px;
	font-size: var(--wp--preset--font-size--nav);
	white-space: nowrap;
}

.bo-btn-small .wp-block-button__link:hover {
	transform: translateY(-1px);
}

/* Häkchen-Liste */
.wp-block-list.is-style-check {
	list-style: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.is-style-check li {
	position: relative;
	padding-left: 34px;
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
}

.is-style-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wp--preset--color--blue-300);
}

.is-style-check li::after {
	content: "";
	position: absolute;
	left: 8.5px;
	top: 6px;
	box-sizing: border-box;
	width: 5px;
	height: 10px;
	border-right: 2px solid var(--wp--preset--color--navy);
	border-bottom: 2px solid var(--wp--preset--color--navy);
	transform: translateY(-1px) rotate(45deg);
}

/* Karte mit Hover */
.is-style-card {
	transition: transform 0.25s, box-shadow 0.25s;
}

.is-style-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--lift);
}

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

.bo-header {
	position: fixed;
	top: 14px;
	left: 0;
	right: 0;
	z-index: 50;
	display: flex;
	justify-content: center;
	padding: 0 14px;
	pointer-events: none;
}

.admin-bar .bo-header {
	top: calc(14px + var(--wp-admin--admin-bar--height, 0px));
}

.bo-header .bo-header__bar {
	pointer-events: auto;
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
	padding: 10px 10px 10px 22px;
	background: rgba(255, 255, 255, 0.78);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: var(--wp--custom--radius--pill);
	box-shadow: var(--wp--preset--shadow--header);
}

.bo-logo {
	flex-shrink: 0;
}

.bo-logo a {
	display: flex;
	align-items: center;
}

.bo-logo img {
	display: block;
	width: auto;
	height: clamp(48px, 5vw, 64px);
}

.bo-nav.wp-block-navigation .wp-block-navigation-item__content {
	padding: 10px 16px;
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--ink);
	transition: background 0.2s;
}

.bo-nav.wp-block-navigation .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--navy);
}

.bo-burger {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--navy);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
}

.bo-burger span {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--white);
}

.bo-burger span:last-child {
	width: 12px;
	margin-left: 6px;
}

/* ---------- Mobilmenü (Overlay) ---------- */

.bo-header .bo-menu {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 60;
	padding: 24px;
	overflow-y: auto;
	pointer-events: auto;
}

.bo-header .bo-menu.is-open {
	display: flex;
}

.bo-menu .bo-menu__bar {
	padding: 10px 10px 10px 22px;
	background: rgba(255, 255, 255, 0.78);
	border-radius: var(--wp--custom--radius--pill);
}

.bo-menu__logo img {
	display: block;
	width: auto;
	height: 48px;
}

.bo-menu__close {
	position: relative;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--navy);
	cursor: pointer;
}

.bo-menu__close span {
	position: absolute;
	left: 15px;
	top: 23px;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--white);
	transform: rotate(45deg);
}

.bo-menu__close span:last-child {
	transform: rotate(-45deg);
}

/* Der Navigation-Block hängt seine Klasse auch an das innere <ul>. */
.bo-menu nav.bo-menu__nav {
	margin-top: 48px;
}

.bo-menu__nav.wp-block-navigation .wp-block-navigation__container,
.bo-menu__nav.wp-block-navigation .wp-block-navigation-item {
	width: 100%;
	align-items: stretch;
}

.bo-menu__nav.wp-block-navigation .wp-block-navigation-item__content {
	display: block;
	padding: 14px 8px;
	font-size: var(--wp--preset--font-size--menu);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--navy);
	border-bottom: 1px solid rgba(28, 44, 61, 0.12);
	flex: 1;
}

.bo-menu .bo-menu__actions {
	margin-top: auto;
	padding-top: 24px;
}

.bo-menu__actions .wp-block-button,
.bo-menu__actions .wp-block-button__link {
	width: 100%;
}

.bo-menu__actions .wp-block-button__link {
	padding: 16px 22px;
	text-align: center;
}

.bo-menu__actions .wp-block-button__link:hover {
	transform: none;
}

body.bo-menu-open {
	overflow: hidden;
}

@media (max-width: 959px) {
	.bo-header .bo-nav,
	.bo-header .bo-header__cta {
		display: none;
	}
}

@media (min-width: 960px) {
	.bo-header .bo-burger,
	.bo-header .bo-menu,
	.bo-header .bo-menu.is-open {
		display: none;
	}
}

/* ---------- Hero ---------- */

.bo-hero {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--section);
	padding: clamp(130px, 16vw, 190px) 20px clamp(80px, 10vw, 140px);
}

.bo-hero__title {
	hyphens: manual;
}

.bo-hero .bo-hero__lead {
	max-width: 620px;
}

.bo-hero__lead strong {
	font-weight: 700;
	color: var(--wp--preset--color--navy);
}

/* ---------- Über mich ---------- */

.bo-split.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: clamp(40px, 6vw, 88px);
	align-items: center;
}

.bo-portrait {
	position: relative;
}

.bo-portrait__img {
	border-radius: 32px;
	overflow: hidden;
	background: var(--wp--preset--color--surface);
}

.bo-portrait__img img {
	display: block;
	width: 100%;
}

.bo-portrait .bo-name-card {
	position: absolute;
	/* Quelle: clamp(12px,3vw,-28px) – Minimum größer als Maximum, ergibt immer 12px. */
	left: 12px;
	bottom: 28px;
	margin: 0;
	padding: 18px 22px;
	border-radius: var(--wp--custom--radius--tile);
	box-shadow: var(--wp--preset--shadow--card);
}

.bo-stats.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.bo-stat {
	padding: 22px;
	border-radius: var(--wp--custom--radius--tile);
	background: var(--wp--preset--color--surface);
}

.bo-stat__value {
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--wp--preset--color--navy);
}

.bo-stat__value--text {
	letter-spacing: -0.02em;
	line-height: 1.2;
	hyphens: manual;
	overflow-wrap: break-word;
}

.bo-stat__label {
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	color: var(--wp--preset--color--text-muted);
}

/* ---------- Leistungen ---------- */

.bo-cards > .bo-card {
	flex: 1 1 300px;
	min-width: 0;
}

.bo-card {
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 3vw, 34px);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--surface);
}

.bo-card .bo-tag {
	align-self: flex-start;
	padding: 8px 14px 8px 8px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--white);
}

.bo-tag__num {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bo-tag__label {
	font-size: var(--wp--preset--font-size--s);
	font-weight: 700;
	color: var(--wp--preset--color--navy);
}

/* Teaser */
.bo-teaser.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.bo-teaser {
	border-radius: var(--wp--custom--radius--card);
	overflow: hidden;
}

.bo-teaser .bo-teaser__media {
	position: relative;
	min-height: clamp(240px, 30vw, 380px);
	margin: 0;
}

.bo-teaser__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 30% 50%;
	display: block;
}

.bo-teaser .bo-teaser__body {
	padding: clamp(28px, 4vw, 56px);
}

.bo-teaser .wp-block-button__link {
	white-space: nowrap;
}

/* ---------- Vorteile ---------- */

.bo-vorteile {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--section);
	padding: clamp(72px, 10vw, 130px) 20px;
}

.bo-vorteile::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -40%;
	width: 900px;
	height: 600px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(148, 174, 201, 0.28), rgba(148, 174, 201, 0));
	pointer-events: none;
}

.bo-vorteile > * {
	position: relative;
}

.bo-benefits.is-layout-grid {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 600px) {
	.bo-benefits.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.bo-benefits.is-layout-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.bo-benefit {
	min-height: 180px;
	padding: 28px;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(203, 221, 239, 0.14);
	transition: background 0.25s, transform 0.25s;
}

.bo-benefit.is-layout-flex {
	align-items: stretch;
	justify-content: flex-start;
}

.bo-benefit:hover {
	background: rgba(255, 255, 255, 0.1);
}

.bo-benefit__num {
	font-size: var(--wp--preset--font-size--s);
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--blue-400);
}

.bo-benefit__text {
	font-size: var(--wp--preset--font-size--xl);
	line-height: 1.4;
	font-weight: 600;
	color: var(--wp--preset--color--white);
}

/* CTA-Kachel: ganze Fläche klickbar, Pfeil-Kreis als Pseudo-Element */
.bo-benefits .bo-benefit--cta {
	position: relative;
	border: 0;
	background: var(--wp--preset--color--blue-300);
}

.bo-benefit--cta:hover {
	background: var(--wp--preset--color--blue-300);
	transform: translateY(-4px);
}

.bo-benefit--cta::before {
	content: "";
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--wp--preset--color--navy);
}

.bo-benefit--cta::after {
	content: "";
	position: absolute;
	left: 41.5px;
	top: 43.5px;
	box-sizing: border-box;
	width: 9px;
	height: 9px;
	border-top: 2px solid var(--wp--preset--color--white);
	border-right: 2px solid var(--wp--preset--color--white);
	transform: rotate(45deg);
	pointer-events: none;
}

.bo-benefit--cta .bo-benefit__text {
	font-weight: 700;
	color: var(--wp--preset--color--navy);
}

.bo-benefit--cta a,
.bo-benefit--cta a:hover {
	color: var(--wp--preset--color--navy);
}

.bo-benefit--cta a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 24px;
}

.bo-benefit--cta a:focus-visible {
	outline: none;
}

.bo-benefit--cta:focus-within {
	outline: 3px solid var(--wp--preset--color--white);
	outline-offset: 3px;
}

/* ---------- Kontakt ---------- */

.bo-contact .bo-contact-row {
	position: relative;
	align-items: center;
	padding: 20px 24px;
	border-radius: var(--wp--custom--radius--row);
	background: var(--wp--preset--color--surface);
	transition: background 0.2s;
}

.bo-contact .bo-contact-row:hover {
	background: var(--wp--preset--color--surface-hover);
}

.bo-contact-row__label {
	flex-shrink: 0;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	color: var(--wp--preset--color--text-subtle);
}

.bo-contact-row__value {
	min-width: 0;
	font-size: var(--wp--preset--font-size--m);
	font-weight: 700;
}

.bo-contact-row__value a,
.bo-contact-row__value a:hover {
	color: var(--wp--preset--color--navy);
}

.bo-contact-row__value a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--wp--custom--radius--row);
}

.bo-contact-row__value a:focus-visible {
	outline: none;
}

.bo-contact-row:focus-within {
	outline: 3px solid var(--wp--preset--color--blue-600);
	outline-offset: 3px;
}

/* ---------- Unterseiten ---------- */

.bo-page-hero {
	border-radius: var(--wp--custom--radius--section);
	padding: clamp(130px, 15vw, 180px) 20px clamp(56px, 7vw, 90px);
}

.bo-page-title {
	hyphens: manual;
	overflow-wrap: break-word;
}

.page-datenschutz .bo-page-title {
	font-size: clamp(38px, 6vw, 76px);
}

.bo-page-body {
	padding: clamp(56px, 8vw, 100px) 20px;
}

.bo-legal {
	font-size: var(--wp--preset--font-size--m);
	line-height: 1.7;
	color: var(--wp--preset--color--ink);
}

.bo-legal.bo-legal--datenschutz {
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.75;
}

.bo-legal > h2.wp-block-heading {
	margin-block-start: 44px;
	font-size: var(--wp--preset--font-size--card-title);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: inherit;
}

.bo-legal--datenschutz > h2.wp-block-heading {
	margin-block-start: 48px;
	font-size: var(--wp--preset--font-size--xxl);
}

.bo-legal > h3.wp-block-heading {
	margin-block-start: 28px;
	font-size: var(--wp--preset--font-size--l);
	font-weight: 700;
	letter-spacing: normal;
	line-height: inherit;
}

.bo-legal .bo-legal__lead {
	font-size: var(--wp--preset--font-size--xl);
	line-height: 1.65;
	font-weight: 500;
	color: var(--wp--preset--color--navy);
}

.bo-legal ul.wp-block-list {
	padding-left: 22px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bo-legal ul.bo-list-tight {
	gap: 4px;
}

.bo-legal strong {
	color: var(--wp--preset--color--navy);
}

.bo-legal p a {
	font-weight: 600;
	text-decoration: underline;
	word-break: break-all;
}

.bo-legal-card {
	padding: clamp(24px, 3vw, 36px);
	border-radius: var(--wp--custom--radius--card);
}

.bo-legal-card.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.bo-label {
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-subtle);
}

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

.bo-footer {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--section);
	padding: clamp(48px, 6vw, 80px) clamp(20px, 4vw, 56px) 0;
}

.bo-footer__grid.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bo-footer__brand.is-layout-flex {
	align-items: stretch;
}

.bo-footer__logo {
	align-self: flex-start;
}

.bo-footer__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 88px;
	object-fit: contain;
}

.bo-footer__brand p {
	font-size: var(--wp--preset--font-size--nav);
	line-height: 1.6;
	color: var(--wp--preset--color--text-muted);
}

.bo-footer__col p:not(.bo-label) {
	font-size: var(--wp--preset--font-size--nav);
	font-weight: 500;
}

.bo-footer__col--contact p:not(.bo-label) {
	line-height: 1.5;
}

.bo-footer > .bo-footer__bottom {
	margin-top: 48px;
	padding-top: 20px;
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--s);
	color: var(--wp--preset--color--text-subtle);
}

.bo-footer > .bo-wordmark {
	max-width: none;
	margin-top: 12px;
	text-align: center;
	font-size: var(--wp--preset--font-size--wordmark);
	line-height: 0.8;
	font-weight: 800;
	letter-spacing: -0.06em;
	color: var(--wp--preset--color--footer-wordmark);
	white-space: nowrap;
	transform: translateY(12%);
	-webkit-user-select: none;
	user-select: none;
}

/* ---------- Back-to-Top ---------- */

.bo-to-top {
	position: fixed;
	right: clamp(16px, 2.5vw, 32px);
	bottom: clamp(16px, 2.5vw, 32px);
	z-index: 40;
	width: 52px;
	height: 52px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--navy);
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow: 0 14px 30px -10px rgba(28, 44, 61, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: transform 0.2s, background 0.2s, opacity 0.2s, visibility 0.2s;
}

.bo-to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

body.bo-menu-open .bo-to-top {
	opacity: 0;
	visibility: hidden;
}

.bo-to-top:hover {
	transform: translateY(-3px);
	background: var(--wp--preset--color--navy-hover);
}

.bo-to-top span {
	box-sizing: border-box;
	width: 11px;
	height: 11px;
	border-top: 2px solid var(--wp--preset--color--white);
	border-left: 2px solid var(--wp--preset--color--white);
	transform: translateY(3px) rotate(45deg);
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}

	.wp-block-button__link:hover,
	.is-style-card:hover,
	.bo-benefit--cta:hover,
	.bo-to-top:hover {
		transform: none;
	}
}

/* ---------- Editor ---------- */

/* Im Editor nicht fixieren und das Mobilmenü zum Bearbeiten sichtbar lassen. */
.editor-styles-wrapper .bo-header {
	position: relative;
	top: 0;
	flex-direction: column;
	gap: 12px;
	pointer-events: auto;
}

.editor-styles-wrapper .bo-header .bo-menu,
.editor-styles-wrapper .bo-header .bo-menu.is-open {
	display: flex;
	position: relative;
	inset: auto;
	border-radius: 24px;
}

/* Programmatischer Fokus nach Anker-Sprung ohne Rahmen. */
[tabindex="-1"]:focus {
	outline: none;
}
