/*
Theme Name: asz
Theme URI: https://asz-gmbh.de
Author: asz GmbH & Co. KG
Description: Modernes, schlankes Block-Theme (Full Site Editing) für die asz GmbH & Co. KG – Arbeitsmedizin, Arbeitssicherheit und Gesundheitsmanagement. Vollständig nativ mit dem Gutenberg-Editor bedienbar: alle Inhalte, Kopf- und Fußbereiche, Menüs und Farben lassen sich ohne Code im Website-Editor anpassen.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: asz
Tags: full-site-editing, block-patterns, business, accessibility-ready
*/

/* ---------------------------------------------------------------------------
   1. Basis
   --------------------------------------------------------------------------- */

:root {
	--asz-radius-sm: 10px;
	--asz-radius-md: 16px;
	--asz-radius-lg: 24px;
	--asz-radius-xl: 32px;
	--asz-ring: 0 0 0 3px rgba(18, 208, 126, .45);
	--asz-t: 220ms cubic-bezier(.2, .7, .3, 1);
	--asz-t-slow: 420ms cubic-bezier(.2, .7, .3, 1);
	--asz-header-h: 74px;
	--asz-topbar-h: 40px;
	--asz-shell: 1240px;
}

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

html {
	overflow-x: clip;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--asz-header-h) + 24px);
	-webkit-text-size-adjust: 100%;
}

[hidden] {
	display: none !important;
}

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

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary-dark);
}

:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

.asz-skip-link {
	position: absolute;
	left: -9999px;
	z-index: 1000;
	padding: .75rem 1.25rem;
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-radius: 0 0 var(--asz-radius-sm) 0;
	font-weight: 700;
}

.asz-skip-link:focus {
	left: 0;
	top: 0;
}

/* ---------------------------------------------------------------------------
   2. Buttons – Varianten
   --------------------------------------------------------------------------- */

.wp-block-button__link {
	transition: background-color var(--asz-t), color var(--asz-t), transform var(--asz-t), box-shadow var(--asz-t);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	will-change: transform;
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(0, 56, 47, .18);
}

.wp-block-button__link:active {
	transform: translateY(0);
}

/* Signalgrüner Haupt-CTA */
.is-style-asz-accent .wp-block-button__link,
.wp-block-button.is-style-asz-accent .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary-dark);
}

.is-style-asz-accent .wp-block-button__link:hover {
	background: #0bb96f;
	color: var(--wp--preset--color--primary-dark);
}

/* Outline */
.is-style-asz-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	box-shadow: inset 0 0 0 2px currentColor;
}

.is-style-asz-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: #fff;
	box-shadow: 0 10px 24px rgba(0, 56, 47, .18);
}

.has-primary-dark-background-color .is-style-asz-outline .wp-block-button__link,
.has-primary-background-color .is-style-asz-outline .wp-block-button__link,
.wp-block-cover.asz-hero .is-style-asz-outline .wp-block-button__link,
.asz-on-dark .is-style-asz-outline .wp-block-button__link {
	color: #fff;
}

.has-primary-dark-background-color .is-style-asz-outline .wp-block-button__link:hover,
.has-primary-background-color .is-style-asz-outline .wp-block-button__link:hover,
.wp-block-cover.asz-hero .is-style-asz-outline .wp-block-button__link:hover,
.asz-on-dark .is-style-asz-outline .wp-block-button__link:hover {
	background: #fff;
	color: var(--wp--preset--color--primary);
}

/* Textlink-Button mit Pfeil */
.is-style-asz-link .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	padding-left: 0;
	padding-right: 0;
	font-weight: 700;
}

.is-style-asz-link .wp-block-button__link::after {
	content: "→";
	transition: transform var(--asz-t);
}

.is-style-asz-link .wp-block-button__link:hover {
	box-shadow: none;
	transform: none;
	color: var(--wp--preset--color--accent);
}

.is-style-asz-link .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* ---------------------------------------------------------------------------
   3. Flächen, Karten & Utility-Klassen (über „Zusätzliche CSS-Klasse“ nutzbar)
   --------------------------------------------------------------------------- */

.asz-card {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--asz-radius-lg);
	padding: clamp(1.5rem, 3vw, 2.25rem);
	height: 100%;
	transition: transform var(--asz-t), box-shadow var(--asz-t), border-color var(--asz-t);
}

.asz-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 44px rgba(0, 56, 47, .12);
	border-color: var(--wp--preset--color--mint-strong);
}

.asz-card--flat:hover {
	transform: none;
	box-shadow: none;
}

.asz-card--mint {
	background: var(--wp--preset--color--mint);
	border-color: transparent;
}

.asz-card--dark {
	background: var(--wp--preset--color--primary);
	border-color: transparent;
	color: #fff;
}

.asz-card--dark :where(h1, h2, h3, h4, h5, h6, p, li) {
	color: #fff;
}

.asz-surface {
	background: var(--wp--preset--color--surface);
}

.asz-round-lg {
	border-radius: var(--asz-radius-lg);
	overflow: hidden;
}

.asz-round-xl {
	border-radius: var(--asz-radius-xl);
	overflow: hidden;
}

.asz-shadow {
	box-shadow: 0 18px 48px rgba(0, 56, 47, .14);
}

.asz-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: .5rem !important;
}

