/* ==========================================================================
   Christiane Witt Consulting 2026 – ergänzendes CSS
   Farben, Schriften, Abstände stehen in theme.json. Hier nur, was dort
   nicht geht. Bitte kein „Zusätzliches CSS“ im Customizer mehr nutzen.
   ========================================================================== */

/* ---------- Kein Spalt zwischen Kopf, Inhalt und Fuß ---------- */
.wp-site-blocks > * { margin-block-start: 0; }

/* ---------- Kopfbereich bleibt oben stehen ---------- */
.cwc-kopf {
	position: sticky;
	top: 0;
	z-index: 100;
}
.admin-bar .cwc-kopf { top: var(--wp-admin--admin-bar--height, 0); }

/* Logo: Zeichen „CW“ als Bild, darunter Name und Zusatz als echte Schrift.
   Das Zeichen ist etwas kleiner als früher, die Schrift größer und lesbar. */
.cwc-logo {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: #524F4E;
}
.cwc-logo img { height: 46px; width: auto; display: block; }
.cwc-logo-text {
	display: grid;
	justify-items: center;
	font-family: var(--wp--preset--font-family--montserrat);
	text-transform: uppercase;
	line-height: 1.15;
	margin-top: 0.35rem;
}
.cwc-logo-text > span { white-space: nowrap; }
.cwc-logo-name {
	position: relative;
	font-size: 14px; font-weight: 600; letter-spacing: 0.2em; margin-right: -0.2em;
	padding-bottom: 0.3rem;
}
/* feine Linie zwischen Name und Zusatz, wie im Original-Logo */
.cwc-logo-name::after {
	content: ""; position: absolute; left: 5%; right: calc(5% + 0.2em); bottom: 0;
	border-bottom: 1px solid currentColor;
}
.cwc-logo-zusatz { font-size: 9.5px; font-weight: 500; letter-spacing: 0.13em; margin-right: -0.13em; margin-top: 0.3rem; }
/* Kontakt im Kopf: am Computer als Knopf, am Handy im Menü */
.cwc-nur-handy { display: none !important; }
.wp-block-navigation__responsive-container.is-menu-open .cwc-nur-handy { display: flex !important; }
@media (max-width: 600px) {
	.cwc-kopf-knopf { display: none !important; }
	.cwc-logo img { height: 38px; }
	.cwc-logo-name { font-size: 12.5px; }
	.cwc-logo-zusatz { font-size: 9px; }
}

/* Aufgeklapptes Handy-Menü: große Tippflächen */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding-block: 0.6rem;
	font-size: 1.15rem;
}

/* ---------- Stil „Karte (weiß)“ für Gruppen und Spalten ---------- */
.is-style-karte {
	background: var(--wp--preset--color--weiss);
	border-radius: 14px;
	box-shadow: var(--wp--preset--shadow--karte);
	padding: var(--wp--preset--spacing--30);
}

/* ---------- Button-Stil „Umriss“ ---------- */
.wp-block-button.is-style-umriss .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--taupe-dunkel);
	border: 2px solid currentColor;
}
.wp-block-button.is-style-umriss .wp-block-button__link:hover {
	background: var(--wp--preset--color--taupe-dunkel);
	color: var(--wp--preset--color--weiss);
}
/* Heller Button auf dunklem Grund */
.has-anthrazit-background-color .wp-block-button__link {
	background: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--anthrazit);
}

/* ---------- Bilder: nie breiter als der Bildschirm ---------- */
img { max-width: 100%; height: auto; }
.wp-block-image img[style*="height"] { max-height: 70vh; }

/* ---------- Abstandhalter: auf dem Handy höchstens 2rem ----------
   Übergangslösung, bis die alten festen Abstandhalter aus den Seiten
   entfernt sind. */
@media (max-width: 600px) {
	.wp-block-spacer { max-height: 2rem; }
}

/* ---------- Blog-Liste als Karten ---------- */
.cwc-blogliste .wp-block-post {
	display: flex;
	flex-direction: column;
}
.cwc-blogliste .wp-block-post-featured-image img { border-radius: 10px; }

/* ---------- Fokus immer sichtbar (Tastaturbedienung) ---------- */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--anthrazit);
	outline-offset: 3px;
}

/* ---------- Weniger Bewegung, wenn am Gerät so eingestellt ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   ÜBERGANG: Klassen aus den alten Seiteninhalten
   Damit die Seiten sofort ordentlich aussehen. Wird gelöscht, sobald die
   Seiten auf die neuen Stile umgestellt sind.
   ========================================================================== */
