/**
 * CDU Meschede - ergaenzende Stile
 * Ausgerichtet an cdu-hsk.de / offizieller CDU-CI.
 * Leitfarbe Petrol #2d3c4b, Interaktion Tuerkis #52b7c1, Highlight Amber #ffa600.
 * Basis-Design in theme.json.
 */

/* ---------- Zugaenglichkeit ---------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--wp--preset--color--navy);
	color: #fff;
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 8px 0;
	font-weight: 700;
	text-decoration: none;
}
.skip-link:focus { left: 0; }

:where(a, button, input, select, textarea, .wp-block-navigation-item__content):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ---------- Signature: Amber-Highlight hinter Eyebrow-Labels ---------- */
.wp-block-heading.is-style-cdu-eyebrow,
.wp-block-paragraph.is-style-cdu-eyebrow,
p.is-style-cdu-eyebrow {
	display: inline-block;
	background: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.2em 0.6em;
	margin-bottom: 0.75rem;
	line-height: 1.3;
}

/* ---------- Signature: Markierungs-Box hinter Headlines (wie CDU-HSK) ---------- */
.is-style-cdu-mark {
	display: inline;
	background: rgba(255, 255, 255, 0.16);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	padding: 0.04em 0.28em;
	line-height: 1.42;
}
/* Auf hellem Grund: Petrol-Markierung mit weisser Schrift */
.has-base-background-color .is-style-cdu-mark,
.has-surface-background-color .is-style-cdu-mark {
	background: var(--wp--preset--color--navy);
	color: #fff;
}

/* ---------- Kopfbereich: zweistufig wie CDU-HSK ---------- */
/* Obere Petrol-Leiste: Titel + Claim links, Logo rechts */
.cdu-topbar {
	background: var(--wp--preset--color--navy);
}
.cdu-topbar,
.cdu-topbar .wp-block-site-title a { color: #fff; }
.cdu-topbar .wp-block-site-title a { text-decoration: none; }
.cdu-topbar .wp-block-site-title { display: inline-block; }
/* Logo-Kachel rechts (weisser Kasten) */
.cdu-logo .wp-block-site-logo img,
.cdu-logo img {
	background: #fff;
	border-radius: 8px;
	padding: 6px 10px;
}

/* Untere Navigationsleiste: weiss, klebend */
.cdu-navbar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	border-bottom: 1px solid var(--wp--preset--color--border);
	box-shadow: 0 2px 10px rgba(27,25,29,0.05);
}
.cdu-navbar .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	border-bottom: 3px solid transparent;
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}
.cdu-navbar .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.cdu-navbar .wp-block-navigation .wp-block-navigation-item__content:hover {
	border-bottom-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-dark);
}
.cdu-navbar .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--navy);
}

/* ---------- Blockstil: helle Karte ---------- */
.wp-block-group.is-style-cdu-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--wp--preset--shadow--card);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	height: 100%;
}
.wp-block-group.is-style-cdu-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--wp--preset--shadow--lift);
}

/* ---------- Blockstil: dunkle Petrol-Karte (wie CDU-HSK Sidebar) ---------- */
.wp-block-group.is-style-cdu-card-dark {
	position: relative;
	background: var(--wp--preset--color--navy);
	color: #fff;
	border-radius: 10px;
	border-left: 5px solid var(--wp--preset--color--primary);
	padding: clamp(1.4rem, 3vw, 1.9rem);
	transition: transform 0.18s ease, background 0.18s ease;
}
.wp-block-group.is-style-cdu-card-dark :where(h1,h2,h3,h4,p) { color: #fff; }
.wp-block-group.is-style-cdu-card-dark a { color: #fff; text-decoration: none; }
.wp-block-group.is-style-cdu-card-dark:hover {
	transform: translateX(4px);
	background: var(--wp--preset--color--navy-dark);
}
.wp-block-group.is-style-cdu-card-dark:hover a { color: var(--wp--preset--color--primary); }

/* ---------- Flush: keine weissen Leerbaender zwischen Baendern ---------- */
.cdu-footer { margin-top: 0 !important; }
.wp-site-blocks > header.wp-block-template-part { margin-bottom: 0 !important; }

/* ---------- Personen-/Team-Grid ---------- */
.cdu-team-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: var(--wp--preset--spacing--40);
}
.cdu-person {
	position: relative;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-top: 4px solid var(--wp--preset--color--primary);
	border-radius: 10px;
	padding: 1.5rem 1.25rem;
	text-align: center;
	box-shadow: var(--wp--preset--shadow--card);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cdu-person:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--lift); }
.cdu-person .wp-block-post-featured-image { margin: 0 auto 0.9rem; width: 104px; }
.cdu-person .wp-block-post-featured-image img {
	width: 104px; height: 104px; border-radius: 999px; object-fit: cover;
}
/* Initialen-Avatar, wenn kein Foto gesetzt ist */
.cdu-person .wp-block-post-title {
	font-size: 1.1rem; font-weight: 800; margin: 0.2rem 0 0.15rem; color: var(--wp--preset--color--navy);
}
.cdu-person .wp-block-post-title a { text-decoration: none; }
.cdu-person .cdu-person-rolle {
	color: var(--wp--preset--color--primary-dark);
	font-weight: 700; font-size: 0.9rem;
}
.cdu-avatar {
	width: 96px; height: 96px; margin: 0 auto 0.9rem;
	border-radius: 999px; display: flex; align-items: center; justify-content: center;
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 800; font-size: 2rem; line-height: 1;
}

/* ---------- Blockstil: Button Umriss ---------- */
.wp-block-button.is-style-cdu-ghost .wp-block-button__link {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8);
}
.wp-block-button.is-style-cdu-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-cdu-ghost .wp-block-button__link:focus {
	background: #fff;
	color: var(--wp--preset--color--navy);
}

/* ---------- Termin-Datumsbadge (Tuerkis) ---------- */
.cdu-datebadge {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 68px;
	padding: 0.5rem 0.75rem;
	border-radius: 10px;
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 800;
	line-height: 1.05;
	text-align: center;
}

/* ---------- News-/Beitragskarten ---------- */
.cdu-newsgrid .wp-block-post-title a { text-decoration: none; }
.cdu-newsgrid .wp-block-post-featured-image img {
	border-radius: 8px;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	width: 100%;
}
.cdu-newsgrid .wp-block-post-date {
	color: var(--wp--preset--color--primary-dark);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* ---------- Fußbereich ---------- */
.cdu-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.cdu-footer a:hover, .cdu-footer a:focus { color: #fff; text-decoration: underline; }
.cdu-footer .wp-block-social-links .wp-social-link { background: rgba(255,255,255,0.12); }

/* ---------- Kleinigkeiten ---------- */
:where(.wp-block-post-content) > * { margin-block: 1.1rem; }
.wp-block-post-featured-image img,
figure.wp-block-image img { border-radius: 10px; }
