/*
Theme Name: SBB Beuerlein
Theme URI: https://beuerlein.de
Description: Child-Theme von Twenty Twenty-Five für das Projektmanagement & KI Know-How-Center. Farben, Schrift (Montserrat, lokal) und Block-Vorlagen passend zu ki-assistenz-sbb.de.
Author: Dr. Sandra Bartsch-Beuerlein
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sbb-beuerlein
*/

/* ---------- Grundlagen ---------- */
:root {
	--sbb-muted: rgb(23 50 77 / .78);
	--sbb-line: rgb(23 50 77 / .16);
	--sbb-line-strong: rgb(23 50 77 / .45);
}
body { -webkit-font-smoothing: antialiased; }
:where(h1, h2, h3) { text-wrap: balance; hyphens: auto; overflow-wrap: normal; }
.sbb-page-title { font-size: clamp(2rem, 4vw, 3.25rem) !important; }
:focus-visible { outline: 3px solid var(--wp--preset--color--teal); outline-offset: 3px; }

/* Türkise Hervorhebung: im Editor Text markieren → Pfeil ▾ → „Hervorheben“ → Textfarbe Türkis */
mark.has-inline-color { background: none; }

/* Kleines Abschnitts-Label: „01 / Wann ich helfe“ */
.sbb-label {
	font-size: 0.6875rem !important;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	margin-bottom: 0 !important;
}
.sbb-muted { color: var(--sbb-muted); }

/* ---------- Kopfbereich ---------- */
.sbb-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: var(--wp--preset--color--paper);
	border-bottom: 1px solid var(--sbb-line);
}
.admin-bar .sbb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sbb-header { top: 0; } }
.sbb-header__inner { min-height: 74px; gap: 20px; }
.sbb-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wp--preset--color--navy); }
.sbb-brand__mark { font-weight: 700; font-size: 30px; letter-spacing: -.04em; color: var(--wp--preset--color--teal); line-height: 1; }
.sbb-brand__mark span { color: var(--wp--preset--color--orange); }
.sbb-brand__name { font-size: 12px; font-weight: 600; line-height: 1.35; }
.sbb-header .wp-block-navigation a:hover { color: var(--wp--preset--color--teal); }
.sbb-header .wp-block-button__link { padding: 10px 16px; font-size: .75rem; }

/* ---------- Hero ---------- */
.sbb-hero { padding-top: 72px; padding-bottom: 64px; }
.sbb-company {
	font-size: clamp(16px, 1.7vw, 21px) !important;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	line-height: 1.35;
	margin-bottom: 30px !important;
}
.sbb-company mark { display: block; }
.sbb-company::after {
	content: "";
	display: block;
	width: 72px;
	height: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--orange);
	margin-top: 16px;
}
.sbb-hero__intro { font-size: 1rem; color: var(--sbb-muted); max-width: 520px; }
.sbb-hero__note { font-size: .75rem; color: var(--sbb-muted); }
.sbb-hero__visual { position: relative; padding: 0 22px 26px 0; max-width: 430px; margin-left: auto; }
.sbb-portrait { margin: 0; background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }
.sbb-portrait img { display: block; width: 100%; height: 400px; object-fit: cover; object-position: center 28%; }
.sbb-portrait figcaption { margin: 0; padding: 16px 20px 56px; font-size: .75rem; line-height: 1.6; text-align: left; color: var(--wp--preset--color--white); }
.sbb-portrait figcaption strong { font-size: .875rem; }
.sbb-hero__tag {
	position: absolute;
	right: 0;
	bottom: 0;
	display: block;
	height: 50px;
	margin: 0 !important;
	padding: 0 20px;
	border-radius: 4px;
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--navy);
	font-size: .8125rem;
	font-weight: 600;
	line-height: 50px;
	white-space: nowrap;
}
/* Buttons im Kopfbereich gleich hoch wie das Label */
.sbb-hero .wp-block-button__link { height: 50px; display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0; }
.sbb-hero__tag strong { font-weight: 700; }
@media (max-width: 781px) {
	.sbb-hero__visual { margin-left: 0; margin-top: 24px; }
	.sbb-portrait img { height: 340px; }
	.sbb-hero__tag { white-space: normal; left: 40px; height: auto; line-height: 1.4; padding: 12px 18px; }
}

