/*
Theme Name: Gsundheits-Praxis
Theme URI: https://www.gsundheits-praxis.ch
Author: Maria Martin
Description: Block-Theme für die Gsundheits-Praxis Maria Martin (Wirbelsäulen- und Gelenktherapie) im Stil der bisherigen Website: Open Sans Light, Praxisgrün, Menüband. Ohne externe Schriften, ohne Tracking, ohne Page-Builder.
Version: 1.2.4
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gsundheits-praxis
*/

:root {
	--gp-radius: 8px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
/* ---------- Typografie und Grundfarben (zentral an einer Stelle) ----------
   Schrift: Systemschrift mit echtem "Light"-Schnitt (Helvetica Neue auf Apple, Segoe UI auf Windows, Roboto auf Android).
   Wer Open Sans lokal installiert hat, setzt "Open Sans" vorne in --gp-font. */
:root {
	--gp-font: "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
	--gp-green: #98C65F;
	--gp-link: #4F7A23;
	--gp-text: #262626;
	--gp-bg: #F4F4F4;
	--gp-band: #E7ECD9;
}
:root body[class] { background: var(--gp-bg); }
body .wp-site-blocks {
	font-family: var(--gp-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.65;
	color: var(--gp-text);
}
body .wp-site-blocks :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title) {
	font-family: var(--gp-font);
	font-weight: 300;
	line-height: 1.25;
	letter-spacing: -.005em;
}
body .wp-site-blocks :is(h1, h2, .wp-block-post-title) { color: var(--gp-green); }
body .wp-site-blocks :is(h3, h4) { color: var(--gp-text); }
body .wp-site-blocks .wp-block-navigation,
body .wp-site-blocks .wp-block-button__link,
body .wp-site-blocks :is(input, textarea, select, button) { font-family: var(--gp-font); }
img { height: auto; }
strong, b { font-weight: 600; }

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--gp-link);
	outline-offset: 3px;
}

/* ---------- Kopfbereich ---------- */
.gp-header-top { padding-block: 1.75rem; gap: 1.5rem 2.5rem; }
.gp-header { background: var(--gp-bg); }
.gp-brand { gap: 1.5rem; align-items: center; flex: 1 1 32rem; min-width: 0; }
.gp-brand .wp-block-site-logo { flex: 0 0 auto; }
.gp-brand .wp-block-site-logo img { max-width: 190px; height: auto; }
.gp-brand .gp-site-title {
	margin: 0;
	font-size: clamp(1.9rem, 3.2vw, 2.9rem);
	font-weight: 300;
	line-height: 1.1;
	color: var(--gp-green);
}
.gp-brand .gp-site-title a { color: inherit; text-decoration: none; }
.gp-brand .gp-site-tagline {
	margin: .7rem 0 0;
	font-size: clamp(1.05rem, 1.6vw, 1.4rem);
	font-weight: 400;
	color: var(--gp-text);
}

.gp-contact { text-align: right; flex: 0 0 auto; margin-left: auto; }
.gp-contact p { margin: 0 0 .5rem; line-height: 1.5; }
.gp-contact .gp-contact-addr { font-weight: 400; color: var(--wp--preset--color--ink); }
.gp-contact .gp-contact-links { font-weight: 400; line-height: 1.65; }
.gp-contact .gp-contact-links a { color: var(--wp--preset--color--primary); text-decoration: none; }
.gp-contact .gp-contact-links a:hover { color: var(--gp-link); }
.gp-contact-buttons { margin-top: .75rem; gap: .9rem; }

/* Menüband */
.gp-menuband { background: var(--gp-band); }
.gp-menuband .wp-block-navigation { --navigation-layout-gap: 2.25rem; }
.gp-menuband .wp-block-navigation-item__content { padding-block: 1rem; }
.gp-menuband .wp-block-navigation .current-menu-item > a,
.gp-menuband .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--primary); }
.wp-block-navigation .wp-block-navigation__submenu-container {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--gp-radius);
	padding: .4rem;
	min-width: 19rem;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .55rem .8rem; }
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--mist); }
@media (min-width: 601px) {
	.gp-menuband .wp-block-navigation__container { flex-wrap: wrap; row-gap: 0; justify-content: center; }
}
@media (max-width: 1100px) {
	.gp-contact { text-align: left; width: 100%; margin-left: 0; }
	.gp-contact-buttons.is-vertical { flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 1000px) {
	.gp-menuband .wp-block-navigation { --navigation-layout-gap: 1rem; font-size: .95rem; }
}
@media (max-width: 782px) {
	.gp-header-top { padding-block: 1.25rem; }
	.gp-brand { flex-wrap: wrap; }
	.gp-brand .wp-block-site-logo img { max-width: 110px; }
	.gp-brand .gp-site-title { font-size: 2rem; }
}

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .15s ease; }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary-dark);
	border: 2px solid var(--wp--preset--color--primary);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--primary); color: #fff; }

