/*
Theme Name: DVKZWI Wiesbaden
Author: Silicortex — Mohamad Katramez
Author URI: https://www.silicortex.de/
Description: Block-Theme für das Demokratische Volks- und Kulturzentrum Wiesbaden e. V. — flache Farbflächen, geometrische Typografie und Bogenformen aus dem Logo.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
License: Proprietary — All rights reserved
License URI: https://www.silicortex.de/
Text Domain: dvkzwi

Copyright (c) 2026 Silicortex (https://www.silicortex.de/) und Mohamad Katramez.
Alle Rechte vorbehalten. Siehe LICENSE im Projektstammverzeichnis.
*/

:root {
	--dvkzwi-arc: 2.5rem;
	--dvkzwi-blue: #2515aa;
	--dvkzwi-flamingo: #ed532f;
	/* Flamingo darkened for small text: #ed532f is only 3.2:1 on the grey
	   surface — this tone reaches 4.6:1+ (WCAG AA) on surface and white. */
	--dvkzwi-flamingo-text: #c93813;
	--dvkzwi-orange: #f9ad26;
	--dvkzwi-ink: #231f20;
}

::selection {
	background: var(--dvkzwi-orange);
	color: var(--dvkzwi-ink);
}

/* ---------- Focus & skip link ---------- */

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

.dvkzwi-on-primary :where(a, button):focus-visible {
	outline-color: var(--dvkzwi-orange);
}

.skip-link.screen-reader-text:focus {
	background: var(--dvkzwi-blue);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	padding: 0.75rem 1.5rem;
	border-radius: 999px;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
}

/* ---------- Arc geometry (from the logo) ---------- */

.dvkzwi-arc-img img,
.dvkzwi-arc-img {
	border-radius: 0 var(--dvkzwi-arc) 0 var(--dvkzwi-arc);
	overflow: hidden;
}

.dvkzwi-card {
	background: #fff;
	border-top: 4px solid var(--dvkzwi-flamingo);
	border-radius: 0 var(--dvkzwi-arc) 0 0;
	transition: transform 0.2s ease, border-color 0.2s ease;
	height: 100%;
}

.dvkzwi-card:hover,
.dvkzwi-card:focus-within {
	transform: translateY(-4px);
	border-top-color: var(--dvkzwi-blue);
}

.dvkzwi-card .wp-block-post-title a,
.dvkzwi-card h3 a {
	text-decoration: none;
}

.dvkzwi-card .wp-block-post-title a:hover,
.dvkzwi-card h3 a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ---------- News (editorial) teasers — deliberately unlike the event cards:
   no box, mirrored arc on the image, date as orange pill ---------- */

.dvkzwi-news-card {
	height: 100%;
	border-top: 4px solid var(--dvkzwi-blue);
	padding-top: 1rem;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Mirror of the event cards: they flip flamingo → blue, news flips blue → flamingo */
.dvkzwi-news-card:hover,
.dvkzwi-news-card:focus-within {
	transform: translateY(-4px);
	border-top-color: var(--dvkzwi-flamingo);
}

.dvkzwi-arc-img-flip img,
.dvkzwi-arc-img-flip {
	border-radius: var(--dvkzwi-arc) 0 var(--dvkzwi-arc) 0;
	overflow: hidden;
}

.dvkzwi-news-card .wp-block-post-title a {
	text-decoration: none;
}

.dvkzwi-news-card .wp-block-post-title a:hover {
	color: var(--dvkzwi-blue);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--dvkzwi-flamingo);
}

/* ---------- Eyebrow / overline labels ---------- */

.dvkzwi-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--dvkzwi-flamingo-text);
}

.dvkzwi-on-primary .dvkzwi-eyebrow {
	color: var(--dvkzwi-orange);
}

/* ---------- Hero with oversized logo mark ---------- */

.dvkzwi-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.dvkzwi-hero-mark {
	position: absolute;
	z-index: -1;
	right: -8%;
	bottom: -30%;
	width: clamp(320px, 42vw, 640px);
	opacity: 0.12;
	pointer-events: none;
}

.dvkzwi-hero-mark img {
	width: 100%;
	height: auto;
}

@media (max-width: 781px) {
	.dvkzwi-hero-mark {
		right: -30%;
		bottom: -18%;
	}
}

/* ---------- Hero carousel ---------- */

.dvkzwi-carousel-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.dvkzwi-carousel-track::-webkit-scrollbar {
	display: none;
}