/* ---------- Kennzahlen ---------- */
.sbb-stats { border-top: 1px solid var(--sbb-line); border-bottom: 1px solid var(--sbb-line); padding-top: 26px; padding-bottom: 26px; }
.sbb-stat { display: flex; align-items: center; gap: 16px; }
.sbb-stat__num { font-size: 2.375rem !important; font-weight: 600; color: var(--wp--preset--color--teal); line-height: 1; margin: 0 !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sbb-stat__text { font-size: .75rem !important; color: var(--sbb-muted); line-height: 1.5; margin: 0 !important; }
.sbb-stat__text strong { color: var(--wp--preset--color--navy); }

/* ---------- Abschnitte ---------- */
.sbb-section { padding-top: 96px; }
.sbb-section__head { margin-bottom: 48px !important; }
.sbb-section__head h2 { margin-top: 18px; }
.sbb-section__head p.sbb-muted { max-width: 440px; }

/* Karten (Wann ich helfe) */
.sbb-card {
	background: var(--wp--preset--color--white);
	padding: 28px;
	height: 100%;
	border-top: 3px solid transparent;
	transition: border-color .2s, transform .2s;
}
.sbb-card:hover { border-top-color: var(--wp--preset--color--teal); transform: translateY(-3px); }
.sbb-card h3 { font-size: 1.0625rem; }
.sbb-card p { font-size: .875rem; color: var(--sbb-muted); }
.sbb-card p.sbb-card__help { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sbb-line); color: var(--wp--preset--color--navy); font-size: .8125rem; }
.sbb-card__help strong { color: var(--wp--preset--color--teal); }
.sbb-cards .wp-block-column, .sbb-steps .wp-block-column { display: flex; }
.sbb-card > :last-child, .sbb-step > :last-child { margin-top: auto !important; }
.sbb-step { display: flex; flex-direction: column; width: 100%; }
.sbb-cards .wp-block-column > .sbb-card { display: flex; flex-direction: column; width: 100%; }

/* Schritte (So arbeite ich) */
.sbb-step { border-top: 2px solid var(--wp--preset--color--teal); padding-top: 18px; height: 100%; }
.sbb-step__num { font-size: .75rem !important; font-weight: 600; margin: 0 !important; }
.sbb-step h3 { font-size: 1.0625rem; margin-top: 10px; }
.sbb-step p { font-size: .875rem; color: var(--sbb-muted); }
.sbb-step p.sbb-step__out { font-size: .75rem; font-weight: 700; color: var(--wp--preset--color--navy); }
.sbb-quote { margin-top: 48px !important; padding-top: 32px; border-top: 1px solid var(--sbb-line); gap: 20px; }
.sbb-quote__star { font-size: 2.125rem !important; color: var(--wp--preset--color--teal); line-height: 1; margin: 0 !important; }