/* ---------- Inhalt ---------- */
.gp-sub { margin: -.25rem 0 0; font-size: 1.4rem; font-weight: 400; color: var(--wp--preset--color--ink); }
.wp-block-separator { border-width: 0 0 1px; opacity: .65; margin-block: 1.25rem; }
.gp-photo { margin: 0; }
.gp-photo img { width: 100%; border-radius: 2px; }
/* leere Bild-Platzhalter nur im Frontend verstecken, im Editor bleiben sie sichtbar */
body:not(.editor-styles-wrapper) figure.gp-photo:not(:has(img[src])),
body:not(.editor-styles-wrapper) figure.gp-card-img:not(:has(img[src])) { display: none; }

.gp-badges { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.gp-badges a {
	display: inline-block;
	padding: .3rem .9rem;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 99px;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .06em;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.gp-badges a:hover { background: var(--wp--preset--color--mist); }
.wp-block-heading a { text-decoration: none; }
.wp-block-heading a:hover { text-decoration: underline; }

/* Methoden-Karten */
.gp-cards { gap: 1.5rem; }
.gp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .6rem;
	height: 100%;
	min-width: 0;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--gp-radius);
	padding: 1.25rem;
	transition: border-color .15s ease;
}
.gp-card:hover { border-color: var(--wp--preset--color--primary); }
.gp-card-img { margin: 0 0 .25rem; }
.gp-card-img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 2px; }
.gp-card h3 { margin: 0; font-size: 1.125rem; font-weight: 400; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.gp-card h3 a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gp-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* ganze Karte klickbar */
.editor-styles-wrapper .gp-card h3 a::after { display: none; }
.gp-card p { margin: 0; font-size: .95rem; }
.gp-card .gp-more { margin-top: auto; padding-top: .6rem; font-weight: 600; color: var(--gp-link); }
.gp-card .gp-more::after { content: " →"; }

.gp-find { background: var(--gp-band); }
body .wp-site-blocks .gp-find :is(h2, .wp-block-heading) { color: var(--gp-link); }

/* ---------- Unterseiten ---------- */
.gp-page-head { padding-bottom: 0 !important; }
.gp-aside {
	position: sticky;
	top: 1.5rem;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--gp-radius);
	padding: 1.5rem;
}
body .wp-site-blocks .gp-aside h2 { font-size: 1.4rem; margin: 0 0 .5rem; }
.gp-aside p { margin: 0 0 .5rem; }
.wp-block-post-content :where(ul, ol) { padding-left: 1.25rem; }
.wp-block-post-content li { margin-block: .25rem; }
.wp-block-post-featured-image img { border-radius: 2px; }

/* ---------- Fussbereich ---------- */
.gp-footer { background: #FFFFFF; color: var(--wp--preset--color--ink); }
body .wp-site-blocks .gp-footer h2 { color: var(--wp--preset--color--ink); font-size: 1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .75rem; }
.gp-footer p { margin: 0 0 .4rem; }
.gp-footer a { color: var(--gp-link); }
.gp-footer .gp-badges a { color: var(--wp--preset--color--ink); }
.gp-footer-legal { border-top: 1px solid var(--wp--preset--color--line); font-size: .8125rem; color: var(--wp--preset--color--muted); }
.gp-footer-legal p { margin: 0; }

/* ---------- Formulare ---------- */
input[type="search"], input[type="text"], input[type="email"], input[type="tel"], textarea, select {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--gp-radius);
	padding: .6rem .8rem;
	background: #fff;
	font: inherit;
}

/* ---------- Verbesserungen 1.2 ---------- */

