/*
Theme Name: Suchet der Stadt Bestes
Description: Theme des Arbeitskreises „Suchet der Stadt Bestes“ (Neuaufbau). Ohne externe Ressourcen und ohne Cookies für Besucher.
Version: 0.1.0
Requires at least: 7.0
Requires PHP: 8.2
Text Domain: ak-sdsb
License: GPL-2.0-or-later
*/

/* ---------- Grundlagen ---------- */

:root {
	--ak-blau: var(--wp--preset--color--blau);
	--ak-nacht: var(--wp--preset--color--nachtblau);
	--ak-gold: var(--wp--preset--color--gold);
	--ak-goldtext: var(--wp--preset--color--goldtext);
	--ak-grau: var(--wp--preset--color--grau);
	--ak-linie: var(--wp--preset--color--linie);
	--ak-serif: var(--wp--preset--font-family--serif);
	--ak-radius: 10px;
}

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

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

:where(a, button, summary, input):focus-visible {
	outline: 3px solid var(--ak-gold);
	outline-offset: 2px;
	border-radius: 3px;
}

img {
	height: auto;
}

/* ---------- Kopf ---------- */

.ak-kopf {
	border-top: 4px solid var(--ak-gold);
	border-bottom: 1px solid var(--ak-linie);
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar .ak-kopf {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.ak-logo img {
	display: block;
	max-width: min(250px, 55vw);
}

.ak-nav a {
	color: var(--ak-nacht);
	text-decoration: none;
	padding: 0.3rem 0;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s, color 0.15s;
}

.ak-nav a:hover,
.ak-nav .current-menu-item > a,
.ak-nav [aria-current="page"] {
	border-bottom-color: var(--ak-gold);
	color: var(--ak-blau);
}

.ak-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--stein);
	padding: 1.5rem;
}

.ak-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1rem;
	font-size: 1.25rem;
}

/* ---------- Bausteine ---------- */

.ak-eyebrow {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ak-goldtext);
	margin-bottom: 0.25rem;
}

.ak-eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.75rem;
	height: 2px;
	background: var(--ak-gold);
	vertical-align: middle;
	margin-right: 0.6rem;
	transform: translateY(-2px);
}

.ak-lead {
	font-size: var(--wp--preset--font-size--gross);
	line-height: 1.55;
	color: var(--ak-grau);
}

.ak-meta {
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 600;
	color: var(--ak-goldtext);
	margin-bottom: 0.2rem;
}

.ak-kasten {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--ak-linie);
	border-left: 4px solid var(--ak-gold);
	border-radius: var(--ak-radius);
	padding: 1.5rem 1.75rem;
}

.ak-kasten > :first-child {
	margin-top: 0;
}

/* GiroCode neben der Bankverbindung; untereinander (Handy) nicht riesig */
.ak-spenden .wp-block-image {
	margin: 0;
	max-width: 180px;
}

.ak-spenden .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

.ak-spenden .wp-element-caption {
	margin-top: 0.25rem;
	font-size: 0.85rem;
	text-align: center;
}

.ak-karten {
	gap: 1.25rem;
}

.ak-karte {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--ak-linie);
	border-top: 3px solid var(--ak-gold);
	border-radius: var(--ak-radius);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	transition: box-shadow 0.2s, transform 0.2s;
}

.ak-karte:hover {
	box-shadow: 0 10px 30px -18px rgba(14, 42, 79, 0.45);
	transform: translateY(-2px);
}

.ak-karte > * {
	margin: 0;
}

.ak-karte h3 a {
	color: inherit;
	text-decoration: none;
}

.ak-karte h3 a::after {
	content: " →";
	color: var(--ak-gold);
}

.ak-karte .ak-extern {
	margin-top: auto;
	padding-top: 0.4rem;
}

.ak-extern a {
	font-weight: 600;
}

.ak-extern a::after {
	content: " ↗";
	text-decoration: none;
	display: inline-block;
	margin-left: 0.15em;
}

.wp-block-quote cite {
	display: block;
	margin-top: 0.5rem;
	font-family: var(--wp--preset--font-family--sans);
	font-style: normal;
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 600;
	color: var(--ak-goldtext);
}

.wp-block-image img,
.wp-block-gallery img {
	border-radius: 6px;
}

.wp-block-video video {
	width: 100%;
	max-height: 80vh;
	border-radius: 6px;
	background: #000;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--ak-blau);
}

/* ---------- Startseite ---------- */

.ak-hero {
	position: relative;
	overflow: hidden;
}

/* feines Linienmuster als Hintergrund, angelehnt an Jerusalemer Steinmauern */
.ak-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 96px 48px, 96px 48px;
	pointer-events: none;
}

.ak-hero > * {
	position: relative;
}

.ak-hero .ak-eyebrow {
	color: var(--ak-gold);
}

.ak-hero h1 {
	margin-top: 0.4rem;
}

.ak-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.7);
}

.ak-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.1);
}

.ak-hero .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	background: #fff;
	color: var(--ak-nacht);
}

.ak-hero .wp-block-image img {
	border-radius: var(--ak-radius);
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
	box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.6);
}

.ak-vers {
	font-family: var(--ak-serif);
	font-style: italic;
	font-weight: 500;
	font-size: 1.05rem;
	border-left: 3px solid var(--ak-gold);
	padding-left: 1rem;
	margin-top: 1.25rem;
	opacity: 0.92;
}

