/*
 * Caduceus Klinik: Gestaltung der Webseite. Wird auch im Editor geladen.
 *
 * Aufbau: mittige Seitenfläche (höchstens 1280px) auf ruhigem Grund. Die Inhalte bestehen
 * aus Standard-Blöcken; ihr Aussehen kommt allein aus den ck-Klassen in dieser Datei.
 */

:root {
	--ck-hell: #56c7e3;
	--ck-dunkel: #28367e;
	--ck-flaeche: #f7fcfd;
	--ck-rand: #d1eff6;
	--ck-text: #343a4a;
	--ck-grund: #e6ecef;
	--ck-weiss: #ffffff;
	--ck-fuss-text: #cfd6f3;
	--ck-knopf-text: #0e1a3d;
	--ck-schleier: rgba(12, 16, 36, .92);
	--ck-bildrand: rgba(20, 28, 70, .1);
	--ck-schatten: 0 1px 2px rgba(40, 54, 126, .05), 0 8px 24px rgba(40, 54, 126, .06);
	--ck-schrift: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--ck-seite: clamp(16px, 4vw, 40px);
}

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

body {
	margin: 0;
	background: var(--ck-grund);
	color: var(--ck-text);
	font-family: var(--ck-schrift);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--ck-dunkel); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ck-hell); outline-offset: 3px; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { color: var(--ck-dunkel); font-weight: 600; line-height: 1.2; text-wrap: balance; }
h2 { font-size: clamp(24px, 2.4vw, 30px); margin: 0 0 12px; }
h3 { font-size: 19px; line-height: 1.3; margin: 1.4em 0 .4em; }
h4 { font-size: 16px; margin: 1.2em 0 .3em; }
p { margin: 0 0 .9em; text-wrap: pretty; }
ul, ol { margin: 0 0 .9em; padding-left: 1.3em; }

.ck-sprung { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ck-dunkel); color: var(--ck-weiss); padding: 10px 16px; }
.ck-sprung:focus { left: 8px; top: 8px; }

/* ---------- Rahmen, Kopf, Menü ---------- */
.ck-rahmen { max-width: 1280px; margin: 0 auto; background: var(--ck-weiss); box-shadow: 0 6px 30px rgba(20, 28, 70, .14); overflow: clip; }
.ck-innen { padding-left: var(--ck-seite); padding-right: var(--ck-seite); }

.ck-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.ck-logo img { width: 230px; }
.ck-menue { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.ck-menue a { display: block; color: var(--ck-dunkel); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 0; border-bottom: 2px solid transparent; transition: border-color .15s ease-out; }
.ck-menue .current-menu-item > a, .ck-menue a:hover { border-color: var(--ck-hell); }
.ck-menue .ck-knopf > a { background: var(--ck-dunkel); color: var(--ck-weiss); padding: 11px 22px; border-radius: 999px; border: 0; }
.ck-menue .ck-knopf.current-menu-item > a, .ck-menue .ck-knopf > a:hover { box-shadow: 0 0 0 3px var(--ck-hell); }
.ck-burger { display: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ck-dunkel); background: var(--ck-weiss); border: 1px solid var(--ck-rand); border-radius: 8px; padding: 10px 16px; cursor: pointer; }

/* ---------- Titelbild der Startseite, Kopfband der Unterseiten ---------- */
.ck-bild { min-height: 480px; display: flex; align-items: flex-end; padding-top: clamp(28px, 5vw, 50px); padding-bottom: clamp(28px, 5vw, 50px); color: var(--ck-weiss); background: var(--ck-dunkel) center 30% / cover; }
.ck-bild h1 { color: var(--ck-weiss); font-size: clamp(27px, 3.6vw, 42px); margin: 0 0 10px; max-width: 19em; }
.ck-bild p { margin: 0 0 22px; font-size: clamp(16px, 1.5vw, 19px); }
.ck-knopf-hell { display: inline-block; background: var(--ck-hell); color: var(--ck-knopf-text); text-decoration: none; font-weight: 600; padding: 12px 26px; border-radius: 999px; }

.ck-band { min-height: 220px; display: flex; align-items: flex-end; padding-top: 28px; padding-bottom: 28px; background: var(--ck-dunkel) center / cover; }
.ck-band h1 { color: var(--ck-weiss); margin: 0; font-size: clamp(28px, 3.4vw, 40px); }

/* ---------- Inhalt ---------- */
.ck-inhalt { padding-top: clamp(34px, 5vw, 60px); padding-bottom: clamp(34px, 5vw, 60px); display: grid; gap: clamp(34px, 5vw, 60px); overflow-wrap: anywhere; }
.ck-inhalt > * { min-width: 0; }
/* Klassische Themes bekommen um Gruppeninhalte einen Zusatz-Container; er soll das Raster nicht stören. */
.wp-block-group__inner-container { display: contents; }
.wp-block-group > :last-child, .ck-halb__text > :last-child, .ck-lesetext > :last-child, .ck-karte__text > :last-child, .ck-kkarte > :last-child { margin-bottom: 0; }