/* Startseite: Ohne Foto nutzt der Text die volle Breite statt eine leere Spalte zu lassen */
.wp-block-column:has(> figure.gp-photo:not(:has(img[src]))) { display: none; }
body:not(.editor-styles-wrapper) .gp-intro:not(:has(figure.gp-photo img[src])) > .wp-block-column:first-child { flex-basis: 100% !important; max-width: 46rem; }
.wp-block-column > .gp-photo img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Unterseiten: dünne Linie unter dem Titel wie auf der alten Seite */
.gp-page-head .wp-block-post-title { padding-bottom: .75rem; border-bottom: 1px solid #c9ceba; }

/* Abschnitte: etwas mehr Luft zwischen Überschrift und Inhalt */
.wp-site-blocks main h2.wp-block-heading { margin-bottom: 1.25rem; }

/* Fliesstext in breiten Spalten nicht zu lang ziehen */
.wp-block-post-content p, .wp-block-post-content li { max-width: 68ch; }

/* Methoden-Karten: Titel und Text sauber trennen, Link-Pfeil rechtsbündig */
.gp-card .gp-more { display: flex; justify-content: space-between; }
.gp-card .gp-more::after { content: "→"; }

/* Tablet: Menü in einer Zeile */
@media (max-width: 1000px) {
	.gp-menuband .wp-block-navigation__container { column-gap: .9rem; }
	.gp-menuband .wp-block-navigation-item__content { font-size: .92rem; }
}

/* Handy: Kopfbereich deutlich kompakter */
@media (max-width: 782px) {
	.gp-header-top { gap: 1rem; }
	.gp-brand { flex-wrap: nowrap; gap: 1rem; }
	.gp-brand .wp-block-site-logo img { max-width: 72px; }
	.gp-brand .gp-site-title { font-size: 1.55rem; }
	.gp-brand .gp-site-tagline { display: none; }
	.gp-contact .gp-contact-addr { display: none; }
	.gp-contact .gp-contact-links { margin-bottom: .75rem; }
	.gp-contact-buttons.is-vertical { flex-direction: row; flex-wrap: wrap; gap: .6rem; }
	.gp-contact-buttons .wp-block-button__link { padding: .55rem 1rem; font-size: .95rem; }
}

/* Menüfarben gegen im Editor gespeicherte Stile absichern */
body .wp-site-blocks .gp-menuband .wp-block-navigation :is(a, .wp-block-navigation-item__content) { color: var(--gp-text); }
body .wp-site-blocks .gp-menuband .wp-block-navigation :is(a, .wp-block-navigation-item__content):hover,
body .wp-site-blocks .gp-menuband .wp-block-navigation :is(a[aria-current="page"], .current-menu-item > a) { color: var(--gp-link); }

/* Medien-Kästchen (Report / Interview) */
.gp-press {
	position: relative;
	height: 100%;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--gp-radius);
	padding: 1.1rem 1.35rem;
	transition: border-color .15s ease;
}
.gp-press:hover { border-color: var(--gp-green); }
.gp-press .gp-press-title { margin: 0; font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.gp-press .gp-press-title a { color: var(--gp-text); text-decoration: none; }
.gp-press .gp-press-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.editor-styles-wrapper .gp-press .gp-press-title a::after { display: none; }
.gp-press .gp-press-meta { margin: .25rem 0 0; font-size: .875rem; color: var(--wp--preset--color--muted); }
.wp-block-columns:has(.gp-press) > .wp-block-column { flex-basis: 0; flex-grow: 1; }
.wp-block-columns:has(.gp-press) { margin-top: 1rem; }

/* Band "Zu lesen und zu sehen" im Grün des Menübalkens, leicht abgerundete Kästchen */
.gp-media-band { background: var(--gp-band); }
body .wp-site-blocks .gp-media-band :is(h2, .wp-block-heading) { color: var(--gp-link); }
.gp-media-band .gp-press { border: 0; border-radius: 10px; box-shadow: none; transition: box-shadow .15s ease; }
.gp-media-band .gp-press:hover { box-shadow: 0 0 0 3px var(--gp-green); }
.gp-media-band .wp-block-columns { margin-top: 1.25rem; }

/* Kein Spalt zwischen "So finden Sie uns" und Fuss */
.wp-site-blocks > footer, .wp-site-blocks > .wp-block-template-part:last-child { margin-block-start: 0; }
.gp-find { margin-block-end: 0; }