.ak-vers span {
	display: block;
	font-family: var(--wp--preset--font-family--sans);
	font-style: normal;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--ak-gold);
	margin-top: 0.2rem;
}

.ak-presse {
	gap: 1.25rem;
}

.ak-presse figure {
	flex: 0 0 auto;
	margin: 0;
}

.ak-presse img {
	box-shadow: 0 8px 22px -12px rgba(14, 42, 79, 0.5);
	border-radius: 3px;
}

.ak-presse h3 {
	margin: 0.1rem 0 0.4rem;
}

.ak-presse p {
	margin: 0 0 0.5rem;
}

/* ---------- Seiten ---------- */

.ak-seitenkopf {
	border-bottom: 1px solid var(--ak-linie);
}

.ak-seitenkopf .wp-block-post-title::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 3px;
	background: var(--ak-gold);
	margin-top: 1rem;
}

.ak-seitenkopf .wp-block-post-excerpt {
	margin-top: 1rem;
}

.ak-seitenkopf .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.wp-block-post-content > h2.wp-block-heading {
	margin-top: var(--wp--preset--spacing--40);
}

/* Termine */
.ak-termin {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--ak-linie);
	border-radius: var(--ak-radius);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.ak-termin + .ak-termin {
	margin-top: var(--wp--preset--spacing--30);
}

.ak-termin h2 {
	margin-top: 0.2rem;
	font-size: clamp(1.4rem, 3vw, 1.75rem);
}

/* Archiv als Zeitleiste */
.ak-jahr {
	display: flex;
	align-items: center;
	gap: 1rem;
	color: var(--ak-goldtext);
}

.ak-jahr::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--ak-linie);
}

.ak-eintrag {
	position: relative;
	padding-left: 1.75rem;
	padding-bottom: var(--wp--preset--spacing--30);
	border-left: 2px solid var(--ak-linie);
	margin-left: 0.4rem;
}

.ak-eintrag::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 0.45rem;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--ak-gold);
	box-shadow: 0 0 0 4px var(--wp--preset--color--stein);
}

.ak-eintrag + .ak-eintrag {
	margin-top: 0;
}

.ak-eintrag > h3 {
	margin-top: 0.1rem;
}

.ak-eintrag .wp-block-image:not(.wp-block-gallery .wp-block-image) {
	max-width: 420px;
}

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

.ak-fuss a {
	color: #fff;
	text-decoration-color: rgba(217, 166, 58, 0.7);
}

.ak-fuss a:hover {
	color: var(--ak-gold);
}

.ak-fuss p {
	color: rgba(255, 255, 255, 0.85);
	font-size: 1rem;
}

.ak-fuss-titel {
	font-family: var(--ak-serif);
	font-size: 1.5rem !important;
	font-weight: 600;
	color: #fff !important;
	margin-bottom: 0.4rem;
}

.ak-fuss-kopf {
	font-size: 0.8rem !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ak-gold) !important;
	margin-bottom: 0.4rem;
}

.ak-fuss-vers {
	margin-top: var(--wp--preset--spacing--40) !important;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-family: var(--ak-serif);
	font-style: italic;
	font-size: 0.95rem !important;
	color: rgba(255, 255, 255, 0.65) !important;
}

/* ---------- Klein ---------- */

@media (max-width: 781px) {
	.ak-hero .wp-block-columns {
		gap: 2rem;
	}

	.ak-presse {
		flex-wrap: wrap !important;
	}

	.ak-presse img {
		width: 96px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}

.ak-plakat img {
	max-height: 440px;
	width: auto;
	margin-inline: auto;
	box-shadow: 0 10px 28px -16px rgba(14, 42, 79, 0.55);
}

.ak-eintrag .wp-block-video video {
	max-width: 420px;
	max-height: 70vh;
}

/* ---------- Newsletter (Plugin "newsletter") ---------- */

.tnp-subscription form,
.tnp form {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	max-width: 30rem;
}

.tnp-field label {
	display: block;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--klein);
	margin-bottom: 0.3rem;
}

body .tnp-subscription input.tnp-email {
	width: 100%;
	font: inherit;
	padding: 0.75rem 1rem;
	border: 1px solid var(--ak-linie);
	border-radius: 8px;
	background: #fff;
	color: var(--wp--preset--color--tinte);
}

.tnp-privacy-field label {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-weight: 400;
}

.tnp-privacy-field input {
	margin-top: 0.3rem;
	accent-color: var(--ak-gold);
}

.tnp-field-button {
	text-align: left !important;
}

body .tnp-subscription input.tnp-submit {
	font: inherit;
	font-weight: 600;
	font-size: 1rem;
	border: 0;
	border-radius: 999px;
	padding: 0.8rem 1.75rem;
	cursor: pointer;
	background: var(--ak-blau);
	color: #fff;
}

body .tnp-subscription input.tnp-submit:hover {
	background: var(--ak-nacht);
}

.ak-newsletter .tnp-field label,
.ak-newsletter .tnp-privacy-field a {
	color: #fff;
}

body .ak-newsletter .tnp-subscription input.tnp-email {
	border-color: transparent;
}

body .ak-newsletter .tnp-subscription input.tnp-submit {
	background: var(--ak-gold);
	color: var(--ak-nacht);
}

body .ak-newsletter .tnp-subscription input.tnp-submit:hover {
	background: #fff;
}

.ak-newsletter .ak-eyebrow {
	color: var(--ak-gold);
}
