/*
Theme Name: CSD Halle
Theme URI: https://www.csdhalle.de/2026/
Author: CSD Halle (Saale)
Description: Barrierearmes Block-Theme für den CSD Halle (Saale), entwickelt für WordPress 6.8 und neuer.
Version: 1.0.9
Requires at least: 6.8
Requires PHP: 8.1
Text Domain: csd-halle
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

@font-face {
	font-family: "Atkinson Hyperlegible Next";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Atkinson Hyperlegible Next";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Atkinson Hyperlegible Next";
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url("assets/fonts/atkinson-hyperlegible-next-latin-800-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url("assets/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2");
}

:root {
	--csd-blue: #0a4179;
	--csd-blue-dark: #082a4f;
	--csd-green: #00a950;
	--csd-orange: #fbab1c;
	--csd-red: #ed1c24;
	--csd-red-dark: #d3151c;
	--csd-white: #ffffff;
	--csd-light: #f4f7fa;
	--csd-border: #d7e0e8;
	--csd-shadow: 0 18px 50px rgba(8, 42, 79, 0.12);
}

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: hidden;
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 0.08em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 4px solid var(--csd-orange);
	outline-offset: 4px;
}

.wp-site-blocks {
	min-height: 100vh;
}

.csd-skip-link {
	position: absolute;
	left: 1rem;
	top: -10rem;
	z-index: 9999;
	padding: 0.75rem 1rem;
	background: var(--csd-white);
	color: var(--csd-blue-dark);
	font-weight: 700;
}

.csd-skip-link:focus {
	top: 1rem;
}

.csd-announcement {
	font-size: clamp(0.82rem, 1.4vw, 0.95rem);
}

.csd-header {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 5px 24px rgba(8, 42, 79, 0.08);
}

.csd-wordmark {
	text-decoration: none;
}

.csd-wordmark strong {
	display: block;
	letter-spacing: -0.04em;
	line-height: 0.95;
}

.csd-wordmark small {
	display: block;
	margin-top: 0.25rem;
	color: var(--csd-blue);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.csd-main-nav a {
	text-decoration: none;
	font-size: clamp(0.88rem, 1.05vw, 1rem);
	font-weight: 700;
}

.csd-main-nav .wp-block-navigation__container {
	gap: clamp(0.7rem, 1.35vw, 1.35rem);
}

.csd-main-nav a:hover,
.csd-main-nav a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--csd-red);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.35em;
}

.wp-block-button__link {
	transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(8, 42, 79, 0.18);
}

.csd-section {
	padding-top: clamp(4rem, 8vw, 7rem);
	padding-bottom: clamp(4rem, 8vw, 7rem);
}

.csd-section-heading {
	max-width: 880px;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.csd-eyebrow {
	margin-bottom: 0.65rem;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.csd-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: min(780px, 82vh);
}

.csd-hero::before,
.csd-hero::after {
	position: absolute;
	z-index: -1;
	content: "";
	transform: rotate(-8deg);
}

.csd-hero::before {
	right: -8%;
	top: 8%;
	width: min(36vw, 520px);
	height: min(36vw, 520px);
	background: var(--csd-orange);
	border-radius: 48px;
}

.csd-hero::after {
	right: 17%;
	bottom: -22%;
	width: min(28vw, 400px);
	height: min(28vw, 400px);
	background: var(--csd-green);
	border-radius: 50%;
}

.csd-hero-title {
	max-width: 14ch;
	font-size: clamp(3.2rem, 8vw, 7.6rem) !important;
	letter-spacing: 0.02em;
	line-height: 0.92 !important;
	text-wrap: balance;
}

.csd-hero-copy {
	max-width: 670px;
	font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.csd-hero-date {
	display: inline-block;
	padding: 0.55rem 0.85rem;
	background: var(--csd-orange);
	color: var(--csd-blue-dark);
	font-size: clamp(1rem, 2vw, 1.25rem);
	font-weight: 800;
	letter-spacing: 0.02em;
	transform: rotate(-1deg);
}

.csd-hero-visual {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 0;
	min-width: 0;
}

.csd-hero-visual::after {
	display: none;
}

/*
 * Halle (Saale) skyline
 *
 * The bundled SVG is used as a decorative mask. This keeps the original
 * vector detail while allowing every section to use a calm, accessible
 * tone-on-tone colour. The skyline never receives pointer events and carries
 * no semantic content; headings and links remain above it.
 */
