/*
Theme Name: Therapist Site
Theme URI: https://xn--hhn-psychotherapie-d3b.de/
Author: Christian Lindemeier
Author URI: https://xn--hhn-psychotherapie-d3b.de/
Description: A calm, elegant WordPress theme for therapists, counselors, and private practices.
Version: 3.3.0
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: therapist-site
*/

/*
 * Fonts are never downloaded. The stack below only ever resolves to a face
 * that is already installed on the visitor's device, so no request leaves the
 * browser to fetch one and there is nothing to consent to.
 *
 * Do NOT "fix" the Inter reference by adding a fonts.googleapis.com link:
 * that sends the visitor's IP address to Google before they have agreed to
 * anything, which is the single most warned-about mistake on German sites.
 * If the practice wants Inter specifically, download it and serve the files
 * from this theme instead. Therapist Site Core actively blocks remote font
 * hosts, so a CDN link would be stripped out anyway.
 */
:root {
	--font-stack: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui,
		-apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

	/*
	 * Spacing scale. These are the only two values the breakpoints below
	 * change, so page padding and card padding stay in step with each other
	 * instead of being overridden rule by rule.
	 */
	--gutter: 24px;
	--card-padding: 32px;

	--bg: #f6f3ef;
	--surface: #ffffff;
	--surface-soft: #fdfaf7;
	--text: #2e2a27;
	--muted: #6f655f;
	--accent: #7f9c96;
	--accent-dark: #5f7f78;
	--border: #e8dfd7;

	/*
	 * Link and focus colours. With --text and --muted, these are the four
	 * colours the Customizer's page and section backgrounds recalculate, so
	 * text on a chosen background stays readable (inc/colors.php). The
	 * --surface-* copies hold the defaults for cards, which reset to them.
	 */
	--link: var(--accent-dark);
	--focus: var(--accent-dark);
	--surface-text: var(--text);
	--surface-muted: var(--muted);
	--surface-link: var(--accent-dark);
	--shadow: 0 18px 40px rgba(46, 42, 39, 0.08);
	--radius: 20px;
	--container: 1120px;
	--space: 24px;
}

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

html {
	scroll-behavior: auto;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	font-family: var(--font-stack);
	background: linear-gradient(180deg, #f8f4ef 0%, #f3eee7 100%);
	color: var(--text);
	line-height: 1.65;
}

/* Form controls default to the browser's own UI font, not the page font. */
input,
textarea,
select,
button {
	font-family: inherit;
	font-size: inherit;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

/*
 * Images aligned and captioned in the Classic editor, e.g. in imported posts.
 * Block images bring their own, more specific styles and are unaffected.
 */
.alignleft {
	float: left;
	margin: 0.4em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.4em 0 1em 1.5em;
}

.aligncenter {
	margin-right: auto;
	margin-left: auto;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
}

.wp-caption img {
	margin-bottom: 0.5em;
}

.wp-caption-text,
.gallery-caption {
	color: var(--muted);
	font-size: 0.9375rem;
}

/* Keeps a floated image inside the card when the text beside it is short. */
.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

a {
	color: var(--link);
	text-decoration: none;
}

/*
 * theme.json gives headings the palette's text colour directly. Tying them to
 * --text instead (the same colour by default) lets them follow a chosen page
 * or section background like the rest of the text.
 */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text);
}

/*
 * Cards and controls sit on their own light surface, so they keep the default
 * text colours whatever background the page or section around them is given.
 * This is also what keeps the crisis notice dark-on-light.
 */
.hero-card,
.section-card,
.content-card,
.ts-editor-note,
.ts-crisis-notice,
.menu-toggle,
.ts-availability-badge a,
.search-field,
.pagination .page-numbers,
.skip-link {
	--text: var(--surface-text);
	--muted: var(--surface-muted);
	--link: var(--surface-link);
}

/*
 * Focus rings on the containers are drawn against their own surface. Controls
 * are left out: their ring is drawn outside them, on the page background.
 */
.hero-card,
.section-card,
.content-card,
.ts-editor-note,
.ts-crisis-notice {
	--focus: var(--surface-link);
}

/* Re-resolves the inherited text colour against the reset above. */
.hero-card,
.section-card {
	color: var(--text);
}

a:hover,
a:focus {
	text-decoration: underline;
}