.asz-on-dark .asz-eyebrow {
	color: var(--wp--preset--color--accent);
}

.asz-lead {
	font-size: clamp(1.0625rem, .95rem + .5vw, 1.3125rem);
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

.asz-on-dark,
.asz-on-dark :where(h1, h2, h3, h4, h5, h6) {
	color: #fff;
}

.asz-on-dark :where(p, li, td, th) {
	color: rgba(255, 255, 255, .86);
}

.asz-on-dark .asz-lead {
	color: rgba(255, 255, 255, .8);
}

.asz-on-dark a:where(:not(.wp-block-button__link)) {
	color: var(--wp--preset--color--accent);
}

/* Pill-Tags (CI: „persönlich“, „nahbar“ …) */
.asz-pill,
.asz-pills li {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .4rem .9rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--primary-dark);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.3;
}

.asz-pills {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	padding: 0;
	margin: 0;
}

/* Häkchen-Listen */
.asz-check-list {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}

.asz-check-list li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: .6rem;
}

.asz-check-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .3em;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300382f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/.8rem no-repeat;
}

.asz-on-dark .asz-check-list li::before {
	background-color: var(--wp--preset--color--accent);
}

/* Zahlenliste mit Kreisen */
.asz-steps {
	counter-reset: asz-step;
	list-style: none;
	padding-left: 0;
}

.asz-steps li {
	counter-increment: asz-step;
	position: relative;
	padding-left: 3.25rem;
	margin-bottom: 1.25rem;
}

.asz-steps li::before {
	content: counter(asz-step);
	position: absolute;
	left: 0;
	top: -.15em;
	width: 2.25rem;
	height: 2.25rem;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
   4. Kern-Blöcke feinschliff
   --------------------------------------------------------------------------- */

.wp-block-group.has-background {
	border-radius: 0;
}

.wp-block-columns {
	gap: clamp(1.25rem, 2.5vw, 2rem);
}

.wp-block-image img {
	border-radius: inherit;
}

.wp-block-cover {
	border-radius: 0;
}

/* Details/Akkordeon – zentrales UI-Muster der Leistungsseiten */
.wp-block-details {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--asz-radius-md);
	background: #fff;
	padding: 0;
	margin-bottom: .75rem;
	overflow: hidden;
	transition: border-color var(--asz-t), box-shadow var(--asz-t);
}

.wp-block-details[open] {
	border-color: var(--wp--preset--color--mint-strong);
	box-shadow: 0 8px 28px rgba(0, 56, 47, .07);
}

.wp-block-details > summary {
	list-style: none;
	cursor: pointer;
	padding: 1.15rem clamp(1rem, 2vw, 1.5rem);
	padding-right: 3.25rem;
	position: relative;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--primary);
	transition: background-color var(--asz-t);
}

.wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.wp-block-details > summary:hover {
	background: var(--wp--preset--color--surface);
}

.wp-block-details > summary::after {
	content: "";
	position: absolute;
	right: clamp(1rem, 2vw, 1.5rem);
	top: 50%;
	width: 1.6rem;
	height: 1.6rem;
	margin-top: -.8rem;
	border-radius: 999px;
	background: var(--wp--preset--color--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300594c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/.9rem no-repeat;
	transition: transform var(--asz-t), background-color var(--asz-t);
}

.wp-block-details[open] > summary::after {
	transform: rotate(180deg);
	background-color: var(--wp--preset--color--accent);
}

.wp-block-details > :not(summary) {
	padding-inline: clamp(1rem, 2vw, 1.5rem);
}

.wp-block-details > :not(summary):last-child {
	padding-bottom: 1.35rem;
}

.wp-block-details[open] > :not(summary) {
	animation: asz-details-in var(--asz-t-slow) both;
}

@keyframes asz-details-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: none; }
}

/* Tabellen */
.wp-block-table table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--asz-radius-md);
	overflow: hidden;
}

.wp-block-table th {
	background: var(--wp--preset--color--mint);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	text-align: left;
}

.wp-block-table :where(th, td) {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: .85rem 1rem;
}

.wp-block-table tr:last-child td {
	border-bottom: 0;
}

/* Zitate */
.wp-block-quote {
	border-left: 4px solid var(--wp--preset--color--accent);
	padding-left: 1.5rem;
}

/* ---------------------------------------------------------------------------
   5. Sektions-Rhythmus
   --------------------------------------------------------------------------- */

.asz-section {
	padding-block: clamp(3.5rem, 7vw, 7rem);
}

.asz-section--tight {
	padding-block: clamp(2.5rem, 4vw, 4rem);
}

.asz-shell > .wp-block-group__inner-container,
.asz-shell {
	max-width: var(--asz-shell);
	margin-inline: auto;
}

/* Diagonale/organische Trennkante wie in den Referenzen */
.asz-curve-bottom {
	position: relative;
	isolation: isolate;
}

.asz-curve-bottom::after {
	content: "";
	position: absolute;
	left: -2%;
	right: -2%;
	bottom: -1px;
	height: clamp(40px, 6vw, 90px);
	background: var(--wp--preset--color--base);
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	z-index: 1;
}

@media (max-width: 781px) {
	.asz-hide-mobile { display: none !important; }
}

@media (min-width: 782px) {
	.asz-hide-desktop { display: none !important; }
}