.csd-hero > .wp-block-columns,
.has-csd-dunkelblau-background-color.csd-section,
.csd-page-hero,
.csd-feature-panel,
.csd-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

/*
 * Keep the wide hero columns inside the actual viewport. WordPress wide
 * alignments and the global root padding otherwise add up in some themes or
 * migrated installations and can push the artwork beyond the right edge.
 */
.csd-hero > .wp-block-columns {
	box-sizing: border-box;
	width: min(100%, var(--wp--style--global--wide-size, 1280px));
	max-width: calc(100vw - 2 * clamp(1.1rem, 4vw, 2.2rem));
	margin-inline: auto !important;
}

@media (min-width: 901px) {
	.csd-hero > .wp-block-columns {
		display: grid !important;
		grid-template-columns: minmax(0, 58fr) minmax(280px, 42fr);
	}

	.csd-hero > .wp-block-columns > .wp-block-column {
		min-width: 0;
		width: auto;
	}
}

.csd-hero > .wp-block-columns::before,
.has-csd-dunkelblau-background-color.csd-section::before,
.csd-page-hero::after,
.csd-feature-panel::after,
.csd-footer::before {
	position: absolute;
	z-index: -1;
	content: "";
	pointer-events: none;
	-webkit-mask-image: url("assets/images/halle-silhouette.svg");
	mask-image: url("assets/images/halle-silhouette.svg");
	-webkit-mask-position: center bottom;
	mask-position: center bottom;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/*
 * Large, pale-blue skyline across the blue text panel of the start-page hero.
 * Its height fills most of the panel; the outer ends may be softly cropped so
 * the city landmarks remain large enough to work as a true watermark.
 */
.csd-hero > .wp-block-columns::before {
	left: 0;
	top: 0;
	bottom: 0;
	width: 60%;
	height: 100%;
	background-color: #8db1d5;
	opacity: 0.12;
	-webkit-mask-position: center 58%;
	mask-position: center 58%;
	-webkit-mask-size: auto 82%;
	mask-size: auto 82%;
}

/* Repeated identification mark in the dark-blue content bands. */
.has-csd-dunkelblau-background-color.csd-section::before {
	right: -4%;
	bottom: -1rem;
	width: min(66rem, 76%);
	height: 44%;
	background-color: #8db1d5;
	opacity: 0.12;
}

/* Dark-blue skyline on the light title area of every subpage. */
.csd-page-hero::after {
	right: -3%;
	bottom: 0;
	width: min(54rem, 68%);
	height: 72%;
	background-color: var(--csd-blue);
	opacity: 0.075;
}

/* White watermarks in the red and green event panels. */
.csd-feature-panel::after {
	right: -12%;
	bottom: 0;
	z-index: 1;
	width: 112%;
	height: 47%;
	background-color: var(--csd-white);
	opacity: 0.13;
}

.csd-feature-panel .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

/* Wide closing skyline in the footer, in a related blue tone. */
.csd-footer::before {
	right: -3%;
	bottom: 0;
	width: min(72rem, 82%);
	height: 34%;
	background-color: #5f8fbd;
	opacity: 0.14;
}

.csd-hero > .wp-block-columns > *,
.has-csd-dunkelblau-background-color.csd-section > *,
.csd-page-hero > *,
.csd-footer > * {
	position: relative;
	z-index: 1;
}

.csd-annual-artwork {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: clamp(0.7rem, 1.6vw, 1.15rem);
}

.csd-annual-artwork img {
	display: block;
	box-sizing: border-box;
	width: auto;
	max-width: calc(100% - 0.75rem);
	height: auto;
	max-height: 650px;
	border: 5px solid var(--csd-white);
	border-radius: 8px;
	box-shadow: var(--csd-shadow);
	transform: rotate(2deg);
	transform-origin: center;
}

.csd-card-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	align-items: stretch;
	gap: clamp(1.25rem, 2.5vw, 2rem) !important;
}