/* KI-Band */
.sbb-ki-band { background: var(--wp--preset--color--deep); color: var(--wp--preset--color--white); margin-top: 96px !important; padding-top: 80px; padding-bottom: 80px; }
.sbb-ki-band h2 { color: var(--wp--preset--color--white); }
.sbb-ki-band .sbb-label { color: #7fd3d8; }
.sbb-ki-band p { color: rgb(242 244 245 / .82); max-width: 480px; }
.sbb-ki-band img { max-width: 460px; width: 100%; margin-left: auto; display: block; }

/* Blogkarten (Abfrage-Schleife) */
.sbb-posts .wp-block-post { background: var(--wp--preset--color--white); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.sbb-posts .wp-block-post > :last-child { margin-top: auto; }
.sbb-posts .wp-block-post-date, .sbb-posts .wp-block-post-terms { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sbb-muted); margin: 0; }
.sbb-posts .wp-block-post-terms a { color: var(--wp--preset--color--teal); text-decoration: none; }
.sbb-posts .wp-block-post-title { font-size: 1.0625rem; line-height: 1.4; margin: 0; }
.sbb-posts .wp-block-post-title a { text-decoration: none; }
.sbb-posts .wp-block-post-title a:hover { color: var(--wp--preset--color--teal); }
.sbb-posts .wp-block-post-excerpt { font-size: .875rem; color: var(--sbb-muted); margin: 0; }
.sbb-posts .wp-block-post-excerpt__more-link { font-weight: 600; color: var(--wp--preset--color--navy); }

/* Über-mich-Teaser */
.sbb-about { background: var(--wp--preset--color--white); padding: 40px; }
.sbb-about img { width: 220px; height: 240px; object-fit: cover; object-position: center 25%; }

/* Textlink mit Linie */
.sbb-link a, a.sbb-link { font-size: .8125rem; font-weight: 600; color: var(--wp--preset--color--navy); text-decoration: none; border-bottom: 1px solid var(--sbb-line-strong); padding-bottom: 3px; }

/* ---------- Kontakt & Fußbereich ---------- */
.sbb-contact-card { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); padding: 36px; height: 100%; }
.sbb-contact-card h3 { color: var(--wp--preset--color--white); font-size: 1.375rem; }
.sbb-contact-card p { color: rgb(242 244 245 / .82); font-size: .875rem; }
.sbb-contact-card .sbb-label { color: #7fd3d8; }
.sbb-contact-card .sbb-contact-alt { border-top: 1px solid rgb(242 244 245 / .2); padding-top: 22px; margin-top: 12px; }
.sbb-contact-card .sbb-contact-alt strong { user-select: all; color: var(--wp--preset--color--white); }
.sbb-contact-form { background: var(--wp--preset--color--white); padding: 36px; height: 100%; }
.sbb-contact-form h3 { font-size: 1.375rem; }
/* Contact Form 7 im Markendesign */
.sbb-contact-form .wpcf7 label { font-size: .75rem; font-weight: 700; display: block; }
.sbb-contact-form .wpcf7 input[type="text"],
.sbb-contact-form .wpcf7 input[type="email"],
.sbb-contact-form .wpcf7 textarea {
	width: 100%; font: inherit; font-size: .9375rem; font-weight: 400; color: var(--wp--preset--color--navy);
	background: var(--wp--preset--color--paper); border: 1px solid var(--sbb-line); border-radius: 4px; padding: 12px 14px; margin-top: 6px;
}
.sbb-contact-form .wpcf7 textarea { min-height: 120px; }
.sbb-contact-form .wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); border: 0; border-radius: 4px;
	padding: 14px 22px; font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer;
}
.sbb-footer-bar { border-top: 1px solid var(--sbb-line); margin-top: 96px !important; padding-top: 32px; padding-bottom: 32px; font-size: .8125rem; }
.sbb-footer-bar .sbb-sig { font-weight: 600; margin: 0; }
.sbb-footer-bar .wp-block-navigation a { color: var(--sbb-muted); }
.sbb-footer-bar .wp-block-navigation a:hover { color: var(--wp--preset--color--teal); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Über mich ---------- */
.sbb-certs { font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.sbb-tl { border-top: 1px solid var(--sbb-line); padding-top: 22px; padding-bottom: 6px; margin-bottom: 0 !important; }
.sbb-tl:last-of-type { border-bottom: 1px solid var(--sbb-line); }
.sbb-tl__when strong { color: var(--wp--preset--color--teal); }
.sbb-two { margin-top: 72px !important; }
.sbb-two h2 { font-size: 1.75rem; margin-top: 14px; }


/* ---------- Blog-Übersicht & Archive ---------- */
.sbb-archive { padding-top: 72px; }
.sbb-archive .sbb-page-title { margin-top: 14px; }
.sbb-archive__intro { max-width: 560px; margin-bottom: 40px !important; }
.sbb-archive .wp-block-term-description { margin-bottom: 40px; }
.sbb-posts .wp-block-post-featured-image { margin: -26px -26px 6px; }
.sbb-posts .wp-block-post-featured-image img { width: 100%; object-fit: cover; }
.sbb-pagination { margin-top: 48px !important; gap: 12px; font-weight: 600; font-size: .875rem; }
.sbb-pagination a { color: var(--wp--preset--color--navy); text-decoration: none; }
.sbb-pagination .page-numbers.current { color: var(--wp--preset--color--teal); }

/* ---------- Kopfbereich bei mittlerer Breite ---------- */
.sbb-brand__name, .sbb-header .wp-block-navigation-item__label, .sbb-header .wp-block-button__link { white-space: nowrap; }
.sbb-header .wp-block-navigation__container { flex-wrap: nowrap; }
@media (max-width: 1080px) {
	.sbb-header .wp-block-navigation { --navigation-layout-gap: 18px; gap: 18px; }
	.sbb-header .wp-block-buttons { display: none; }
}
@media (max-width: 720px) {
	.sbb-brand__name { display: none; }
}

/* Sprungmarken (z. B. Gliederung im Blogbeitrag): etwas Abstand nach oben, sanftes Scrollen */
:where(h2, h3, p)[id] { scroll-margin-top: 1.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Blog: Kategorie-Filter und Suche */
.sbb-filter { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin: 8px 0 40px; }
.sbb-filter__cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sbb-filter__cats a { display: inline-block; padding: 7px 14px; border: 1px solid #d5dce2; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--wp--preset--color--navy); text-decoration: none; background: #fff; transition: border-color .15s, background .15s; }
.sbb-filter__cats a span { font-weight: 400; opacity: .6; margin-left: 2px; }
.sbb-filter__cats a:hover { border-color: var(--wp--preset--color--teal); }
.sbb-filter__cats a[aria-current="page"] { background: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); color: #fff; }
.sbb-filter__search { display: flex; flex: 0 1 320px; min-width: 240px; }
.sbb-filter__search input[type="search"] { flex: 1; min-width: 0; padding: 9px 14px; border: 1px solid #d5dce2; border-right: 0; border-radius: 999px 0 0 999px; font: inherit; font-size: .9rem; }
.sbb-filter__search input[type="search"]:focus { outline: 2px solid var(--wp--preset--color--teal); outline-offset: -1px; }
.sbb-filter__search button { padding: 9px 18px; border: 0; border-radius: 0 999px 999px 0; background: var(--wp--preset--color--teal); color: #fff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.sbb-filter__search button:hover { background: var(--wp--preset--color--navy); }
@media (max-width: 720px) { .sbb-filter__search { flex: 1 1 100%; } }

/* Über mich: LinkedIn-Kasten */
.sbb-linkedin { margin-top: 64px; padding: 32px 40px; background: var(--wp--preset--color--paper); border-left: 4px solid var(--wp--preset--color--teal); gap: 32px; }
.sbb-linkedin__text { flex: 1 1 360px; }
.sbb-linkedin__text h2 { margin-top: 4px; }
.sbb-linkedin__qr { margin: 0; flex: 0 0 auto; }
.sbb-linkedin__qr img { display: block; background: #fff; padding: 8px; border-radius: 8px; }
@media (max-width: 720px) { .sbb-linkedin { padding: 24px; } }

.sbb-page-title + .sbb-filter { margin-top: 24px; }

/* LinkedIn-Hinweis mit QR-Code in der Kontaktkarte */
.sbb-contact-card .sbb-contact-li { border-top: 1px solid rgb(242 244 245 / .2); padding-top: 22px; margin-top: 22px; gap: 20px; }
.sbb-contact-card .sbb-contact-li p { margin: 0; }
.sbb-contact-card .sbb-contact-li strong { color: var(--wp--preset--color--white); }
.sbb-contact-card .sbb-contact-li a { color: #7fd3d8; font-weight: 600; text-decoration: none; }
.sbb-contact-card .sbb-contact-li a:hover { text-decoration: underline; }
.sbb-contact-li__qr { margin: 0; flex: 0 0 auto; }
.sbb-contact-li__qr img { display: block; width: 88px; height: 88px; background: #fff; padding: 6px; border-radius: 6px; }

/* Blogbeiträge: Überschriften halb so groß wie auf den übrigen Seiten */
.single-post .wp-block-post-title { font-size: max(1.5rem, calc(var(--wp--preset--font-size--huge, 3.5rem) * .5)); line-height: 1.25; }
.single-post .wp-block-post-content h2 { font-size: max(1.125rem, calc(var(--wp--preset--font-size--xx-large, 2.4rem) * .5)); line-height: 1.35; }
.single-post .wp-block-post-content h3 { font-size: max(1.0625rem, calc(var(--wp--preset--font-size--x-large, 1.8rem) * .5)); line-height: 1.4; }
