/*
Theme Name: GEB Ulm
Author: GEB Ulm
Description: Schlankes Block-Theme für den Gesamtelternbeirat der Ulmer Kindertagesstätten und Horte.
Version: 0.1.0
Requires at least: 7.0
Requires PHP: 8.3
Text Domain: geb-ulm
*/

:root {
	--geb-primary: #355b52;
	--geb-primary-dark: #294940;
	--geb-primary-hover: #203d36;
	--geb-turquoise: #4c7078;
	--geb-green: #6e8d78;
	--geb-sage: #b9d2c0;
	--geb-sage-soft: #e5efe7;
	--geb-warm: #f3b89c;
	--geb-warm-soft: #fce9dd;
	--geb-focus: #a84f36;
	--geb-ink: #2f3437;
	--geb-muted: #626d70;
	--geb-surface: #fffefb;
	--geb-background: #fff9f2;
	--geb-bluegray: #e7eef0;
	--geb-border: #d8d4cc;
	--geb-shadow: 0 12px 34px rgba(47, 52, 55, 0.08);
}

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

html {
	scroll-behavior: smooth;
	background: var(--geb-background);
}

body {
	margin: 0;
	color: var(--geb-ink);
	background: var(--geb-background);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	line-height: 1.65;
}

::selection {
	color: var(--geb-primary-dark);
	background: var(--geb-warm);
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--geb-primary);
	text-decoration-thickness: 0.09em;
	text-underline-offset: 0.17em;
	overflow-wrap: anywhere;
}

a:hover {
	color: var(--geb-primary-hover);
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--geb-focus);
	outline-offset: 3px;
}

.wp-site-blocks {
	min-height: 100vh;
	background: var(--geb-background);
}

.geb-site-header {
	position: relative;
	z-index: 20;
	border-bottom: 1px solid var(--geb-border);
	background: rgba(255, 254, 251, 0.97);
	box-shadow: 0 3px 18px rgba(47, 52, 55, 0.04);
}

.geb-header-inner {
	min-height: 88px;
	padding-top: 12px;
	padding-bottom: 12px;
}

.geb-brand {
	flex-shrink: 0;
}

.geb-logo {
	margin: 0;
}

.geb-logo img {
	display: block;
	width: 72px;
	height: 60px;
	object-fit: contain;
}

.geb-brand-name {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 750;
	line-height: 1.25;
}

.geb-brand-name a {
	color: var(--geb-primary-dark);
	text-decoration: none;
}

.geb-primary-nav .wp-block-navigation-item__content {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 8px 5px;
	font-size: 0.96rem;
	font-weight: 650;
	text-decoration: none;
	border-radius: 8px;
	transition: color 160ms ease, background-color 160ms ease;
}

.geb-primary-nav .wp-block-navigation-item__content:hover {
	color: var(--geb-primary-dark);
	background: var(--geb-sage-soft);
}

.geb-primary-nav .wp-block-navigation__responsive-container-open,
.geb-primary-nav .wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	color: var(--geb-primary-dark);
}

.geb-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px;
	background: var(--geb-surface);
}

.geb-main {
	padding-top: 56px;
	padding-bottom: 72px;
}

.geb-page-heading,
.geb-archive-heading {
	margin-bottom: 32px;
}

.geb-kicker,
.geb-post-date {
	color: var(--geb-primary);
	font-size: 0.94rem;
	font-weight: 750;
	letter-spacing: 0;
}

.geb-post-date {
	margin-top: 0;
	margin-bottom: 12px;
}

.geb-content,
.geb-content p,
.geb-content li {
	overflow-wrap: anywhere;
}

.geb-content > :first-child {
	margin-top: 0;
}

.geb-content h2,
.geb-content h3,
.geb-content h4 {
	margin-top: 1.8em;
}

.geb-content :where(p, li) {
	color: var(--geb-ink);
}

.geb-content :where(hr) {
	border: 0;
	border-top: 1px solid var(--geb-border);
}

.wp-block-table {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--geb-border);
	border-radius: 12px;
	background: var(--geb-surface);
	box-shadow: 0 8px 24px rgba(47, 52, 55, 0.05);
	scrollbar-color: var(--geb-green) var(--geb-bluegray);
}

.wp-block-table table {
	width: 100%;
	min-width: 100%;
	border-collapse: collapse;
}

/* Legacy content can contain an unwrapped table. Keep it reachable on small screens. */
.geb-content > table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--geb-border);
	border-radius: 12px;
	background: var(--geb-surface);
	box-shadow: 0 8px 24px rgba(47, 52, 55, 0.05);
	scrollbar-color: var(--geb-green) var(--geb-bluegray);
}

.wp-block-table th,
.wp-block-table td,
.geb-content > table th,
.geb-content > table td {
	padding: 10px 12px;
	vertical-align: top;
	border: 1px solid var(--geb-border);
}