/* Embedded Pride Weeks programme (The Events Calendar, free edition). */
.csd-pride-calendar {
	margin-block: clamp(3rem, 7vw, 6rem);
}

.csd-pride-calendar__intro {
	max-width: 52rem;
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.csd-pride-calendar__intro h2 {
	margin-block: 0.25rem 0.65rem;
	font-size: clamp(2.6rem, 6vw, 4.8rem);
}

.csd-pride-calendar__days {
	display: grid;
	gap: clamp(1.5rem, 4vw, 2.75rem);
}

.csd-calendar-day {
	display: grid;
	grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
	gap: clamp(1.25rem, 4vw, 3rem);
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--csd-light);
	border: 1px solid var(--csd-border);
	border-radius: 18px;
}

.csd-calendar-day__date {
	align-self: start;
	display: grid;
	padding: 1.25rem;
	background: var(--csd-orange);
	color: var(--csd-blue-dark);
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(8, 42, 79, 0.12);
}

.csd-calendar-day__weekday {
	font-size: 0.86rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.csd-calendar-day__number {
	font-family: "Barlow Condensed", sans-serif;
	font-size: clamp(3.2rem, 6vw, 5.4rem);
	font-weight: 800;
	line-height: 0.9;
}

.csd-calendar-day__month {
	font-size: 1.1rem;
	font-weight: 700;
}

.csd-calendar-day__events {
	display: grid;
	gap: 1rem;
}

.csd-calendar-event {
	padding: clamp(1.35rem, 3vw, 2rem);
	background: var(--csd-white);
	border-left: 6px solid var(--csd-green);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(8, 42, 79, 0.08);
}

.csd-calendar-event h3 {
	margin-block: 0.5rem 0.75rem;
	font-size: clamp(1.55rem, 3vw, 2.15rem);
	line-height: 1.08;
}

.csd-calendar-event h3 a {
	color: var(--csd-blue-dark);
	text-decoration: none;
}

.csd-calendar-event h3 a:hover {
	text-decoration: underline;
	text-decoration-color: var(--csd-red);
}

.csd-calendar-event__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
	color: var(--csd-blue);
	font-weight: 700;
}

.csd-calendar-event__venue::before {
	content: "Ort: ";
	font-weight: 400;
}

.csd-calendar-event__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.8rem;
}

.csd-calendar-event__categories span {
	padding: 0.25rem 0.65rem;
	background: #e2edf6;
	color: var(--csd-blue-dark);
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
}

.csd-calendar-event__link {
	margin-bottom: 0;
	font-weight: 800;
}

.csd-calendar-notice {
	margin-block: 2.5rem;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: #fff4da;
	color: var(--csd-blue-dark);
	border-left: 7px solid var(--csd-orange);
	border-radius: 10px;
}

@media (max-width: 720px) {
	.csd-calendar-day {
		grid-template-columns: 1fr;
	}

	.csd-calendar-day__date {
		grid-template-columns: auto auto 1fr;
		align-items: baseline;
		gap: 0.5rem;
	}

	.csd-calendar-day__number {
		font-size: 3rem;
	}
}

.csd-card-grid > .wp-block-column {
	min-width: 0;
	width: 100%;
	margin: 0;
}

