/*
Theme Name: SHG Kiel
Theme URI: https://adipositas-shg-kiel.de
Author: AdipositasHilfe Deutschland e.V.
Author URI: https://www.adipositas-selbsthilfe.de
Description: Schlankes, barrierearmes Block-Theme für die Adipositas Selbsthilfegruppe Kiel. Lokale Schrift (Atkinson Hyperlegible Next), keine externen Dienste, keine Cookies.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shg-kiel
Tags: block-patterns, full-site-editing, accessibility-ready, custom-colors
*/

/* ---------- Grundlagen & Barrierefreiheit ---------- */

html {
	scroll-padding-top: 2rem;
}

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

/* Sichtbarer, kräftiger Fokusrahmen für Tastaturnutzer */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--fokus);
	outline-offset: 3px;
	border-radius: 2px;
	box-shadow: 0 0 0 6px var(--wp--preset--color--basis);
}

/* Links im Fließtext immer unterstrichen (nicht nur über Farbe erkennbar) */
:where(.wp-block-post-content, .entry-content, .wp-block-group) p a,
:where(.wp-block-post-content, .entry-content) li a {
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

/* Sprunglink (von WordPress automatisch eingefügt) gut sichtbar machen */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--dunkel);
	color: var(--wp--preset--color--basis);
	font-size: 1.125rem;
	padding: 1rem 1.5rem;
	z-index: 100000;
	text-decoration: underline;
}

/* Mindestgröße für Klickflächen (WCAG 2.5.8) */
.wp-block-button__link,
.wp-block-navigation-item__content,
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 44px;
	justify-content: center;
}

/* Text darf nicht abgeschnitten werden, auch bei 200 % Zoom */
h1, h2, h3, h4 {
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Bewegung reduzieren, wenn im System eingestellt */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Hoher Kontrast unter Windows */
@media (forced-colors: active) {
	.wp-block-button__link {
		border: 2px solid ButtonText;
	}
}

/* ---------- Kopfbereich ---------- */

.shgk-kopf .wp-block-site-logo img {
	height: auto;
}

.shgk-kopf .wp-block-site-title a {
	text-decoration: none;
}

.shgk-kopf .wp-block-navigation .current-menu-item > a,
.shgk-kopf .wp-block-navigation [aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 0.35em;
}

/* ---------- Karten ---------- */

.is-style-shgk-karte {
	border: 1px solid var(--wp--preset--color--rahmen);
	border-radius: 12px;
	background: var(--wp--preset--color--basis);
}

/* ---------- Fußbereich ---------- */

.shgk-fuss a {
	color: inherit;
}

.shgk-fuss a:hover {
	text-decoration-thickness: 2px;
}

/* ---------- Druckansicht ---------- */

@media print {
	.shgk-kopf nav,
	.skip-link {
		display: none !important;
	}

	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
	}
}
