/*
Theme Name: Praxis Hornbach
Theme URI: https://www.praxis-hornbach.de/
Author: Zahnarztpraxis Dr. Manfred Hornbach
Description: Schlankes Block-Theme (Full Site Editing) für die Zahnarztpraxis Dr. Manfred Hornbach in Tübingen. Ohne Page-Builder, ohne Plugin-Abhängigkeiten, Schriften lokal eingebunden, keine externen Requests im Frontend.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: praxis-hornbach
Tags: block-patterns, full-site-editing, accessibility-ready, one-column, custom-colors
*/

/*
 * Die meisten Stile kommen aus theme.json. Hier nur, was theme.json
 * (noch) nicht abbilden kann: Skip-Link, Fokuszustände, Mobil-Anrufleiste,
 * Tabellen-Feinschliff, Kachel-Hover.
 */

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

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Fokus (WCAG 2.4.7) ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--fokus);
	outline-offset: 3px;
	border-radius: 4px;
}
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--fokus);
	outline-offset: 3px;
}

/* ---------- Skip-Link ---------- */
.skip-link.screen-reader-text:focus,
.ph-skip-link:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--petrol-dunkel);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	border-radius: 6px;
}

/* ---------- Header ---------- */
.ph-header {
	border-bottom: 1px solid var(--wp--preset--color--linie);
}
.ph-header .wp-block-site-title a { text-decoration: none; }
.ph-brand-sub {
	margin: 0;
	line-height: 1.2;
}
.ph-header .wp-block-navigation a:hover,
.ph-header .wp-block-navigation a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}
.ph-header .wp-block-navigation .current-menu-item > a,
.ph-header .wp-block-navigation [aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.35em;
}
.ph-header-phone a { white-space: nowrap; }

/* Telefon im Header nur ab Tablet; mobil übernimmt die Anrufleiste */
@media (max-width: 781px) {
	.ph-header-phone { display: none !important; }
}

/* ---------- Mobile Anrufleiste (unten fixiert) ---------- */
.ph-callbar { display: none; }
@media (max-width: 781px) {
	.ph-callbar {
		display: flex;
		position: fixed;
		inset: auto 0 0 0;
		z-index: 50;
		gap: 0;
		margin: 0 !important;
		padding: 0 !important;
		background: var(--wp--preset--color--petrol-dunkel);
		box-shadow: 0 -2px 12px rgba(9, 63, 67, 0.25);
	}
	.ph-callbar p { margin: 0; flex: 1 1 50%; }
	.ph-callbar a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 56px;
		color: #fff;
		font-weight: 600;
		text-decoration: none;
	}
	.ph-callbar p + p a { border-left: 1px solid rgba(255,255,255,0.25); }
	body { padding-bottom: 56px; }
}

/* ---------- Kacheln ---------- */
.ph-kachel {
	height: 100%;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ph-kachel:hover { box-shadow: 0 8px 24px rgba(13, 92, 97, 0.12); }
.ph-kachel h3 a, .ph-kachel h2 a { text-decoration: none; }
.ph-kachel h3 a:hover, .ph-kachel h2 a:hover { text-decoration: underline; }
.ph-kacheln > .wp-block-column { display: flex; }
.ph-kacheln > .wp-block-column > * { flex: 1; }

.ph-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin: 0 0 0.75rem;
	border-radius: 999px;
	background: var(--wp--preset--color--tuerkis-hell);
	color: var(--wp--preset--color--petrol);
	font-size: 1.4rem;
	line-height: 1;
}

/* ---------- Hinweisboxen ---------- */
.ph-hinweis { border-left: 6px solid var(--wp--preset--color--petrol); }
.ph-hinweis--notdienst { border-left-color: var(--wp--preset--color--signal); }
.ph-hinweis p:last-child { margin-bottom: 0; }

/* ---------- Tabellen ---------- */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th,
.wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--linie);
	padding: 0.85rem 0.75rem;
	text-align: left;
	vertical-align: top;
}
.wp-block-table thead th {
	border-bottom: 2px solid var(--wp--preset--color--petrol);
	font-weight: 600;
}
.wp-block-table tbody th { font-weight: 600; width: 34%; }
.ph-zeiten td { font-variant-numeric: tabular-nums; }
.ph-zeiten--kurz td,
.ph-zeiten--kurz th {
	padding: 0.35rem 0.5rem 0.35rem 0;
	border-bottom-color: rgba(255,255,255,0.18);
}

/* ---------- Galerie ---------- */
.wp-block-gallery.ph-galerie figure.wp-block-image { border-radius: 10px; overflow: hidden; }
.wp-block-gallery.ph-galerie figure.wp-block-image figcaption {
	background: linear-gradient(0deg, rgba(9, 63, 67, 0.88), rgba(9, 63, 67, 0.55) 70%, transparent);
	font-size: var(--wp--preset--font-size--klein);
	padding: 2rem 0.75rem 0.6rem;
}
.ph-bild-rund img { border-radius: 12px; }

/* ---------- Footer ---------- */
.ph-footer a { color: inherit; }
.ph-footer a:hover { text-decoration-thickness: 2px; }
.ph-footer h2 { color: #fff; }

/* ---------- TODO-Markierung (nur im Editor-/Vorschau-Kontext sichtbar machen) ---------- */
.ph-todo {
	border: 2px dashed var(--wp--preset--color--signal);
	padding: 0.75rem 1rem;
	border-radius: 6px;
	background: #fff6f3;
}

/* ---------- Formular-/Linkdetails ---------- */
a[href^="tel:"] { white-space: nowrap; }
.screen-reader-text:not(:focus) {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* ---------- Überschriften: deutsche Silbentrennung statt hartem Umbruch ---------- */
h1, h2, h3, .wp-block-site-title {
	hyphens: auto;
	-webkit-hyphens: auto;
	overflow-wrap: normal;
	text-wrap: balance;
}
.ph-hero .wp-block-buttons { gap: 0.75rem; }
.ph-hinweis.has-border-color { border-left-width: 6px !important; border-left-color: var(--wp--preset--color--petrol) !important; }
.ph-hinweis--notdienst.has-border-color { border-left-color: var(--wp--preset--color--signal) !important; }
.ph-header .wp-block-navigation { font-size: 1.0625rem; }
.ph-header .wp-block-navigation__container { flex-wrap: nowrap; }
.ph-header .wp-block-navigation-item { white-space: nowrap; }
@media (min-width: 600px) and (max-width: 1180px) {
	.ph-header .alignwide { flex-wrap: wrap !important; row-gap: 0.75rem; }
	.ph-header .ph-brand-sub { display: none; }
	.ph-header .wp-block-navigation { font-size: 1rem; }
	.ph-header .wp-block-navigation__container { gap: 0.9rem !important; flex-wrap: wrap; }
}
