/*
 * Acrum – Ergänzungen zu theme.json (Frontend und Editor).
 * Animationen liegen in motion.css (nur Frontend).
 */

:root {
	--acrum-ease: var(--wp--custom--motion--ease, cubic-bezier(.2, .7, .2, 1));
	--acrum-radius: var(--wp--custom--radius--medium, 12px);
	--acrum-line: var(--wp--preset--color--line);
	--acrum-gold: var(--wp--preset--color--accent);
	--acrum-gold-strong: var(--wp--preset--color--accent-strong);
	--acrum-gold-light: var(--wp--preset--color--accent-light);
}

html {
	scroll-padding-top: 6rem;
	-webkit-text-size-adjust: 100%;
}

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

::selection {
	background: var(--acrum-gold-light);
	color: var(--wp--preset--color--contrast);
}

:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible {
	outline: 2px solid var(--acrum-gold-strong);
	outline-offset: 3px;
	border-radius: 2px;
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
	transition: color .2s ease, text-decoration-color .2s ease;
}

/* Abstände zwischen Header, Inhalt und Footer sowie zwischen vollbreiten Sektionen */
body .wp-site-blocks > * {
	margin-block-start: 0;
}
body .acrum-landing > .alignfull,
body .acrum-main > .alignfull {
	margin-block: 0;
}

/* ---------- Header ---------- */
.acrum-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid transparent;
}
@media (min-width: 601px) {
	.admin-bar .acrum-site-header { top: 46px; }
}
@media (min-width: 783px) {
	.admin-bar .acrum-site-header { top: 32px; }
}

.acrum-brand .wp-block-site-logo + .wp-block-site-title {
	display: none;
}
.acrum-brand .wp-block-site-logo img {
	height: auto;
	max-height: 56px;
	width: auto;
}

.acrum-nav-main .wp-block-navigation-item__content {
	position: relative;
	padding-block: .35em;
}
.acrum-nav-main .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: var(--acrum-gold);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform .35s var(--acrum-ease);
}
.acrum-nav-main .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
.acrum-nav-main .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content::after,
.acrum-nav-main .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
	transform-origin: left;
}
.acrum-nav-main .wp-block-navigation__submenu-container {
	border: 1px solid var(--acrum-line) !important;
	border-radius: var(--acrum-radius);
	box-shadow: var(--wp--preset--shadow--lifted);
	padding: .5rem 0;
	min-width: 15rem !important;
}
.acrum-nav-main .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: .45rem 1.1rem !important;
}
.acrum-nav-main .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	color: var(--acrum-gold-strong);
}
.acrum-nav-main .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30);
}
.acrum-nav-main .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	font-size: var(--wp--preset--font-size--large);
	gap: .9rem;
}

/* Sprachumschalter (Polylang) */
.acrum-lang ul {
	display: flex;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.acrum-lang a {
	display: inline-block;
	padding: .2rem .55rem;
	border: 1px solid var(--acrum-line);
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	transition: border-color .2s ease, background-color .2s ease;
}
.acrum-lang a:hover {
	border-color: var(--acrum-gold);
	background: var(--wp--preset--color--surface);
}

/* ---------- Typografie-Helfer ---------- */
.acrum-eyebrow {
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--acrum-gold-strong);
	margin-bottom: .25rem;
}
.has-dark-background-color .acrum-eyebrow,
.wp-block-cover .acrum-eyebrow,
.acrum-footer .acrum-eyebrow {
	color: var(--acrum-gold-light);
}
.acrum-lead {
	max-width: 46rem;
	font-weight: 300;
	line-height: 1.6;
}
.acrum-prose h2 {
	margin-top: 2.2em;
}
.acrum-prose h3 {
	margin-top: 1.8em;
}
.acrum-prose > :first-child,
.acrum-prose > .wp-block-column > :first-child {
	margin-top: 0;
}

/* Links auf dunklem Grund */
.has-dark-background-color a:not(.wp-element-button) {
	color: inherit;
}
.has-dark-background-color a:not(.wp-element-button):hover {
	color: var(--acrum-gold-light);
}

/* ---------- Buttons ---------- */
.wp-element-button,
.wp-block-button__link {
	transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s var(--acrum-ease);
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.has-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-cover .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--base);
	border-color: rgba(255, 255, 255, .45);
}
.has-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-cover .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}
.has-dark-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.wp-block-cover .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	background: var(--acrum-gold-light);
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-arrow > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	padding-inline: 0;
	border-radius: 0;
	box-shadow: inset 0 -1px 0 var(--acrum-gold);
}
.wp-block-button.is-style-arrow > .wp-block-button__link::after {
	content: "→";
	display: inline-block;
	margin-left: .5em;
	transition: transform .3s var(--acrum-ease);
}
.wp-block-button.is-style-arrow > .wp-block-button__link:hover {
	background: transparent;
	color: var(--acrum-gold-strong);
}
.wp-block-button.is-style-arrow > .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* ---------- Hero ---------- */
.acrum-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: min(64vh, 640px);
	display: grid;
	align-content: center;
}
.acrum-hero::before {
	content: "";
	position: absolute;
	inset: -20%;
	z-index: -1;
	background:
		radial-gradient(40% 50% at 78% 30%, rgba(212, 183, 104, .28), transparent 70%),
		radial-gradient(35% 45% at 15% 85%, rgba(185, 152, 69, .16), transparent 70%);
}
.acrum-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
	background-size: 64px 64px;
	-webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
	mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
}
.acrum-hero h1,
.acrum-slide__title {
	font-weight: 300;
	line-height: 1.05;
	letter-spacing: -0.02em;
	max-width: 15ch;
}
.acrum-hero .acrum-lead {
	color: rgba(255, 255, 255, .82);
}