.dvkzwi-carousel-slide {
	flex: 0 0 100%;
	min-width: 100%;
	box-sizing: border-box;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

/* Keep slide content clear of the edge arrows */
@media (min-width: 782px) {
	.dvkzwi-carousel-slide {
		padding-left: 4.5rem;
		padding-right: 4.5rem;
	}
}

/* Controls appear only once the script is ready; without JS the track
   stays swipe-/scrollbar and shows the first slide. */
.dvkzwi-carousel-controls {
	display: none;
}

/* Controls overlay the whole band: arrows sit mid-height at the edges,
   the dots sit centered at the bottom. */
.dvkzwi-carousel.is-ready .dvkzwi-carousel-controls {
	display: block;
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.dvkzwi-carousel-arrow {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.dvkzwi-carousel-arrow[data-dvkzwi-dir="-1"] {
	left: 0.5rem;
}

.dvkzwi-carousel-arrow[data-dvkzwi-dir="1"] {
	right: 0.5rem;
}

.dvkzwi-carousel-arrow:hover {
	background: rgba(255, 255, 255, 0.18);
}

.dvkzwi-carousel-arrow svg {
	width: 26px;
	height: 26px;
}

.dvkzwi-carousel-dots {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 1.25rem;
}

/* On small screens the mid-height arrows would sit on top of the text —
   drop them down next to the dots instead. */
@media (max-width: 781px) {
	.dvkzwi-carousel-arrow {
		top: auto;
		bottom: 0.65rem;
		transform: none;
	}
	.dvkzwi-carousel-arrow[data-dvkzwi-dir="-1"] {
		left: 0.75rem;
	}
	.dvkzwi-carousel-arrow[data-dvkzwi-dir="1"] {
		right: 0.75rem;
	}
	.dvkzwi-carousel-dots {
		bottom: 1.75rem;
	}
}

.dvkzwi-carousel-dot {
	width: 0.75rem;
	height: 0.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.2s ease;
}

.dvkzwi-carousel-dot:hover {
	background: #fff;
}

/* Active dot stretches into the pill shape — same arc language as buttons */
.dvkzwi-carousel-dot[aria-current="true"] {
	width: 2rem;
	background: var(--dvkzwi-orange);
}

.dvkzwi-carousel-pause {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin-left: 0.35rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.dvkzwi-carousel-pause:hover {
	background: rgba(255, 255, 255, 0.18);
}

.dvkzwi-carousel-pause .dvkzwi-ico-play,
.dvkzwi-carousel-pause[aria-pressed="true"] .dvkzwi-ico-pause {
	display: none;
}

.dvkzwi-carousel-pause[aria-pressed="true"] .dvkzwi-ico-play {
	display: block;
}

/* Staggered entrance — flat, restrained, motion-safe */
@media (prefers-reduced-motion: no-preference) {
	.dvkzwi-hero .dvkzwi-rise {
		animation: dvkzwi-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	}
	.dvkzwi-hero .dvkzwi-rise:nth-child(2) { animation-delay: 0.1s; }
	.dvkzwi-hero .dvkzwi-rise:nth-child(3) { animation-delay: 0.2s; }
	.dvkzwi-hero .dvkzwi-rise:nth-child(4) { animation-delay: 0.3s; }
}

@keyframes dvkzwi-rise {
	from { opacity: 0; transform: translateY(1.25rem); }
	to   { opacity: 1; transform: none; }
}

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

.dvkzwi-header {
	border-bottom: 1px solid #e4e2e2;
	background: #fff;
}

.dvkzwi-header .wp-block-navigation a {
	text-decoration: none;
}

.dvkzwi-header .wp-block-navigation a:hover,
.dvkzwi-header .wp-block-navigation a[aria-current="page"] {
	color: var(--dvkzwi-blue);
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--dvkzwi-flamingo);
}

.dvkzwi-logo img {
	height: 56px;
	width: auto;
}

@media (max-width: 781px) {
	.dvkzwi-logo img { height: 44px; }
}

/* ---------- Buttons ---------- */

.wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Outline style on light surfaces */
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--dvkzwi-ink);
	color: var(--dvkzwi-ink);
	background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus {
	background: var(--dvkzwi-ink);
	color: #fff;
}

/* Inverse styles for use on Fantasy Blue surfaces */
.dvkzwi-on-primary .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: #fff;
	color: #fff;
}

.dvkzwi-on-primary .wp-block-button.is-style-outline .wp-block-button__link:hover,
.dvkzwi-on-primary .wp-block-button.is-style-outline .wp-block-button__link:focus {
	background: #fff;
	color: var(--dvkzwi-blue);
}

.dvkzwi-on-primary a {
	color: #fff;
}

.dvkzwi-on-primary a:hover {
	color: var(--dvkzwi-orange);
}

/* The white link color above must not bleed into filled buttons:
   white on the accent orange is 1.9:1 — keep the ink text there. */
.dvkzwi-on-primary .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	color: var(--dvkzwi-ink);
}