.site-header-wrap {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(14px);
	background: rgba(248, 244, 239, 0.88);
	border-bottom: 1px solid rgba(232, 223, 215, 0.8);
}

.site-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	max-width: var(--container);
	margin: 0 auto;
	padding: 18px var(--gutter);
	position: relative;
}

.site-branding {
	display: flex;
	align-items: center;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	text-align: center;
}

.custom-logo-link {
	display: block;
	flex: 0 0 auto;
}

.custom-logo {
	width: auto;
	max-width: 160px;
	height: 56px;
}

.site-title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.site-title a {
	color: var(--text);
}

.main-navigation {
	position: absolute;
	right: var(--gutter);
}

.main-navigation ul,
.footer-menu ul,
.ts-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-navigation ul {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
}

.main-navigation a,
.footer-menu a {
	color: var(--text);
	font-weight: 500;
}

.main-navigation a[aria-current='page'] {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	min-height: 44px;
	font: inherit;
	font-weight: 600;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--text);
	border-radius: 2px;
}

.menu-toggle-bars {
	position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
	position: absolute;
	left: 0;
	content: '';
}

.menu-toggle-bars::before {
	top: -6px;
}

.menu-toggle-bars::after {
	top: 6px;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-bars {
	background: transparent;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-bars::before {
	top: 0;
	transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-toggle-bars::after {
	top: 0;
	transform: rotate(-45deg);
}

.hero {
	/* Fluid vertical rhythm: no breakpoint needed to stop the hero
	   eating a whole phone screen before the headline appears. */
	padding: clamp(40px, 8vw, 72px) var(--gutter) 40px;
}

.hero-grid,
.section-inner,
.site-footer {
	max-width: var(--container);
	margin: 0 auto;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 36px;
	align-items: center;
}

/* No practice photo yet: one column, kept to a readable line length. */
.hero-grid--text-only {
	grid-template-columns: minmax(0, 1fr);
}

.hero-grid--text-only .hero-copy {
	max-width: 46rem;
}

.hero-copy h1 {
	margin: 0 0 18px;
	font-size: clamp(2.2rem, 6vw, 4.2rem);
	line-height: 1.05;
	letter-spacing: -0.04em;
}

/*
 * Article and legal page titles sit in a 860px column, so they scale on a
 * much smaller ramp than the hero. Sharing the hero's clamp made a blog post
 * title render at ~67px on a desktop.
 */
.content-card h1,
.legal-content h1 {
	margin: 0 0 18px;
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -0.03em;
}

.hero-copy p,
.section-lead,
.content-card,
.legal-content {
	font-size: 1.08rem;
	color: var(--muted);
}

.hero-card,
.section-card,
.content-card {
	padding: var(--card-padding);
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.hero-card--empty {
	padding: 48px var(--gutter);
	background: var(--surface-soft);
	border: 1px dashed var(--border);
	border-radius: calc(var(--radius) - 6px);
	text-align: center;
	color: var(--muted);
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 22px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 10px 22px rgba(127, 156, 150, 0.22);
}

.button:hover,
.button:focus {
	background: var(--accent-dark);
	text-decoration: none;
}

.section {
	padding: 24px var(--gutter) clamp(24px, 5vw, 40px);
}

.section-card h2,
.legal-content h2 {
	margin-top: 0;
	font-size: clamp(1.5rem, 4.5vw, 2rem);
	letter-spacing: -0.03em;
	color: var(--text);
}

.service-grid,
.testimonial-grid,
.practice-grid,
.ts-service-shortcode {
	display: grid;
	gap: 20px;
}

.service-grid,
.testimonial-grid,
.practice-grid {
	/*
	 * auto-fit rather than a fixed three columns, so the grid reflows
	 * continuously — three across on a desktop, two on a tablet, one on a
	 * phone — instead of jumping straight from three to one at a single
	 * breakpoint. min() keeps the track from overflowing viewports narrower
	 * than the 280px minimum.
	 */
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.service-item,
.testimonial-item,
.practice-item {
	padding: 22px;
	background: var(--surface-soft);
	border: 1px solid var(--border);
	border-radius: 18px;
}

.service-item h3,
.testimonial-item h3,
.practice-item h3 {
	margin-top: 0;
	margin-bottom: 12px;
	color: var(--text);
}

/*
 * A testimonial is a quotation, and now that there is an attribution to attach
 * to it, it is marked up as one. Resetting the margin is what keeps that
 * change invisible: browsers indent a blockquote by 40px, which the plain div
 * this replaced was not.
 */
.testimonial-quote {
	margin: 0;
}

.testimonial-quote > :first-child {
	margin-top: 0;
}

.testimonial-quote > :last-child {
	margin-bottom: 0;
}

.testimonial-attribution {
	margin-top: 12px;
	margin-bottom: 0;
	color: var(--muted);
	font-size: 0.9375rem;
}

/*
 * The dash is decoration, so it lives in CSS rather than in a translatable
 * string, and cite is un-italicised because a person's initials are not a
 * title of work — which is the only thing the browser default styling suits.
 */
.testimonial-attribution::before {
	content: "— ";
}

.testimonial-attribution cite {
	font-style: normal;
}

.content-area {
	padding: clamp(28px, 6vw, 48px) var(--gutter);
}

.content-inner {
	max-width: 860px;
	margin: 0 auto;
}

.legal-content hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 32px 0;
}

.legal-details {
	margin: 0 0 24px;
}

.legal-details dt {
	margin-top: 18px;
	font-weight: 600;
	color: var(--text);
}

.legal-details dd {
	margin: 4px 0 0;
}

.ts-contact-list li + li {
	margin-top: 8px;
}

.ts-contact-form {
	margin-top: 24px;
}

.ts-consent {
	margin-top: 18px;
	font-size: 0.95rem;
}

.ts-fees {
	margin: 0;
}

.ts-fees dt {
	margin-top: 18px;
	font-weight: 600;
	color: var(--text);
}

.ts-fees dd {
	margin: 4px 0 0;
}

.ts-fees-note {
	margin-top: 24px;
}

.ts-availability-badge {
	margin: 18px 0 0;
	font-size: 0.95rem;
}

.ts-availability-badge a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
}

/* The dot is decorative; the badge text carries the meaning. */
.ts-availability-badge a::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--muted);
}

.ts-availability--available.ts-availability-badge a::before,
.ts-availability--short_wait.ts-availability-badge a::before {
	background: var(--accent);
}

.ts-availability--waitlist.ts-availability-badge a::before {
	background: #c9a36b;
}

.ts-phone-hours {
	margin-top: 18px;
}

.ts-availability {
	margin-top: 24px;
	padding: 16px 20px;
	font-size: 0.95rem;
	background: var(--surface-soft);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: 14px;
}

.ts-availability p {
	margin: 0 0 10px;
}

.ts-availability > :last-child {
	margin-bottom: 0;
}

.ts-availability__title {
	color: var(--text);
}

.ts-availability__date {
	color: var(--muted);
	font-size: 0.9rem;
}

.ts-crisis-notice {
	margin-top: 24px;
	padding: 16px 20px;
	font-size: 0.95rem;
	background: var(--surface-soft);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent-dark);
	border-radius: 14px;
}