/* ---------- Werte ---------- */
.acrum-value {
	border-top: 1px solid var(--acrum-gold);
	padding-top: var(--wp--preset--spacing--20);
}
.acrum-value h3 {
	margin-top: .25rem;
}

/* ---------- Karten ---------- */
.is-style-card {
	position: relative;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--acrum-line);
	border-radius: var(--acrum-radius);
	padding: var(--wp--preset--spacing--30);
	padding-bottom: calc(var(--wp--preset--spacing--30) + 1.75rem);
	transition: transform .4s var(--acrum-ease), box-shadow .4s var(--acrum-ease), border-color .4s ease;
}
.is-style-card::after {
	content: "→";
	position: absolute;
	left: var(--wp--preset--spacing--30);
	bottom: var(--wp--preset--spacing--20);
	color: var(--acrum-gold-strong);
	font-size: 1.25rem;
	line-height: 1;
	transition: transform .35s var(--acrum-ease);
}
.is-style-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--lifted);
	border-color: var(--acrum-gold);
}
.is-style-card:hover::after {
	transform: translateX(6px);
}
.is-style-card:focus-within {
	outline: 2px solid var(--acrum-gold-strong);
	outline-offset: 3px;
}
.is-style-card :where(h2, h3) a,
.is-style-card .acrum-card__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.is-style-card :where(h2, h3) a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.is-style-card :where(h2, h3) a:focus-visible {
	outline: none;
}
.is-style-card img {
	transition: transform .6s var(--acrum-ease);
}
.is-style-card:hover img {
	transform: scale(1.04);
}
.acrum-card__number {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 300;
	line-height: 1;
	color: var(--acrum-gold);
}

/* Beitragskarten im Query-Loop gleich hoch */
.wp-block-post-template.is-layout-grid > li {
	display: flex;
}
.wp-block-post-template.is-layout-grid > li > .is-style-card {
	flex: 1;
}

/* ---------- Kennzahlen ---------- */
.acrum-facts {
	display: grid;
	gap: var(--wp--preset--spacing--20);
}
.acrum-fact {
	border-left: 2px solid var(--acrum-gold);
	padding-left: var(--wp--preset--spacing--20);
}
.acrum-fact > * {
	margin: 0;
}
.acrum-fact__value {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 300;
	line-height: 1.1;
	color: var(--wp--preset--color--contrast);
}
.acrum-fact__label {
	color: var(--wp--preset--color--muted);
}

/* ---------- Listen mit Häkchen ---------- */
.wp-block-list.is-style-checks {
	list-style: none;
	padding-left: 0;
}
.wp-block-list.is-style-checks > li {
	position: relative;
	padding-left: 1.9em;
	margin-bottom: .5em;
}
.wp-block-list.is-style-checks > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .35em;
	width: 1.1em;
	height: 1.1em;
	border-radius: 50%;
	background: var(--wp--preset--color--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%237d6320' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 75% no-repeat;
	box-shadow: inset 0 0 0 1px var(--acrum-gold);
}

/* ---------- Seitenkopf, Karten in Seitenspalten ---------- */
.acrum-page-header .wp-block-post-title,
.acrum-page-header h1 {
	max-width: 22ch;
}
@media (min-width: 782px) {
	.acrum-sticky-card {
		position: sticky;
		top: 7rem;
	}
}
.acrum-sticky-card,
.acrum-form-card {
	border-radius: var(--acrum-radius);
}
.acrum-sticky-card > :first-child,
.acrum-form-card > :first-child {
	margin-top: 0;
}
.acrum-contact-lines a {
	font-weight: 500;
}

/* ---------- Aufklappbare Bereiche ---------- */
.wp-block-details {
	border-bottom: 1px solid var(--acrum-line);
	padding-block: .75rem;
}
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	font-size: 1.4em;
	font-weight: 300;
	line-height: 1;
	color: var(--acrum-gold-strong);
	transition: transform .3s var(--acrum-ease);
}
.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