/* Abschnitt: halb Text, halb Bild */
.ck-halb { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.ck-halb > * { min-width: 0; }
.ck-halb > .wp-block-image img { width: 100%; border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; outline: 1px solid var(--ck-bildrand); outline-offset: -1px; }
.ck-halb--links > .wp-block-image { order: -1; }
.ck-halb--lang { align-items: start; }
.ck-halb--lang > .wp-block-image { position: sticky; top: 24px; }
.ck-halb--band { grid-template-columns: minmax(180px, 300px) 1fr; background: var(--ck-flaeche); border: 1px solid var(--ck-rand); border-radius: 24px; padding: clamp(16px, 2.4vw, 24px); box-shadow: var(--ck-schatten); }
.ck-halb--band > .wp-block-image img { border-radius: 10px; }
.ck-halb--ohne { grid-template-columns: 1fr; }

.ck-marke { color: var(--ck-dunkel); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.ck-marke::before { content: ""; display: inline-block; width: 26px; height: 3px; background: var(--ck-hell); vertical-align: middle; margin-right: 10px; }

/* Karten der Startseite */
.ck-karten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.ck-karte { background: var(--ck-flaeche); border: 1px solid var(--ck-rand); border-radius: 14px; overflow: hidden; min-width: 0; box-shadow: var(--ck-schatten); }
.ck-karte > .wp-block-image img { height: 190px; width: 100%; object-fit: cover; }
.ck-karte__text { padding: 20px 22px 24px; font-size: 15px; }
.ck-karte__text h3 { margin-top: 0; }

/* Lesespalte und Randspalte */
.ck-lesetext { max-width: 70ch; }
.ck-lesetext > :first-child { margin-top: 0; }
.ck-lesetext h2 + p { font-size: 1.14em; line-height: 1.55; color: var(--ck-dunkel); }
.ck-zweispaltig { display: grid; grid-template-columns: minmax(0, 68ch) minmax(260px, 380px); justify-content: center; gap: clamp(28px, 6vw, 88px); align-items: start; }
.ck-rand { position: sticky; top: 24px; display: grid; gap: 18px; min-width: 0; }
.ck-rand > .wp-block-image img { width: 100%; border-radius: 14px; aspect-ratio: 4 / 3; object-fit: cover; outline: 1px solid var(--ck-bildrand); outline-offset: -1px; }
.ck-randkarte { background: var(--ck-flaeche); border: 1px solid var(--ck-rand); border-radius: 18px; padding: 16px; box-shadow: var(--ck-schatten); }
.ck-randkarte .ck-dl-titel { margin-top: 0; }
.ck-randkarte .ck-downloads a { border-radius: 8px; }

/* Listen, Hinweise, Zitate, Zeiten */
.ck-inhalt ul.wp-block-list:not(.ck-downloads), .editor-styles-wrapper ul.wp-block-list:not(.ck-downloads) { list-style: none; padding: 0; display: grid; gap: 10px; }
.ck-inhalt ul.wp-block-list:not(.ck-downloads) li, .editor-styles-wrapper ul.wp-block-list:not(.ck-downloads) li { position: relative; padding: 12px 16px 12px 44px; background: var(--ck-flaeche); border: 1px solid var(--ck-rand); border-radius: 10px; }
.ck-inhalt ul.wp-block-list:not(.ck-downloads) li::before, .editor-styles-wrapper ul.wp-block-list:not(.ck-downloads) li::before { content: ""; position: absolute; left: 16px; top: 18px; width: 14px; height: 8px; border-left: 3px solid var(--ck-hell); border-bottom: 3px solid var(--ck-hell); transform: rotate(-45deg); }
.ck-merke { background: var(--ck-flaeche); border: 1px solid var(--ck-rand); border-left: 4px solid var(--ck-hell); border-radius: 0 10px 10px 0; padding: 14px 18px; font-weight: 600; color: var(--ck-dunkel); }
.wp-block-quote { margin: 0 0 .9em; padding: 14px 18px; background: var(--ck-flaeche); border: 1px solid var(--ck-rand); border-radius: 10px; }
.wp-block-quote p { margin: 0; }
.wp-block-table { overflow-x: auto; margin: 0 0 .9em; }
.wp-block-table table { border-collapse: collapse; }
.ck-zeiten table { font-variant-numeric: tabular-nums; }
.ck-zeiten td { text-align: left; padding: 7px 0; border: 0; border-bottom: 1px solid var(--ck-rand); }
.ck-zeiten td:first-child { font-weight: 600; color: var(--ck-dunkel); padding-right: 28px; white-space: nowrap; }
.ck-zeiten tr:last-child td { border-bottom: 0; }

/* Downloads */
.ck-dl-titel { margin-top: 1.2em; }
.ck-downloads { list-style: none; padding: 0; margin: 0 0 .9em; display: grid; gap: 8px; }
.ck-downloads a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ck-weiss); border: 1px solid var(--ck-rand); border-radius: 10px; text-decoration: none; font-weight: 600; transition: border-color .15s ease-out; }
.ck-downloads a:hover { border-color: var(--ck-hell); }
.ck-downloads a::before { content: "PDF"; flex: none; font-size: 11px; letter-spacing: .06em; color: var(--ck-weiss); background: var(--ck-dunkel); border-radius: 4px; padding: 3px 6px; }

