/**
 * Beratung: filters, consultant cards and the sections of the page.
 *
 * Follows the Beratung design: turquoise and ink on white, rounded cards with a soft shadow, rounded
 * chips and buttons. The font is inherited from the theme. All colours and radii are custom properties
 * on the two roots below, so the look can be adjusted in one place.
 */

.seb-ber,
.seb-ber-section {
	--seb-ber-blue: var(--wp--preset--color--blue, #0090b0);
	--seb-ber-dark: #00728c; /* hover and link colour, passes 4.5:1 on white */
	--seb-ber-tint: #e6f4f8;
	--seb-ber-tint-2: #f2fafc;
	--seb-ber-ink: #1c2b33;
	--seb-ber-muted: #5c6b73;
	--seb-ber-line: #dbe6ea;
	/* Form controls: the same values as the stakeholder map (assets/css/map.css) */
	--seb-ber-field-dark: #1d3a4a;
	--seb-ber-field-muted: #6b7f88;
	--seb-ber-field-border: #d4dde0;
	--seb-ber-purple: var(--wp--preset--color--purple, #b80f80);
	--seb-ber-radius: 14px;
	--seb-ber-shadow: 0 2px 10px rgba( 0, 52, 66, 0.06 );
	--seb-ber-shadow-h: 0 8px 24px rgba( 0, 52, 66, 0.12 );

	color: var( --seb-ber-ink );
}
.seb-ber {
	width: 100%;
}

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

/* The theme sets display on some elements; `hidden` has to win. */
.seb-ber [hidden] {
	display: none !important;
}

/* The theme removes focus outlines site-wide; keep a visible focus for keyboard users. */
.seb-ber :focus-visible,
.seb-ber-section :focus-visible {
	outline: 3px solid var( --seb-ber-dark );
	outline-offset: 2px;
}

:where( .seb-ber ) :where( button, select ) {
	font: inherit;
	color: inherit;
}

.seb-ber__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

/* Cards lift on hover (not for people who prefer less motion). */
.seb-ber__card,
.seb-ber-xl {
	transition: box-shadow 0.15s ease;
}
.seb-ber__card:hover,
.seb-ber-xl:hover {
	box-shadow: var( --seb-ber-shadow-h );
}
@media ( prefers-reduced-motion: no-preference ) {
	.seb-ber__card,
	.seb-ber-xl {
		transition: transform 0.15s ease, box-shadow 0.15s ease;
	}
	.seb-ber__card:hover,
	.seb-ber-xl:hover {
		transform: translateY( -3px );
	}
}

/* ---------------------------------------------------------------- filters */

.seb-ber__filters {
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	gap: 14px 16px;
	margin: 26px 0 22px;
	padding: 14px 16px;
	border: 1px solid var( --seb-ber-line );
	border-radius: 12px;
	background: #fff;
	box-shadow: var( --seb-ber-shadow );
	font-size: 14px;
}

@media ( min-width: 48em ) {
	.seb-ber__filters {
		grid-template-columns: minmax( 0, 1fr ) minmax( 12rem, 16rem );
		align-items: start;
	}
	.seb-ber__filters > .seb-ber__group:nth-child( 1 ) {
		grid-area: 1 / 1;
	}
	.seb-ber__filters > .seb-ber__group:nth-child( 2 ) {
		grid-area: 2 / 1 / 3 / 3;
	}
	.seb-ber__filters > .seb-ber__group--language {
		grid-area: 1 / 2;
	}
	.seb-ber__status {
		grid-column: 1 / -1;
	}
}

.seb-ber__group {
	min-width: 0;
}

.seb-ber__legend {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	color: var( --seb-ber-field-muted );
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}

.seb-ber__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.seb-ber__chip {
	padding: 4px 10px;
	border: 1.5px solid var( --seb-ber-field-border );
	border-radius: 12px;
	background: #fff;
	color: var( --seb-ber-field-dark );
	font-size: 0.76rem;
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
	user-select: none;
}
.seb-ber__chip[aria-pressed='true'] {
	border-color: var( --seb-ber-blue );
	background: var( --seb-ber-blue );
	color: #fff;
}

.seb-ber__language {
	display: block;
	width: 100%;
	margin: 0;
	padding: 8px 36px 8px 8px;
	border: 1.5px solid var( --seb-ber-field-border );
	border-radius: 8px;
	background: #fff url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d3a4a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" ) no-repeat right 14px center;
	color: var( --seb-ber-field-dark );
	font-size: 0.86rem;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.seb-ber__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px 16px;
}
.seb-ber__count {
	margin: 0;
	color: var( --seb-ber-muted );
	font-size: 13.5px;
}

.seb-ber__reset {
	padding: 0;
	border: 0;
	background: none;
	color: var( --seb-ber-purple );
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.seb-ber__reset:hover {
	text-decoration: none;
}

.seb-ber__empty,
.seb-ber__none {
	margin: 0 0 20px;
	padding: 14px 18px;
	border: 1px solid var( --seb-ber-line );
	border-radius: 12px;
	background: var( --seb-ber-tint-2 );
	color: var( --seb-ber-muted );
	font-size: 15px;
}
.seb-ber__empty .seb-ber__reset {
	margin-left: 0.5em;
}

/* ---------------------------------------------------------------- consultant cards */

.seb-ber__list {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media ( max-width: 940px ) {
	.seb-ber__list {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}
@media ( max-width: 640px ) {
	.seb-ber__list {
		grid-template-columns: minmax( 0, 1fr );
	}
}

.seb-ber__card {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 20px;
	border: 1px solid var( --seb-ber-line );
	border-radius: var( --seb-ber-radius );
	background: #fff;
	box-shadow: var( --seb-ber-shadow );
	font-size: 15px;
	line-height: 1.5;
}

.seb-ber__logo {
	display: flex;
	align-items: center;
	height: 56px;
	margin-bottom: 12px;
}
.seb-ber__logo img {
	display: block;
	width: auto;
	max-width: 170px;
	height: auto;
	max-height: 52px;
	object-fit: contain;
}
.seb-ber__mono {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: var( --seb-ber-tint );
	color: var( --seb-ber-dark );
	font-size: 19px;
	font-weight: 800;
	letter-spacing: 0.5px;
}

.seb-ber .seb-ber__name {
	margin: 0 0 10px;
	padding: 0;
	color: var( --seb-ber-ink );
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	text-transform: none;
	letter-spacing: normal;
	hyphens: manual;
}

.seb-ber .seb-ber__badges,
.seb-ber .seb-ber__focus {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.seb-ber .seb-ber__badges {
	margin-bottom: 12px;
}
.seb-ber__badges li {
	margin: 0;
	padding: 4px 9px;
	border-radius: 6px;
	background: var( --seb-ber-tint );
	color: var( --seb-ber-dark );
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}
.seb-ber__focus li {
	margin: 0;
	padding: 3px 8px;
	border: 1px solid var( --seb-ber-line );
	border-radius: 6px;
	color: var( --seb-ber-ink );
	font-size: 12.5px;
	line-height: 1.4;
}

.seb-ber .seb-ber__label {
	margin: 12px 0 5px;
	padding: 0;
	color: var( --seb-ber-muted );
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.seb-ber .seb-ber__services {
	margin: 5px 0 0;
	padding-left: 17px;
	color: var( --seb-ber-muted );
	font-size: 14px;
}
.seb-ber__services li {
	margin: 0 0 3px;
}

.seb-ber .seb-ber__facts {
	display: flex;
	flex-direction: column;
	margin: 12px 0 0;
	color: var( --seb-ber-muted );
	font-size: 13.5px;
}
.seb-ber__facts strong {
	color: var( --seb-ber-ink );
}

.seb-ber .seb-ber__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: auto 0 0;
	padding-top: 16px;
}
.seb-ber__button {
	display: inline-flex;
	align-items: center;
	padding: 8px 13px;
	border-radius: 10px;
	background: var( --seb-ber-blue );
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	transition: background 0.15s;
}
.seb-ber__button:hover {
	background: var( --seb-ber-dark );
	color: #fff;
}
.seb-ber__link {
	min-width: 0;
	color: var( --seb-ber-dark );
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	overflow-wrap: anywhere;
}
.seb-ber__link:hover {
	text-decoration: none;
}

/* ---------------------------------------------------------------- page sections (block editor content) */

/*
 * The theme frames the content of pages without a title in a white border. The sections of this
 * page run edge to edge instead, so the frame goes away on pages that use them.
 */
.wp-block-post-content:has( > .seb-ber-section ) {
	border-width: 0 !important;
}

/*
 * Sections run the full width; their side padding is the gutter and centres the content in a column
 * of 1076px (the wrap of the design), so a narrower text simply starts at the left edge of the column.
 */
.wp-block-group.seb-ber-section {
	padding-block: 52px;
	padding-inline: max( 22px, calc( ( 100% - 67.25rem ) / 2 ) );
}
.wp-block-group.seb-ber-section--tight {
	padding-top: 8px;
}
.wp-block-group.seb-ber-section--last {
	padding-bottom: clamp( 3rem, 8vw, 5rem );
}
/* The information box for advice institutions sits closer to the section above and to the footer. */
.wp-block-group.seb-ber-section#institutionen {
	padding-top: 8px;
	padding-bottom: clamp( 1.5rem, 4vw, 2.5rem );
}
.wp-block-group.seb-ber-section--tint {
	background: var( --seb-ber-tint-2 );
}

.seb-ber-section :where( h1, h2, h3, h4 ) {
	color: var( --seb-ber-ink );
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
}
.seb-ber-section h2.wp-block-heading {
	margin: 0 0 10px;
	font-size: clamp( 1.6rem, 3vw, 1.9375rem );
}

/* Hero */
.wp-block-group.seb-ber-hero {
	padding-top: 44px;
	padding-bottom: 40px;
	background: linear-gradient( 180deg, var( --seb-ber-tint ) 0%, #fff 100% );
}
.seb-ber-hero h1.wp-block-heading {
	margin: 0 0 14px;
	font-size: clamp( 2rem, 5vw, 2.75rem );
}
.wp-block-group.seb-ber-pill-row {
	margin-block: 0 18px;
}
.seb-ber-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 7px 14px;
	border-radius: 999px;
	background: var( --seb-ber-blue );
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}
.seb-ber-pill::before {
	content: '\25CF';
}
.wp-block-group.seb-ber-section p.seb-ber-lead {
	max-width: 720px;
	margin: 0;
	color: var( --seb-ber-muted );
	font-size: 19px;
	line-height: 1.6;
}

/* Small label above a section heading, text below it */
.wp-block-group.seb-ber-section p.seb-ber-eyebrow {
	margin: 0 0 10px;
	color: var( --seb-ber-blue );
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.12em;
	line-height: 1.6;
	text-transform: uppercase;
}
.wp-block-group.seb-ber-section p.seb-ber-intro {
	max-width: 760px;
	margin: 0 0 30px;
	color: var( --seb-ber-muted );
	font-size: 17px;
}

/* Erstgespräch */
.wp-block-group.seb-ber-contact {
	padding: clamp( 1.5rem, 4vw, 36px ) clamp( 1.25rem, 4vw, 32px );
	border-radius: 18px;
	background: var( --seb-ber-blue );
	color: #fff;
}
.seb-ber-contact .wp-block-columns {
	gap: 28px;
	margin: 0;
}
.seb-ber-contact h2.wp-block-heading {
	margin: 0 0 10px;
	color: #fff;
	font-size: clamp( 1.5rem, 3vw, 1.75rem );
}
.wp-block-group.seb-ber-section .seb-ber-contact p {
	margin: 0 0 8px;
	color: #e3f4f9;
	font-size: 16px;
}
.seb-ber-contact .wp-block-column > :last-child {
	margin-bottom: 0;
}
.wp-block-group.seb-ber-person {
	padding: 22px;
	border-radius: 14px;
	background: rgba( 255, 255, 255, 0.12 );
}
.wp-block-group.seb-ber-section .seb-ber-person p {
	margin: 0;
	color: #fff;
	font-size: 16px;
}
.wp-block-group.seb-ber-section .seb-ber-person p.seb-ber-person__name {
	font-size: 19px;
	font-weight: 800;
	line-height: 1.4;
}
.wp-block-group.seb-ber-section .seb-ber-person p.seb-ber-person__role {
	margin-bottom: 12px;
	color: #d5eef4;
	font-size: 14px;
}
.seb-ber-person a {
	color: #fff;
	font-weight: 600;
}
.seb-ber-person .wp-block-buttons {
	margin-top: 14px;
}

/* Groups of further offers */
.wp-block-group.seb-ber-subgroup {
	margin-block: 0 34px;
}
.wp-block-group.seb-ber-subgroup__head {
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 14px;
}
.wp-block-group.seb-ber-section p.seb-ber-subgroup__icon {
	display: flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	border-radius: 10px;
	background: var( --seb-ber-blue );
	font-size: 20px;
	line-height: 1;
}
.wp-block-group.seb-ber-subgroup__body {
	flex: 1 1 0;
	min-width: 0;
}
.wp-block-group.seb-ber-section .seb-ber-subgroup__body > * {
	margin-block: 0;
}
.seb-ber-section .seb-ber-subgroup__body h3 {
	margin: 0;
	padding: 0;
	font-size: 21px;
	line-height: 1.25;
}
.wp-block-group.seb-ber-section p.seb-ber-subgroup__text {
	margin: 4px 0 0;
	color: var( --seb-ber-muted );
	font-size: 15px;
}

/* Lists of further offers */
.wp-block-list.seb-ber-offers {
	margin: 0;
	padding: 0;
	border-top: 1px solid var( --seb-ber-line );
	list-style: none;
}
.wp-block-group.seb-ber-section .seb-ber-offers li {
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid var( --seb-ber-line );
	color: var( --seb-ber-muted );
	font-size: 14.5px;
	line-height: 1.5;
}
.seb-ber-offers li a {
	color: var( --seb-ber-dark );
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}
.seb-ber-offers li a::after {
	content: '\2192';
	margin-left: 0.4em;
}
.seb-ber-offers li a:hover {
	text-decoration: underline;
}

/* Grid of the links to other parts of the site */
.wp-block-group.seb-ber-grid--links {
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 18px;
	margin-top: 8px;
}
@media ( max-width: 760px ) {
	.wp-block-group.seb-ber-grid--links {
		grid-template-columns: minmax( 0, 1fr );
	}
}

/* Information for advice institutions */
.wp-block-group.seb-ber-info {
	padding: clamp( 1.25rem, 4vw, 32px );
	border: 1px solid var( --seb-ber-line );
	border-radius: 14px;
	background: var( --seb-ber-tint );
}
.wp-block-group.seb-ber-section .seb-ber-info > * {
	max-width: 760px;
}
.wp-block-group.seb-ber-section .seb-ber-info p {
	margin: 0 0 14px;
	font-size: 16px;
}
.seb-ber-info > :last-child {
	margin-bottom: 0;
}

/* Links to other parts of the site: the whole card is the click target of its heading link. */
.wp-block-group.seb-ber-xl {
	position: relative;
	gap: 14px;
	margin: 0;
	padding: 20px;
	border: 1px solid var( --seb-ber-line );
	border-radius: 12px;
	background: #fff;
	box-shadow: var( --seb-ber-shadow );
}
.wp-block-group.seb-ber-section p.seb-ber-xl__icon {
	margin: 0;
	font-size: 26px;
	line-height: 1.2;
}
.wp-block-group.seb-ber-xl__body {
	flex: 1 1 0;
	min-width: 0;
}
.wp-block-group.seb-ber-section .seb-ber-xl__body > * {
	margin-block: 0;
}
.wp-block-group.seb-ber-section .seb-ber-xl__body > h3.wp-block-heading {
	margin: 0 0 4px;
	padding: 0;
	font-size: 17px;
}
.seb-ber-xl h3 a {
	color: var( --seb-ber-dark );
	text-decoration: none;
}
.seb-ber-xl h3 a::after {
	content: '';
	position: absolute;
	inset: 0;
}
.seb-ber-xl:hover h3 a {
	text-decoration: underline;
}
.seb-ber-xl:focus-within {
	outline: 3px solid var( --seb-ber-dark );
	outline-offset: 2px;
}
.seb-ber-xl h3 a:focus-visible {
	outline: none;
}
.wp-block-group.seb-ber-section .seb-ber-xl__body > p {
	margin: 0;
	color: var( --seb-ber-muted );
	font-size: 14.5px;
	line-height: 1.5;
}

/* ---------------------------------------------------------------- buttons of the page content */
/* The theme does not style the button block itself. */

.seb-ber-section .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	padding: 10px 16px;
	border: 1.5px solid var( --seb-ber-blue );
	border-radius: 10px;
	background: var( --seb-ber-blue );
	color: #fff;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	transition: background 0.15s;
}
.seb-ber-section .wp-block-button__link:hover {
	border-color: var( --seb-ber-dark );
	background: var( --seb-ber-dark );
	color: #fff;
}
.seb-ber-section .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var( --seb-ber-dark );
}
.seb-ber-section .is-style-outline .wp-block-button__link:hover {
	border-color: var( --seb-ber-blue );
	background: var( --seb-ber-tint );
	color: var( --seb-ber-dark );
}
.seb-ber-section .is-style-outline .wp-block-button__link::after {
	content: '\2192';
	margin-left: 0.4em;
}
.seb-ber-section .seb-ber-button--white .wp-block-button__link {
	padding: 11px 18px;
	border-color: #fff;
	background: #fff;
	color: var( --seb-ber-dark );
}
.seb-ber-section .seb-ber-button--white .wp-block-button__link:hover {
	border-color: #fff;
	background: var( --seb-ber-tint );
	color: var( --seb-ber-dark );
}