/* ---------- Mitgliedschaften ---------- */
.acrum-logos {
	max-width: 760px;
	margin-inline: auto;
	align-items: center !important;
}
.acrum-logos .wp-block-image {
	margin: 0;
	text-align: center;
}
.acrum-logos img {
	height: 56px;
	width: auto;
	object-fit: contain;
	border-radius: 0;
	filter: grayscale(1);
	opacity: .7;
	transition: filter .4s ease, opacity .4s ease;
}
.acrum-logos .wp-block-image:hover img {
	filter: none;
	opacity: 1;
}

/* ---------- Kontakt-Band ---------- */
.acrum-cta {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.acrum-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(35% 50% at 85% 40%, rgba(212, 183, 104, .14), transparent 100%);
}
.acrum-cta .acrum-lead {
	color: rgba(255, 255, 255, .75);
	margin-top: .5rem;
}

/* ---------- Footer ---------- */
.acrum-footer {
	font-size: .95rem;
}
.acrum-footer .wp-block-site-title {
	color: var(--wp--preset--color--base);
}
.acrum-footer .wp-block-site-title a {
	color: inherit;
}
.acrum-footer a {
	text-decoration: none;
}
.acrum-footer__muted,
.acrum-footer .wp-block-navigation {
	color: rgba(255, 255, 255, .7);
}
.acrum-footer .wp-block-navigation a {
	color: rgba(255, 255, 255, .78);
}
.acrum-footer .wp-block-navigation a:hover {
	color: var(--acrum-gold-light);
}
.acrum-footer__line {
	border-color: rgba(255, 255, 255, .12) !important;
	color: rgba(255, 255, 255, .12) !important;
	margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20) !important;
}

/* ---------- Suche ---------- */
.acrum-search .wp-block-search__inside-wrapper {
	border: 1px solid var(--acrum-line);
	border-radius: 999px;
	padding: 4px;
	max-width: 32rem;
}
.acrum-search .wp-block-search__input {
	border: 0;
	background: transparent;
	padding-inline: 1rem;
}

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 781px) {
	.acrum-hero {
		min-height: 0;
	}
	.acrum-facts {
		grid-template-columns: 1fr;
	}
}

/* Redaktioneller Hinweis (vor Veröffentlichung entfernen) */
.acrum-todo {
	padding: 1rem 1.25rem;
	border: 1px dashed #b3261e;
	border-radius: 8px;
	background: #fff8e1;
	color: #5d4300;
}

/* ---------- Nach oben ---------- */
.acrum-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 40;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	text-decoration: none;
	box-shadow: var(--wp--preset--shadow--soft);
	transition: background-color .25s ease, transform .25s var(--acrum-ease);
}
.acrum-top:hover {
	background: var(--acrum-gold);
	color: var(--wp--preset--color--contrast);
	transform: translateY(-2px);
}

/* ---------- Seitenkopf mit Bild ---------- */
.acrum-page-header__image img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--acrum-radius);
	box-shadow: var(--wp--preset--shadow--lifted);
}
.acrum-page-header .wp-block-columns {
	align-items: center;
}

/* ---------- Leistungskarten mit Bild ---------- */
.is-style-card .acrum-card__image {
	margin: calc(-1 * var(--wp--preset--spacing--30)) calc(-1 * var(--wp--preset--spacing--30)) var(--wp--preset--spacing--20);
	overflow: hidden;
	border-radius: var(--acrum-radius) var(--acrum-radius) 0 0;
}
.is-style-card .acrum-card__image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 0;
}

/* ---------- Hero mit Foto (Cover-Block) ---------- */
.wp-block-cover.acrum-hero {
	display: flex;
	min-height: min(64vh, 640px) !important;
	padding-block: var(--wp--preset--spacing--30);
	padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);
}
.wp-block-cover.acrum-hero::before,
.wp-block-cover.acrum-hero::after {
	display: none;
}
.wp-block-cover.acrum-hero .wp-block-cover__background {
	background: linear-gradient(100deg, rgba(20, 20, 20, .94) 0%, rgba(20, 20, 20, .8) 45%, rgba(20, 20, 20, .4) 100%) !important;
	opacity: 1 !important;
}
.wp-block-cover.acrum-hero .wp-block-cover__inner-container {
	color: var(--wp--preset--color--base);
}

/* ---------- Hero: wechselnde Leitsätze ----------
 * Ohne Animation (oder bei „Bewegung reduzieren“) steht nur der erste Satz da.
 * Der Wechsel selbst steht in motion.css. */
.acrum-slide__title {
	margin-top: .35em;
	color: var(--wp--preset--color--base);
}
.acrum-rotator > .acrum-slide {
	margin-block: 0;
}
body:not(.editor-styles-wrapper) .acrum-rotator > .acrum-slide:not(:first-child),
.acrum-rotator__controls,
.acrum-hero__slides {
	display: none;
}
.editor-styles-wrapper .acrum-hero__slides {
	display: flex;
	gap: 1rem;
	opacity: .6;
}
.editor-styles-wrapper .acrum-hero__slides img {
	max-height: 80px;
	width: auto;
}
.acrum-hero__inner {
	position: relative;
	z-index: 2;
}