.wp-block-table th,
.geb-content > table th {
	background: var(--geb-bluegray);
	text-align: left;
}

.geb-hero {
	min-height: 500px;
	margin-top: 0;
}

.geb-hero .wp-block-cover__image-background {
	object-position: center center;
}

.geb-hero-content {
	width: min(100%, 760px);
	margin-right: auto;
	margin-left: 0;
	padding-top: 40px;
	padding-bottom: 40px;
}

.geb-hero h1 {
	max-width: 720px;
	margin-bottom: 20px;
	font-size: 3.25rem;
	line-height: 1.08;
	text-wrap: balance;
}

.geb-hero-intro {
	max-width: 650px;
	font-size: 1.22rem;
	line-height: 1.55;
}

.wp-block-button__link {
	min-height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	border: 2px solid transparent;
	border-radius: 10px;
	font-weight: 750;
	box-shadow: 0 5px 14px rgba(47, 52, 55, 0.08);
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.wp-block-button__link:hover {
	box-shadow: 0 7px 18px rgba(47, 52, 55, 0.12);
	transform: translateY(-1px);
}

.wp-block-button__link.has-warm-background-color {
	color: var(--geb-ink);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: currentColor;
	box-shadow: none;
}

.geb-section {
	padding-top: 64px;
	padding-bottom: 64px;
}

.geb-section-white {
	background: var(--geb-surface);
}

.geb-section-heading {
	margin-bottom: 30px;
}

.geb-quick-grid,
.geb-card-grid {
	gap: 18px;
}

.geb-quick-link,
.geb-card {
	height: 100%;
	padding: 22px;
	border: 1px solid var(--geb-border);
	border-radius: 16px;
	background: var(--geb-surface);
	box-shadow: var(--geb-shadow);
}

.geb-quick-link {
	border-top: 4px solid var(--geb-warm);
}

.geb-quick-link h3,
.geb-card h2,
.geb-card h3 {
	margin-top: 0;
}

.geb-quick-link h3 a,
.geb-card .wp-block-post-title a {
	color: var(--geb-primary-dark);
	text-decoration: none;
}

.geb-quick-link h3 a:hover,
.geb-card .wp-block-post-title a:hover {
	color: var(--geb-primary-hover);
	text-decoration: underline;
}

.geb-card .wp-block-post-excerpt__more-link {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	font-weight: 750;
}

.geb-legacy-featured-image {
	margin: 0 0 32px;
}

.geb-legacy-featured-image img {
	display: block;
	width: 100%;
	max-height: 520px;
	object-fit: contain;
	object-position: left center;
	border-radius: 14px;
	background: var(--geb-surface);
}

.geb-card .geb-legacy-featured-image {
	margin: -22px -22px 18px;
}

.geb-card .geb-legacy-featured-image img {
	width: calc(100% + 44px);
	max-height: 220px;
	object-fit: cover;
	border-radius: 16px 16px 0 0;
}

.geb-pagination {
	margin-top: 40px;
}

.geb-site-footer {
	padding-top: 42px;
	padding-bottom: 42px;
	color: var(--geb-primary-dark);
	border-top: 1px solid #a9c3b0;
	background: var(--geb-sage);
}

.geb-site-footer a {
	color: var(--geb-primary-dark);
	font-weight: 650;
}

.geb-site-footer a:hover {
	color: var(--geb-primary-hover);
}

.geb-footer-name {
	max-width: 560px;
	margin: 0;
	font-size: 1.05rem;
	font-weight: 750;
}

.geb-footer-links {
	gap: 20px;
}

.geb-404 {
	min-height: 48vh;
}

@media (max-width: 900px) {
	.geb-header-inner {
		align-items: center;
	}

	.geb-brand-name {
		max-width: 190px;
	}

	.geb-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 600px) {
	.geb-header-inner {
		min-height: 76px;
	}

	.geb-logo img {
		width: 56px;
		height: 48px;
	}

	.geb-main {
		padding-top: 38px;
		padding-bottom: 52px;
	}

	.geb-hero {
		min-height: 540px;
	}

	.geb-hero h1 {
		font-size: 2.25rem;
		line-height: 1.12;
	}

	.geb-hero-intro {
		font-size: 1.08rem;
	}

	.geb-section {
		padding-top: 48px;
		padding-bottom: 48px;
	}

	.geb-card-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.geb-quick-link,
	.geb-card {
		padding: 18px;
	}

	.geb-card .geb-legacy-featured-image {
		margin: -18px -18px 16px;
	}

	.geb-card .geb-legacy-featured-image img {
		width: calc(100% + 36px);
	}

	.geb-footer-inner {
		align-items: flex-start !important;
		flex-direction: column;
	}
}

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

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