.ts-crisis-notice p,
.ts-crisis-notice ul {
	margin: 0 0 10px;
}

.ts-crisis-notice > :last-child {
	margin-bottom: 0;
}

.ts-crisis-notice__title {
	color: var(--text);
}

.ts-editor-note {
	margin-top: 18px;
	padding: 14px 18px;
	font-size: 0.95rem;
	color: var(--muted);
	background: var(--surface-soft);
	border: 1px dashed var(--border);
	border-radius: 14px;
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
	border-radius: 4px;
}

.button:focus-visible,
.search-submit:focus-visible,
.menu-toggle:focus-visible {
	outline-offset: 4px;
}

.search-form {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin: 24px 0 8px;
}

.search-field {
	flex: 1 1 220px;
	min-width: 0;
	padding: 13px 18px;
	font: inherit;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
}

.search-field::placeholder {
	color: var(--muted);
}

.search-submit {
	flex: 0 0 auto;
	border: 0;
	font: inherit;
	cursor: pointer;
}

.search-results {
	margin-top: 32px;
}

.entry-title + * {
	margin-top: 12px;
}

.search-result + .search-result {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--border);
}

.entry-title,
.search-result h2 {
	margin: 0;
	font-size: 1.5rem;
	letter-spacing: -0.02em;
}

.entry-title a,
.search-result h2 a {
	color: var(--text);
}