body { overflow-x: clip; }
.full-bleed {
	background: var(--wp--preset--color--hintergrund-alt);
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding: var(--wp--preset--spacing--50) clamp(1rem, 4vw, 2rem);
	max-width: none !important;
}
.full-bleed > * { max-width: 1140px; margin-inline: auto !important; }
.full-bleed .wp-block-column,
.leistungen-karten .wp-block-column {
	background: var(--wp--preset--color--weiss);
	border-radius: 14px;
	box-shadow: var(--wp--preset--shadow--karte);
	padding: var(--wp--preset--spacing--30);
}
.leistungen-clean .wp-block-column {
	background: transparent;
	box-shadow: none;
	padding: 0;
}
.testimonials-section strong { color: var(--wp--preset--color--taupe-dunkel); }

/* Zitate innerhalb weißer Karten: kein zweiter Kasten */
.is-style-karte .wp-block-quote,
.full-bleed .wp-block-column .wp-block-quote {
	background: transparent;
	margin: 0;
	padding-block: 0.5rem;
	padding-inline: 1rem 0;
}

/* ---------- Porträt auf der Startseite im Rahmen ----------
   Wie bisher: Verlauf in Taupe, runde Ecken, Schatten, heller Schimmer.
   Das Foto ist freigestellt und wird im Rahmen etwas vergrößert. */
.cwc-portrait {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: 14px;
	background: linear-gradient(135deg, #D7CEC5 0%, #BBAFA2 55%, #9C8B7A 100%);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}
.cwc-portrait img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: center top;
	transform: scale(1.45);
	transform-origin: 50% 44%;
	display: block;
}
.cwc-portrait::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 25% 20%, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 55%);
	pointer-events: none;
}
@media (max-width: 781px) {
	.cwc-portrait { max-width: 420px; margin-inline: auto; }
}

/* ---------- Liste „Neueste Beiträge“ (Startseite, „Aus dem Blog“) ----------
   Mehr Luft zwischen den Einträgen, Bild links mit Abstand zum Text. */
.wp-block-latest-posts.wp-block-latest-posts__list > li {
	margin-bottom: 3.5rem;
	overflow: hidden;
}
.wp-block-latest-posts.wp-block-latest-posts__list > li:last-child { margin-bottom: 0; }
.wp-block-latest-posts__featured-image.alignleft { margin-right: 1.75rem; margin-bottom: 1rem; }
.wp-block-latest-posts__featured-image img { border-radius: 10px; }
.wp-block-latest-posts__post-title {
	display: inline-block;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	margin-bottom: 0.5rem;
}
.wp-block-latest-posts__post-excerpt { margin-top: 0.5rem; }
@media (max-width: 600px) {
	.wp-block-latest-posts__featured-image,
	.wp-block-latest-posts__featured-image.alignleft { float: none; display: block; width: 100%; margin: 0 0 1rem; }
	.wp-block-latest-posts__featured-image a,
	.wp-block-latest-posts__featured-image img { display: block; width: 100% !important; max-width: none !important; height: auto !important; aspect-ratio: 16 / 10; object-fit: cover; }
}

/* Bearbeitbarer Kopf steht in der Seite: kein Abstand darüber */
.cwc-kopf-im-inhalt .wp-block-post-content { padding-top: 0 !important; }
.wp-block-post-content > .cwc-start-kopf:first-child { margin-block-start: 0; }
.wp-block-post-content > .cwc-start-kopf { margin-block-end: var(--wp--preset--spacing--50); }

/* ---------- Spalten im Seiteninhalt: mehr Luft zwischen Bild und Text ---------- */
.wp-block-post-content > .wp-block-columns,
.wp-block-post-content > .wp-block-group:not(.cwc-start-kopf) > .wp-block-columns {
	column-gap: clamp(2rem, 6vw, 5rem);
}

/* Runde Fotos mit fester Höhe: auf dem Handy ein Kreis statt eines Ovals */
@media (max-width: 781px) {
	.wp-block-image.is-style-rounded img {
		width: min(100%, 340px) !important;
		height: auto !important;
		aspect-ratio: 1;
		object-fit: cover;
		margin-inline: auto;
		display: block;
	}
}

/* ---------- Startseite: Leistungs-Kästen ----------
   Überschrift, Text und Beispiele beginnen in allen Kästen auf derselben Höhe. */
@media (min-width: 782px) {
	.full-bleed .wp-block-columns:has(> .wp-block-column > h3:first-child) {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-rows: auto auto auto;
	}
	.full-bleed .wp-block-columns:has(> .wp-block-column > h3:first-child) > .wp-block-column {
		display: grid;
		grid-row: span 3;
		grid-template-rows: subgrid;
		row-gap: 0.75rem;
		align-content: start;
	}
	.full-bleed .wp-block-columns:has(> .wp-block-column > h3:first-child) > .wp-block-column > * { margin: 0; }
}