.csd-card {
	height: 100%;
	min-height: 16rem;
	padding: clamp(1.75rem, 3vw, 2.4rem);
	border: 1px solid var(--csd-border);
	border-radius: 8px;
	background: var(--csd-white);
	box-shadow: 0 8px 30px rgba(8, 42, 79, 0.07);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.csd-card h3 {
	margin-top: 0;
	font-size: clamp(1.45rem, 2.4vw, 1.85rem);
	line-height: 1.05;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: auto;
}

.csd-card p {
	font-size: 1.05rem;
	line-height: 1.58;
}

.csd-card:hover {
	border-color: rgba(10, 65, 121, 0.28);
	box-shadow: 0 16px 42px rgba(8, 42, 79, 0.13);
	transform: translateY(-3px);
}

.csd-card a:last-child {
	font-weight: 800;
}

.csd-term-card {
	position: relative;
	overflow: hidden;
	min-height: 250px;
	border-radius: 8px;
}

.csd-term-card::after {
	position: absolute;
	right: -2rem;
	bottom: -2rem;
	width: 8rem;
	height: 8rem;
	border: 1.4rem solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	content: "";
}

.csd-term-card a {
	position: relative;
	z-index: 1;
}

.csd-action-card {
	position: relative;
	overflow: hidden;
}

.csd-action-card::before {
	display: block;
	width: 4rem;
	height: 0.45rem;
	margin-bottom: 1.65rem;
	border-radius: 999px;
	background: var(--csd-green);
	content: "";
}

.csd-action-card.is-orange::before {
	background: var(--csd-orange);
}

.csd-action-card.is-red::before {
	background: var(--csd-red);
}

.csd-quote {
	border-left: 10px solid var(--csd-red);
}

.csd-feature-panel {
	min-height: 390px;
}

.csd-feature-panel .wp-block-cover__inner-container {
	display: flex;
	height: 100%;
	flex-direction: column;
	justify-content: flex-end;
}

.csd-post-card {
	height: 100%;
	border: 1px solid var(--csd-border);
	border-radius: 8px;
	background: var(--csd-white);
	overflow: hidden;
}

.csd-post-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.csd-post-card-body {
	padding: 1.5rem;
}

.csd-logo-placeholder {
	display: flex;
	min-height: 120px;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	border: 2px dashed var(--csd-border);
	border-radius: 8px;
	color: var(--csd-blue);
	font-weight: 800;
	text-align: center;
}

.csd-page-hero {
	padding-top: clamp(4rem, 7vw, 6rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.csd-page-content > * {
	margin-block-start: 1.4rem;
}

.csd-page-content > h2 {
	margin-block-start: 3rem;
}

.csd-callout {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	border-left: 8px solid var(--csd-orange);
	background: var(--csd-light);
}

.csd-editor-note {
	padding: 1rem 1.2rem;
	border: 2px dashed var(--csd-orange);
	background: #fff8e8;
	color: var(--csd-blue-dark);
	font-weight: 700;
}

.csd-footer a {
	color: inherit;
}

.csd-footer-nav {
	list-style: none;
	padding: 0;
}

.csd-footer-nav li {
	margin-bottom: 0.55rem;
}

@media (max-width: 1180px) {
	.csd-header-cta {
		display: none;
	}
}

@media (max-width: 900px) {
	.csd-main-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}

	.csd-main-nav .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}

	.csd-hero {
		min-height: auto;
	}

	.csd-hero::before {
		right: -22%;
		top: 28%;
		width: 70vw;
		height: 70vw;
	}

	.csd-hero::after {
		right: 48%;
		bottom: -5%;
		width: 46vw;
		height: 46vw;
	}

	.csd-hero > .wp-block-columns::before {
		inset: 0;
		width: 100%;
		height: 100%;
		opacity: 0.11;
		-webkit-mask-position: center 68%;
		mask-position: center 68%;
		-webkit-mask-size: auto 66%;
		mask-size: auto 66%;
	}

	.has-csd-dunkelblau-background-color.csd-section::before,
	.csd-page-hero::after,
	.csd-footer::before {
		right: -28%;
		width: 145%;
	}

	.csd-annual-artwork img {
		max-height: 620px;
	}

	.csd-hero > .wp-block-columns {
		max-width: calc(100vw - 2 * clamp(1.1rem, 4vw, 2.2rem));
	}
}

@media (max-width: 600px) {
	.csd-section {
		padding-top: 3.5rem;
		padding-bottom: 3.5rem;
	}

	.csd-hero-title {
		font-size: clamp(2.9rem, 17vw, 4.6rem) !important;
		letter-spacing: 0.015em;
	}

	.csd-annual-artwork img {
		max-height: none;
		max-width: calc(100% - 0.5rem);
		border-width: 4px;
		transform: rotate(1.5deg);
	}

	.csd-announcement .wp-block-buttons {
		display: none;
	}

	.csd-card {
		min-height: 0;
	}
}

@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;
	}
}

@media print {
	.csd-announcement,
	.csd-main-nav,
	.csd-header-cta,
	.csd-footer {
		display: none !important;
	}

	.csd-header {
		position: static;
		box-shadow: none;
	}
}