.entry-meta {
	margin-top: 8px;
	color: var(--muted);
	font-size: 0.9375rem;
}

.entry-header + .entry-content {
	margin-top: 28px;
}

.entry-tags {
	margin: 28px 0 0;
	color: var(--muted);
	font-size: 0.9375rem;
}

.page-header {
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border);
}

.archive-description {
	margin-top: 12px;
	color: var(--muted);
}

.post-list-item + .post-list-item {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--border);
}

.page-links {
	margin-top: 24px;
}

.post-navigation {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.post-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
}

.post-navigation .nav-next {
	margin-left: auto;
	text-align: right;
}

.post-navigation a {
	display: block;
	padding: 8px 0;
}

.post-navigation .nav-label {
	display: block;
	color: var(--muted);
	font-size: 0.875rem;
}

.post-navigation .nav-title {
	display: block;
	font-weight: 600;
}

.service-cta {
	margin-top: 32px;
}

.related-services {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.related-services h2 {
	margin: 0 0 12px;
	font-size: 1.125rem;
}

.related-services ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.related-services a {
	display: block;
	padding: 8px 0;
}

.error-404-actions {
	margin-top: 28px;
}

.pagination {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.pagination .nav-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
	background: var(--surface-soft);
	text-decoration: none;
}

.pagination .page-numbers.current {
	color: #fff;
	background: var(--accent);
	border-color: var(--accent);
}

.pagination .page-numbers.dots {
	min-width: 0;
	padding: 0 4px;
	background: none;
	border: 0;
}

.site-footer-wrap {
	padding: 32px var(--gutter) 48px;
}

.site-footer {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	border-top: 1px solid var(--border);
	padding-top: 24px;
	color: var(--muted);
}

.footer-menu ul {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
}

.skip-link:focus {
	position: absolute;
	left: 24px;
	top: 24px;
	z-index: 1000;
	padding: 12px 16px;
	background: #fff;
	border-radius: 12px;
	box-shadow: var(--shadow);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/*
 * Breakpoints. The card grids and most spacing are fluid, so these only
 * handle the changes that genuinely cannot be expressed as a clamp() or an
 * auto-fit track: the navigation switching to a toggle, and the two-column
 * hero collapsing.
 */

/* Tablets: tighten the gutter before the layout has to change shape. */
@media (max-width: 1024px) {
	:root {
		--gutter: 20px;
		--card-padding: 28px;
	}
}

@media (max-width: 900px) {
	.site-header {
		flex-direction: column;
	}

	.main-navigation {
		position: static;
		width: 100%;
	}

	/* Collapsible behaviour is opt-in: without JS the menu stays visible. */
	.nav-js .menu-toggle {
		display: inline-flex;
	}

	.nav-js .menu-container {
		display: none;
		width: 100%;
		margin-top: 16px;
	}

	.nav-js .menu-container.is-open {
		display: block;
	}

	.nav-js .menu-container ul {
		flex-direction: column;
		gap: 4px;
	}

	.nav-js .menu-container a {
		display: block;
		padding: 12px 4px;
	}

	.hero-grid {
		grid-template-columns: 1fr;
	}
}

/* Large phones and small tablets. */
@media (max-width: 600px) {
	:root {
		--gutter: 16px;
		--card-padding: 22px;
	}

	/* Too narrow for text beside an image. */
	.alignleft,
	.alignright {
		float: none;
		margin: 0 auto 1em;
	}

	.site-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.hero-grid,
	.service-grid,
	.testimonial-grid,
	.practice-grid {
		gap: 16px;
	}

	.hero-copy p,
	.section-lead,
	.content-card,
	.legal-content {
		font-size: 1rem;
	}

	.post-navigation .nav-links {
		flex-direction: column;
		gap: 8px;
	}

	.post-navigation .nav-next {
		margin-left: 0;
		text-align: left;
	}
}

/* Small phones: the gutter is a meaningful share of the screen here. */
@media (max-width: 400px) {
	:root {
		--gutter: 14px;
		--card-padding: 18px;
	}

	.site-title {
		font-size: 1.2rem;
	}

	.hero-card--empty {
		padding: 32px var(--gutter);
	}

	/* Full-width so the tap target is not a narrow pill on a narrow screen. */
	.button {
		display: flex;
		width: 100%;
	}
}
