/*
Theme Name: Akrosphäre
Theme URI: https://akrosphaere.at
Author: Grazer Akrosphäre
Description: Block-Theme für den Relaunch der Akrosphäre-Website. Aufbau nach dem neuen Entwurf (Sport, Kultur, Zirkuszentrum, Mitmachen & Unterstützen, Über uns, Kontakt) – mit fertigen Seitenvorlagen und Bausteinen zum Zusammenklicken.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akrosphaere
*/

/* ---------- Allgemein ---------- */

html { scroll-behavior: smooth; }

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.akro-intro { max-width: 640px; }
/* Einleitungen und Boxen stehen linksbündig, auch innerhalb zentrierter Abschnitte */
.is-layout-constrained > .akro-intro {
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size, 1200px)) / 2)) !important;
	margin-right: auto !important;
}

/* Bilder in Bausteinen: abgerundet */
.akro-bild img,
.wp-block-post-featured-image.akro-bild img { border-radius: 12px; }

/* Überschriften im Fließtext (z. B. Impressum) bekommen etwas Luft nach oben */
:where(.wp-block-post-content) > :is(h2, h3):not(:first-child) { margin-top: 1.6em; }

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

.akro-header .wp-block-navigation a { text-decoration: none; }
.akro-header .wp-block-navigation .current-menu-item > a,
.akro-header .wp-block-navigation a[aria-current="page"] {
	font-weight: 700;
	box-shadow: inset 0 -2px 0 currentColor;
}
.akro-header .wp-block-site-logo img { height: auto; }
.akro-header .wp-block-site-title a { text-decoration: none; }

/* ---------- Karten (Blockstile für Gruppen) ---------- */

.wp-block-group.is-style-karte,
.wp-block-group.is-style-karte-hell,
.wp-block-group.is-style-karte-bild {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--40);
	box-sizing: border-box;
	height: 100%;
}
.wp-block-group.is-style-karte { background-color: var(--wp--preset--color--base); }
.wp-block-group.is-style-karte-hell { background-color: var(--wp--preset--color--base-2); }

/* Karte mit Bild oben (News, Produktionen) */
.wp-block-group.is-style-karte-bild {
	background-color: var(--wp--preset--color--base);
	padding: 0;
	overflow: hidden;
}
.wp-block-group.is-style-karte-bild > .wp-block-post-featured-image,
.wp-block-group.is-style-karte-bild > .wp-block-image { margin: 0; }
.wp-block-group.is-style-karte-bild > .wp-block-post-featured-image img,
.wp-block-group.is-style-karte-bild > .wp-block-image img { border-radius: 0; }
.wp-block-group.is-style-karte-bild > :not(.wp-block-post-featured-image):not(.wp-block-image) {
	margin-left: var(--wp--preset--spacing--40);
	margin-right: var(--wp--preset--spacing--40);
}
.wp-block-group.is-style-karte-bild > :last-child { margin-bottom: var(--wp--preset--spacing--40); }
.wp-block-group.is-style-karte-bild > :first-child:not(.wp-block-post-featured-image):not(.wp-block-image) { margin-top: var(--wp--preset--spacing--40); }

/* Hinweis-Box (gelb) */
.wp-block-group.is-style-hinweis {
	background-color: var(--wp--preset--color--highlight);
	border: 1px solid var(--wp--preset--color--highlight-border);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--highlight-text);
	box-sizing: border-box;
}
.wp-block-group.is-style-hinweis a:not(.wp-element-button),
.wp-block-group.is-style-hinweis h2,
.wp-block-group.is-style-hinweis h3 { color: var(--wp--preset--color--highlight-text); }

/* Info-Box (Markenfarbe, hell) */
.wp-block-group.is-style-info {
	background-color: var(--wp--preset--color--tint);
	border: 1px solid var(--wp--preset--color--tint-2);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--40);
	box-sizing: border-box;
}
.wp-block-group.is-style-info h2,
.wp-block-group.is-style-info h3 { color: var(--wp--preset--color--primary); }

/* ---------- Termine ---------- */

.wp-block-group.is-style-termin {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-top: 14px;
	padding-bottom: 14px;
	gap: 16px;
	align-items: center;
}
.wp-block-group.is-style-termin > * { margin: 0; }
.akro-termin-datum { flex: 0 0 88px; font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.akro-termin-titel { flex: 1 1 auto; }

/* ---------- Tags (Blockstile für Absätze) ---------- */

p.is-style-tag,
p.is-style-tag-kultur,
p.is-style-tag-hinweis,
p.is-style-tag-neutral,
.akro-tags a {
	display: inline-block;
	width: fit-content;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
}
p.is-style-tag { background: var(--wp--preset--color--tint); color: var(--wp--preset--color--primary); }
p.is-style-tag-kultur { background: var(--wp--preset--color--kultur); color: var(--wp--preset--color--kultur-text); }
p.is-style-tag-hinweis { background: var(--wp--preset--color--highlight); color: var(--wp--preset--color--highlight-text); border: 1px solid var(--wp--preset--color--highlight-border); }
p.is-style-tag-neutral { background: var(--wp--preset--color--base-3); color: var(--wp--preset--color--muted); }
.akro-tags a { background: var(--wp--preset--color--kultur); color: var(--wp--preset--color--kultur-text); }
.akro-tags .wp-block-post-terms__separator { display: none; }
.akro-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Kennzahlen ---------- */

.akro-zahl { font-size: var(--wp--preset--font-size--x-large); font-weight: 700; line-height: 1.1; color: var(--wp--preset--color--primary); }

/* ---------- Tabellen (Ansprechpersonen, Raum mieten) ---------- */

.wp-block-table.is-style-liste table { border-collapse: collapse; width: 100%; }
.wp-block-table.is-style-liste th,
.wp-block-table.is-style-liste td {
	border: none;
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 12px 16px 12px 0;
	text-align: left;
	vertical-align: top;
}
.wp-block-table.is-style-liste thead { border-bottom: none; }
.wp-block-table.is-style-liste th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--muted);
}
.wp-block-table.is-style-liste tr:last-child td { border-bottom: none; }

@media (max-width: 600px) {
	.wp-block-table.is-style-liste thead { display: none; }
	.wp-block-table.is-style-liste td { display: block; padding: 2px 0; border: none; }
	.wp-block-table.is-style-liste tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--wp--preset--color--border); }
	.wp-block-table.is-style-liste td:first-child { font-weight: 700; }
}

/* ---------- Partnerlogos ---------- */

.akro-logos .wp-block-image img {
	max-height: 64px;
	width: auto;
	object-fit: contain;
}

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

.akro-footer a { color: inherit; }
.akro-footer a:hover { color: var(--wp--preset--color--base); }

/* ---------- Abstände zwischen Hauptbereichen ---------- */

.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull,
.akro-main > .alignfull { margin-block-start: 0 !important; margin-block-end: 0 !important; }

.akro-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-top: 18px;
	padding-bottom: 18px;
}