/* Kontaktkarten */
.ck-kkarten { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.ck-kkarte { background: var(--ck-flaeche); border: 1px solid var(--ck-rand); border-radius: 14px; padding: 22px 22px 24px; min-width: 0; box-shadow: var(--ck-schatten); }
.ck-kkarte .ck-marke { margin-bottom: 14px; }
.ck-kkarte p { margin-bottom: .6em; }
.ck-grosszeile { font-size: 20px; font-weight: 600; color: var(--ck-dunkel); line-height: 1.35; }
.ck-grosszeile a { text-decoration: none; white-space: nowrap; font-size: 18px; }
.ck-grosszeile a:hover { text-decoration: underline; }
.ck-leise { font-size: 14px; }
.ck-kkarte .ck-zeiten, .ck-kkarte .ck-zeiten table { width: 100%; margin: 0; }
.ck-knopfzeile a { display: inline-block; margin-top: 8px; background: var(--ck-dunkel); color: var(--ck-weiss); text-decoration: none; font-weight: 600; padding: 11px 22px; border-radius: 999px; }

/* Galerie */
.ck-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ck-galerie .wp-block-image { margin: 0; }
.ck-galerie .wp-block-image a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--ck-flaeche); outline: 1px solid var(--ck-bildrand); outline-offset: -1px; }
.ck-galerie .wp-block-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease-out; }
.ck-galerie .wp-block-image a:hover img { transform: scale(1.04); }

/* ---------- Fuß ---------- */
.ck-fuss { background: var(--ck-dunkel); color: var(--ck-fuss-text); padding-top: 34px; padding-bottom: 34px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 30px; font-size: 14px; }
.ck-fuss strong { color: var(--ck-weiss); display: block; margin-bottom: 6px; }
.ck-fussmenue { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: flex-end; list-style: none; margin: 0; padding: 0; height: 100%; }
.ck-fussmenue a { display: block; color: var(--ck-weiss); text-decoration: none; padding: 10px 0; }
.ck-fussmenue a:hover { text-decoration: underline; }

/* ---------- Großansicht der Galerie ---------- */
.ck-gross { position: fixed; inset: 0; z-index: 100; background: var(--ck-schleier); display: flex; align-items: center; justify-content: center; padding: 16px; font-size: 16px; font-weight: 400; }
.ck-gross img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.ck-gross button { position: absolute; font: inherit; font-size: 22px; line-height: 1; color: var(--ck-weiss); background: rgba(255, 255, 255, .14); border: 0; border-radius: 999px; width: 46px; height: 46px; cursor: pointer; }
.ck-gross button:hover { background: rgba(255, 255, 255, .28); }
.ck-gross__zu { top: 14px; right: 14px; }
.ck-gross__vor { right: 14px; top: 50%; margin-top: -23px; }
.ck-gross__zurueck { left: 14px; top: 50%; margin-top: -23px; }
.ck-gross__zahl { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--ck-weiss); font-size: 14px; }

/* ---------- Rückmeldung beim Drücken ---------- */
.ck-knopf-hell, .ck-knopfzeile a, .ck-menue .ck-knopf > a, .ck-burger, .ck-gross button { transition: transform .12s ease-out, box-shadow .15s ease-out, background-color .15s ease-out; }
.ck-knopf-hell:active, .ck-knopfzeile a:active, .ck-menue .ck-knopf > a:active, .ck-burger:active, .ck-gross button:active { transform: scale(.97); }
.ck-knopf-hell:hover, .ck-knopfzeile a:hover { box-shadow: 0 0 0 3px var(--ck-rand); }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 860px) {
	.ck-logo img { width: 190px; }
	.ck-burger { display: block; }
	.ck-nav { display: none; width: 100%; }
	.ck-nav.ck-offen { display: block; }
	.ck-menue { flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 6px; }
	.ck-menue .ck-knopf > a { margin-top: 6px; }
	.ck-bild { min-height: 420px; }
	.ck-band { min-height: 160px; }
	.ck-halb, .ck-halb--band { grid-template-columns: 1fr; }
	.ck-halb > .wp-block-image { order: -1; }
	.ck-halb--lang > .wp-block-image, .ck-rand { position: static; }
	.ck-karten { grid-template-columns: 1fr; }
	.ck-zweispaltig { grid-template-columns: 1fr; }
	.ck-zweispaltig > .ck-rand { order: -1; }
	.ck-zeiten, .ck-zeiten table { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
	.ck-knopf-hell:active, .ck-knopfzeile a:active, .ck-menue .ck-knopf > a:active, .ck-burger:active, .ck-gross button:active { transform: none; }
}

/* ---------- Nur im Editor ---------- */
.editor-styles-wrapper { background: var(--ck-weiss); padding: 24px; }
.editor-styles-wrapper .wp-block { max-width: 1200px; }