/* ---------- Reihen mit runden Symbolen („Für wen ich arbeite“ u. a.) ----------
   Die Klassen setzt functions.php beim Ausgeben. Eine Reihe mit nur zwei
   Symbolen rückt so ein, dass die Kreise in den Lücken der Reihe darüber stehen. */
.cwc-symbol-reihe { --cwc-spalt: clamp(2rem, 6vw, 5rem); column-gap: var(--cwc-spalt) !important; }
@media (min-width: 782px) {
	/* Beide Reihen haben gleich breite Spalten; die untere wird mittig
	   zusammengeschoben, so stehen ihre Symbole genau zwischen denen darüber. */
	.cwc-symbol-reihe > .wp-block-column { flex: 0 0 calc((100% - 2 * var(--cwc-spalt)) / 3) !important; }
	.cwc-symbol-reihe-versetzt {
		justify-content: center;
		margin-top: var(--wp--preset--spacing--40) !important;
	}
	/* Texte behalten ihre Zeilen und stehen mittig unter dem Symbol,
	   auch wenn eine Zeile etwas breiter ist als die Spalte; ohne feste
   Umbrüche verteilt sich der Text gleichmäßig auf etwa drei Zeilen */
	.cwc-symbol-reihe-versetzt > .wp-block-column {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.cwc-symbol-reihe-versetzt > .wp-block-column > p {
		width: max-content;
		max-width: 23rem;
		text-wrap: balance;
	}
}

/* ---------- Stimmen: Zitat kursiv, Name gerade ---------- */
.wp-block-quote cite {
	display: block;
	font-style: normal;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--klein);
	color: var(--wp--preset--color--taupe-dunkel);
	margin-top: 0.75rem;
}

/* ---------- Kontaktseite: Formular links, Kontaktwege rechts ---------- */
.cwc-kontakt-spalten { align-items: flex-start; }
.cwc-kontakt-spalten h3 { font-size: var(--wp--preset--font-size--medium); }
.cwc-kontakt-spalten { margin-bottom: var(--wp--preset--spacing--50) !important; }

/* Zitat-Kästen bündig mit Überschrift und Text darüber */
.wp-block-quote { margin-inline: 0; }
.cwc-kontakt-v3, .cwc-kontakt-v4 { margin-top: var(--wp--preset--spacing--40) !important; }

/* ---------- Kontaktseite ---------- */
.cwc-formular-kasten {
	background: var(--wp--preset--color--hintergrund-alt);
	border-radius: 14px;
	padding: var(--wp--preset--spacing--30) !important;
}
/* E-Mail und Telefon mit kleinen Symbolen statt Beschriftung */
.cwc-kontaktwege a {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
}
.cwc-kontaktwege a::before {
	content: "";
	flex: none;
	width: 1.05em;
	height: 1.05em;
	background: currentColor;
	-webkit-mask: var(--cwc-symbol) center / contain no-repeat;
	mask: var(--cwc-symbol) center / contain no-repeat;
}
.cwc-kontaktwege a[href^="mailto:"] {
	--cwc-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}
.cwc-kontaktwege a[href^="tel:"] {
	--cwc-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
}
/* Rechte Spalte beginnt auf derselben Höhe wie die Überschrift im Formular-Kasten */
@media (min-width: 782px) {
	.cwc-kontakt-v4 > .wp-block-column:not(.cwc-formular-kasten) { padding-top: var(--wp--preset--spacing--30); }
}

/* Dunkler Abschluss am Seitenende schließt direkt an den Footer an */
.wp-block-post-content:has(> .cwc-abschluss-dunkel:last-child) { padding-bottom: 0 !important; }

/* ---------- Am Handy: Text vor Foto (Version 1.5) ---------- */
@media (max-width: 781px) {
	.wp-block-columns.cwc-bild-zuerst { flex-direction: column-reverse; }
}

/* ---------- „Nach oben“-Pfeil (Version 1.5) ---------- */
.cwc-nach-oben {
	position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50;
	width: 46px; height: 46px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--wp--preset--color--taupe-dunkel); color: #fff;
	box-shadow: 0 4px 14px rgba(0,0,0,.18);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .25s, transform .25s, visibility .25s, background-color .2s;
}
.cwc-nach-oben.ist-sichtbar { opacity: .9; visibility: visible; transform: none; }
.cwc-nach-oben:hover, .cwc-nach-oben:focus-visible { opacity: 1; background: var(--wp--preset--color--anthrazit); color: #fff; }
.cwc-nach-oben:focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cwc-nach-oben { transition: none; } }
