/*
Theme Name: Praxis Lehmann
Theme URI: https://zahnarztpraxis-lehmann-lübben.de
Author: Zahnarztpraxis Lehmann
Description: Block-Theme für die Zahnarztpraxis Sandra Lehmann in Lübben (Spreewald). Mobil zuerst, ruhig, sachlich, schnell. Design zentral in theme.json.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: praxis-lehmann
*/

/*
 * Nur, was theme.json nicht abbilden kann. Farben, Schrift und Abstände
 * kommen ausschließlich aus den Presets (var(--wp--preset--…)).
 */

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Sichtbarer Tastaturfokus */
:where(a, button, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--slate);
	outline-offset: 3px;
	border-radius: 4px;
}
.is-dark-section :where(a, button, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--sand);
}

/* Anker-Ziele (#anfahrt usw.) nicht am Rand kleben lassen */
[id] { scroll-margin-top: 1rem; }

/* Dunkle Flächen: Links erben die Textfarbe */
.is-dark-section a:where(:not(.wp-element-button)) { color: inherit; }
/* Kopfzeile: Zeichen und Name nebeneinander */
.brand .wp-block-site-logo img { display: block; height: auto; }
.is-dark-section a:where(:not(.wp-element-button)):hover { text-decoration: none; }

/* Info-Karten (Öffnungszeiten, Anfahrt, Leistungen) */
.is-card {
	border-radius: 1.5rem;
	box-shadow: 0 1px 2px rgb(47 55 71 / 0.06), 0 8px 24px rgb(47 55 71 / 0.06);
}

/* Öffnungszeiten-Tabelle */
.wp-block-table.hours-table table { border-collapse: collapse; width: 100%; }
.wp-block-table.hours-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--sand);
	padding: 0.6rem 0;
	vertical-align: baseline;
}
.wp-block-table.hours-table tr:last-child td { border-bottom: 0; }
.wp-block-table.hours-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }

/* Grids füllen die Zeile (auto-fit statt auto-fill: keine leeren Restspalten) */
.wp-block-group.is-layout-grid.grid-fit {
	grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}

/* Akzentlinie über Textblöcken */
.accent-top { border-top: 4px solid var(--wp--preset--color--green); }

/* Vollflächige Bereiche stoßen ohne Lücke aneinander */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Akzentlinie links (Leitgedanken) */
.accent-left { border-left: 4px solid var(--wp--preset--color--green); padding-left: 1.25rem; }
.accent-left > h3 { margin-block-start: 0; }

/* Auf grünem Grund: Überschriften und Outline-Buttons in Tannengrün (Kontrast) */
.has-green-background-color :is(h1, h2, h3, h4) { color: var(--wp--preset--color--forest); }
.has-green-background-color .is-style-outline .wp-block-button__link { color: var(--wp--preset--color--forest); }
.has-green-background-color .is-style-outline .wp-block-button__link:hover,
.has-green-background-color .is-style-outline .wp-block-button__link:focus {
	background: var(--wp--preset--color--forest);
	border-color: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--white);
}
/* Karten auf grünem Grund behalten die normalen Farben */
.is-card :is(h1, h2, h3, h4) { color: var(--wp--preset--color--sage-dark); }
.is-card .is-style-outline .wp-block-button__link { color: var(--wp--preset--color--sage-dark); }
.is-card .is-style-outline .wp-block-button__link:hover,
.is-card .is-style-outline .wp-block-button__link:focus {
	background: var(--wp--preset--color--sage-dark);
	border-color: var(--wp--preset--color--sage-dark);
	color: var(--wp--preset--color--white);
}

/* Foto mit überlappender Karte (Einstieg, Praxis) */
.hero-media { position: relative; }
.hero-media > .wp-block-image { margin: 0; }
.hero-media > .wp-block-image img { display: block; width: 100%; }
.hero-media > .hero-card { position: relative; margin: -3rem 1rem 0; }
.focus-right img { object-position: 68% 50%; }
@media (min-width: 782px) {
	/* Karte bleibt innerhalb der Bildspalte: nichts ragt in Text oder Seitenrand */
	.hero-media > .hero-card { position: absolute; left: 1.25rem; bottom: -2.25rem; margin: 0; width: min(20rem, 86%); }
	.hero-media > .hero-card.card-inside { bottom: 1.25rem; }
}

/* Kleine Kennzeile über Überschriften */
.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
}

/* Kopfleiste: Telefon erst ab Tablet-Breite */
@media (max-width: 599px) {
	.topbar-phone,
	.wp-block-buttons.header-cta { display: none; }
}

/* Mobile Aktionsleiste (Anrufen / Anfahrt) */
.mobile-bar { display: none; }

@media (max-width: 781px) {
	.mobile-bar {
		display: block;
		position: fixed;
		inset: auto 0 0 0;
		z-index: 50;
		padding: 0.6rem var(--wp--preset--spacing--40) calc(0.6rem + env(safe-area-inset-bottom, 0px));
		background: var(--wp--preset--color--base);
		box-shadow: 0 -4px 16px rgb(47 55 71 / 0.12);
	}
	.mobile-bar .wp-block-buttons { flex-wrap: nowrap; gap: 0.6rem; }
	.mobile-bar .wp-block-button { flex: 1 1 0; }
	.mobile-bar .wp-block-button__link { width: 100%; text-align: center; padding-inline: 0.75rem; }
	body { padding-bottom: 4.5rem; }
}