.dvkzwi-on-primary .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.dvkzwi-on-primary .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus {
	color: var(--wp--preset--color--base, #fff);
}

/* Global heading color must not override light text on blue bands */
.dvkzwi-on-primary :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
}

/* Long German compounds: hyphenate instead of overflowing */
:is(h1, h2, h3, h4, h5, h6),
.wp-block-post-title {
	overflow-wrap: break-word;
	hyphens: auto;
	-webkit-hyphens: auto;
}

/* ---------- Partner logos ---------- */

/* Endless logo marquee: the strip is repeated in identical sets and shifted
   by exactly one set width per loop, so it never visibly restarts. Uniform
   margin-right (not gap) keeps the loop period an exact fraction. */
.dvkzwi-partners-marquee {
	overflow: hidden;
}

.dvkzwi-partners {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	width: max-content;
	animation: dvkzwi-marquee var(--dvkzwi-marquee-duration, 30s) linear infinite;
}

.dvkzwi-partner {
	margin-right: 4rem;
}

@keyframes dvkzwi-marquee {
	to {
		transform: translateX(calc(-100% / var(--dvkzwi-marquee-sets, 2)));
	}
}

/* Hovering or keyboard focus holds the strip still */
.dvkzwi-partners-marquee:hover .dvkzwi-partners,
.dvkzwi-partners-marquee:focus-within .dvkzwi-partners {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.dvkzwi-partners {
		animation: none;
		width: auto;
		flex-wrap: wrap;
		gap: 2.5rem 0;
	}
	.dvkzwi-partner-copy {
		display: none;
	}
}

/* Plain logo + name, no box — the logo itself is the tile */
.dvkzwi-partner a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	color: var(--dvkzwi-ink);
	text-decoration: none;
	transition: transform 0.2s ease;
}

.dvkzwi-partner a:hover {
	transform: translateY(-3px);
}

.dvkzwi-partner a:hover .dvkzwi-partner-name {
	color: var(--dvkzwi-blue);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.dvkzwi-partner-logo img {
	display: block;
	height: 64px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
}

.dvkzwi-partner-name {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.9375rem;
	font-weight: 600;
	text-align: center;
}

/* Utility for text that only screen readers should get (skip link uses it too) */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

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

.dvkzwi-footer {
	border-top: 6px solid var(--dvkzwi-orange);
}

.dvkzwi-footer .wp-block-navigation a {
	text-decoration: none;
}

.dvkzwi-footer .wp-block-navigation a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.dvkzwi-footer ul {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}

.dvkzwi-footer-logo img {
	height: 64px;
	width: auto;
}

/* ---------- Breadcrumb ---------- */

.dvkzwi-breadcrumb {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 500;
}

.dvkzwi-breadcrumb ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.dvkzwi-breadcrumb li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.dvkzwi-breadcrumb li + li::before {
	content: "›";
	opacity: 0.6;
}

.dvkzwi-breadcrumb a {
	text-decoration: none;
}

.dvkzwi-breadcrumb a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dvkzwi-breadcrumb [aria-current="page"] {
	font-weight: 600;
}

/* ---------- Content niceties ---------- */

.entry-content a,
.wp-block-post-content a {
	text-underline-offset: 3px;
	text-decoration-thickness: 1.5px;
}

.wp-block-post-content h2,
.wp-block-post-content h3 {
	margin-top: 2.5rem;
}

.dvkzwi-meta {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--dvkzwi-blue);
}

.dvkzwi-tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 0.2rem 0.9rem;
	border-radius: 999px;
	background: var(--dvkzwi-orange);
	color: var(--dvkzwi-ink);
}

/* Post categories as pills */
.dvkzwi-pill-terms a {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 0.2rem 0.9rem;
	border-radius: 999px;
	background: var(--dvkzwi-orange);
	color: var(--dvkzwi-ink);
	text-decoration: none;
}

.dvkzwi-pill-terms a:hover {
	background: var(--dvkzwi-ink);
	color: #fff;
}

/* Pagination */
.wp-block-query-pagination a {
	text-decoration: none;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}

.wp-block-query-pagination a:hover {
	color: var(--dvkzwi-flamingo);
}
