/*
Theme Name: Fitmacher
Theme URI: https://fitmacher-bern.ch
Author: FOTO-BERN
Author URI: https://foto-bern.ch
Description: Schlankes Block-Theme für Fitmacher-Bern Personal Training. Ohne Page-Builder, Schriften lokal eingebunden, optimiert für Google und KI-Suchen.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fitmacher
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
.skip-link.screen-reader-text:focus { background: #fff; color: #000; padding: 0.75rem 1rem; z-index: 1000; }
.wp-site-blocks > footer, .wp-site-blocks > main { margin-block-start: 0; }
::selection { background: var(--wp--preset--color--akzent); color: #fff; }

/* Überzeile: kurze orange Zeile über Titeln */
.is-style-ueberzeile {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700;
	font-size: 1rem !important;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--wp--preset--color--akzent);
	margin-bottom: 0.25rem !important;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.is-style-ueberzeile::before { content: ""; width: 2rem; height: 3px; background: currentColor; flex: none; }
.fitmacher-zentriert .is-style-ueberzeile { justify-content: center; }
.has-nacht-background-color .is-style-ueberzeile,
.has-schiefer-background-color .is-style-ueberzeile,
.fitmacher-hero .is-style-ueberzeile { color: var(--wp--preset--color--akzent-hell); }

/* Text auf dunklem Grund */
.has-nacht-background-color, .has-schiefer-background-color { color: #d6d3cd; }
.has-nacht-background-color :is(h1,h2,h3,h4), .has-schiefer-background-color :is(h1,h2,h3,h4) { color: #fff; }
.has-nacht-background-color a:not(.wp-block-button__link), .has-schiefer-background-color a:not(.wp-block-button__link) { color: #fff; }

/* Knöpfe */
.wp-block-button__link { transition: background-color .15s ease, transform .15s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--nacht);
	border: 2px solid currentColor;
	padding: calc(1rem - 2px) calc(1.75rem - 2px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--nacht); color: #fff; border-color: var(--wp--preset--color--nacht); }
:is(.fitmacher-hero, .has-nacht-background-color, .has-schiefer-background-color, .has-akzent-background-color) .is-style-outline > .wp-block-button__link { color: #fff; }
:is(.fitmacher-hero, .has-nacht-background-color, .has-schiefer-background-color, .has-akzent-background-color) .is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--nacht); border-color: #fff; }

/* ---------- Kopfzeile ---------- */
.fitmacher-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .fitmacher-header { top: var(--wp-admin--admin-bar--height, 0); }
.fitmacher-header .fitmacher-logo img { height: 64px; width: auto; display: block; }
.fitmacher-header .wp-block-navigation a { text-decoration: none; }
.fitmacher-header .wp-block-navigation-item__content:hover,
.fitmacher-header .current-menu-item > a { color: var(--wp--preset--color--akzent); }
.fitmacher-header .wp-block-button__link { padding: 0.7rem 1.1rem; font-size: 1rem; }
.fitmacher-header .wp-block-navigation__responsive-container.is-menu-open { padding-top: 4rem; }
.fitmacher-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1.25rem; font-size: 1.5rem; }
@media (max-width: 781px) {
	.fitmacher-header .fitmacher-logo img { height: 48px; }
	.fitmacher-header .fitmacher-header-knopf { display: none; }
}

/* ---------- Titelbild ---------- */
.fitmacher-hero { color: #fff; }
.fitmacher-hero .wp-block-cover__inner-container { width: 100%; }
.fitmacher-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(14,15,17,.88) 0%, rgba(14,15,17,.62) 45%, rgba(14,15,17,.15) 100%) !important;
	opacity: 1 !important;
}
@media (max-width: 781px) {
	.fitmacher-hero .wp-block-cover__background { background: linear-gradient(0deg, rgba(14,15,17,.92) 0%, rgba(14,15,17,.6) 60%, rgba(14,15,17,.35) 100%) !important; }
}
.fitmacher-hero h1 { color: #fff; max-width: 14ch; }
.fitmacher-hero p { color: #e7e4de; max-width: 38rem; font-size: 1.25rem; }

/* ---------- Faktenband ---------- */
.fitmacher-fakten .wp-block-column { border-left: 3px solid var(--wp--preset--color--akzent); padding-left: 1rem; }
.fitmacher-fakten p { margin: 0; }
.fitmacher-fakten .fitmacher-fakt-gross {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700;
	font-size: 1.75rem;
	line-height: 1.05;
	text-transform: uppercase;
	color: #fff;
}
.fitmacher-fakten .fitmacher-fakt-klein { font-size: 0.9375rem; color: #b9b6b0; }

/* ---------- Bildkarten (Angebote) ---------- */
.fitmacher-bildkarte { background: #fff; height: 100%; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: box-shadow .2s ease, transform .2s ease; }
.fitmacher-bildkarte:hover { box-shadow: 0 14px 40px rgba(0,0,0,.12); transform: translateY(-3px); }
.fitmacher-bildkarte figure { margin: 0 !important; }
.fitmacher-bildkarte figure img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: 2px 2px 0 0; }
.fitmacher-bildkarte .fitmacher-bildkarte-text { padding: 1.75rem; display: flex; flex-direction: column; gap: 0.9rem; flex: 1; }
.fitmacher-bildkarte .fitmacher-bildkarte-text > :last-child { margin-top: auto; }
.fitmacher-bildkarte h3 a { text-decoration: none; }
.fitmacher-marke {
	display: inline-block;
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700;
	font-size: 0.9375rem !important;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	background: var(--wp--preset--color--kreide);
	color: var(--wp--preset--color--nacht);
	padding: 0.2rem 0.6rem;
	border-radius: 2px;
}
.fitmacher-pfeil a { font-family: var(--wp--preset--font-family--titel); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; color: var(--wp--preset--color--akzent); }
.fitmacher-pfeil a:hover { text-decoration: underline; }

/* ---------- Ziele ---------- */
.fitmacher-ziel { background: #fff; padding: 1.75rem; height: 100%; border-top: 3px solid var(--wp--preset--color--akzent); }
.fitmacher-ziel h3 { margin-top: 0; }
.fitmacher-ziel p { margin-bottom: 0; font-size: 1rem; }

/* ---------- Häufige Fragen ---------- */
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 1.125rem;
	color: var(--wp--preset--color--nacht);
	list-style: none;
	position: relative;
	padding-right: 2.5rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--kreide);
	color: var(--wp--preset--color--akzent);
	display: flex; align-items: center; justify-content: center;
	font-size: 1.25rem; font-weight: 600; line-height: 1;
}
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details[open] summary { margin-bottom: 0.5rem; }

/* ---------- Schritte ---------- */
.fitmacher-schritte { counter-reset: schritt; list-style: none; padding-left: 0 !important; }
.fitmacher-schritte > li { counter-increment: schritt; position: relative; padding-left: 3.5rem; margin-bottom: 1.25rem; }
.fitmacher-schritte > li::before {
	content: counter(schritt);
	position: absolute; left: 0; top: -0.2rem;
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700; font-size: 2.25rem; line-height: 1;
	color: var(--wp--preset--color--akzent);
}
.fitmacher-schritt { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.25rem; height: 100%; }
.fitmacher-schritt .fitmacher-nummer {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700; font-size: 4rem; line-height: 1;
	color: var(--wp--preset--color--akzent-hell); margin: 0 0 .5rem;
}

/* ---------- Bilder ---------- */
.fitmacher-bild-hoch img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.fitmacher-portrait img { object-position: 50% 0; }
.fitmacher-haken { list-style: none; padding-left: 0 !important; }
.fitmacher-haken li { position: relative; padding-left: 1.75rem; margin-bottom: .4rem; }
.fitmacher-haken li::before { content: ""; position: absolute; left: 0; top: .55em; width: .9rem; height: .5rem; border-left: 3px solid var(--wp--preset--color--akzent); border-bottom: 3px solid var(--wp--preset--color--akzent); transform: rotate(-45deg); }

/* ---------- Zitat / Kundenstimmen ---------- */
.fitmacher-stimme { margin: 0 !important; background: #fff; padding: 1.75rem !important; font-style: normal !important; }
.fitmacher-stimme cite { font-style: normal; font-size: .9375rem; color: var(--wp--preset--color--grau); }
.fitmacher-sterne { color: var(--wp--preset--color--akzent); letter-spacing: 3px; font-size: 1.25rem; }

/* ---------- Abschlussband (orange) ---------- */
.fitmacher-cta h2 { color: #fff; }
.fitmacher-cta p { color: #fff; }
.fitmacher-cta .wp-block-button:not(.is-style-outline) > .wp-block-button__link { background: var(--wp--preset--color--nacht); }
.fitmacher-cta .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { background: #000; }

/* ---------- Zentriert ---------- */
.fitmacher-zentriert, .fitmacher-zentriert h2, .fitmacher-zentriert p { text-align: center; }

/* ---------- Fusszeile ---------- */
.fitmacher-footer { color: #b9b6b0; }
.fitmacher-footer a { color: #fff; text-decoration: none; }
.fitmacher-footer a:hover { color: var(--wp--preset--color--akzent-hell); text-decoration: underline; }
.fitmacher-footer .is-style-ueberzeile { color: var(--wp--preset--color--akzent-hell); }
.fitmacher-footer .wp-block-separator { border-color: rgba(255,255,255,.12) !important; opacity: 1; }

/* ---------- Anruf-/WhatsApp-Leiste auf dem Handy ---------- */
.fitmacher-anruf { display: none; }
@media (max-width: 781px) {
	.fitmacher-anruf {
		display: flex; align-items: center; justify-content: center; gap: .5rem;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 99;
		background: var(--wp--preset--color--akzent); color: #fff !important; text-decoration: none !important;
		font-family: var(--wp--preset--font-family--titel); font-weight: 700;
		font-size: 1.0625rem; letter-spacing: 1.5px; text-transform: uppercase;
		padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom));
	}
	body { padding-bottom: 3.5rem; }
	#ht-ctc-chat, .ht-ctc.ht-ctc-chat { bottom: 78px !important; }
}
@media print { .fitmacher-anruf, .fitmacher-header .wp-block-navigation { display: none !important; } }

/* ---------- Kontaktformular ---------- */
.fitmacher-formular form p { margin: 0 0 1rem; }
.fitmacher-formular label {
	display: block;
	font-size: 0.8125rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--nacht);
	margin-bottom: 0.35rem;
}
.fitmacher-formular .fitmacher-optional { text-transform: none; letter-spacing: 0; color: var(--wp--preset--color--grau); }
.fitmacher-formular input,
.fitmacher-formular select,
.fitmacher-formular textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--nacht);
	background: #fff;
	border: 1px solid #b9b6af;
	border-radius: 2px;
	padding: 0.7rem 0.8rem;
}
.fitmacher-formular input:focus,
.fitmacher-formular select:focus,
.fitmacher-formular textarea:focus {
	outline: 2px solid var(--wp--preset--color--nacht);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--nacht);
}
.fitmacher-formular textarea { resize: vertical; min-height: 8rem; }
.fitmacher-formular-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .fitmacher-formular-zeile { grid-template-columns: 1fr; gap: 0; } }
.fitmacher-formular button { cursor: pointer; border: 0; }
.fitmacher-formular-hinweis { font-size: 0.8125rem; color: var(--wp--preset--color--grau); }
.fitmacher-honig { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fitmacher-meldung { padding: 1rem 1.25rem; margin: 0 0 1.5rem; border-left: 3px solid; }
.fitmacher-meldung--ok { background: #eef5ee; border-color: #2e6b3a; color: #1f4a28; }
.fitmacher-meldung--fehler { background: #fbeeee; border-color: #a12a2a; color: #6e1c1c; }

.fitmacher-formular-zusage { padding-left: 0.9rem; border-left: 3px solid var(--wp--preset--color--akzent); }

/* Titelbild: Inhalt auf Seitenbreite zentrieren */
.fitmacher-hero .wp-block-cover__inner-container > .wp-block-group { width: 100%; max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; }
.fitmacher-hero .wp-block-cover__inner-container > .wp-block-group > .wp-block-group { max-width: 40rem; margin-left: 0 !important; }
.fitmacher-fakten .fitmacher-fakt-klein { font-size: 1rem; }
.fitmacher-hero.wp-block-cover .wp-block-cover__inner-container { width: 100% !important; }
/* Abschnitte ohne Lücken aneinander */
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* ---------- OUT-Anmeldung ---------- */
.fitmacher-out fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
.fitmacher-out legend {
	font-family: var(--wp--preset--font-family--titel);
	font-weight: 700; font-size: 1.5rem; text-transform: uppercase;
	color: var(--wp--preset--color--nacht); margin-bottom: .75rem; padding: 0;
}
.fitmacher-out legend .fitmacher-optional { font-family: var(--wp--preset--font-family--text); font-size: .9375rem; font-weight: 400; text-transform: none; }
.fitmacher-out-termine { display: grid; gap: .6rem; }
.fitmacher-formular .fitmacher-out-termin {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .25rem 1rem;
	background: #fff; border: 2px solid var(--wp--preset--color--linie); border-radius: 2px;
	padding: .9rem 1.1rem; margin: 0; cursor: pointer;
	text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--wp--preset--color--text);
	transition: border-color .15s ease;
}
.fitmacher-out-termin:hover { border-color: var(--wp--preset--color--grau); }
.fitmacher-out-termin:has(input:checked) { border-color: var(--wp--preset--color--akzent); background: #fff8f4; }
.fitmacher-formular .fitmacher-out-termin input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--wp--preset--color--akzent); }
.fitmacher-out-datum { font-weight: 600; color: var(--wp--preset--color--nacht); }
.fitmacher-out-notiz { grid-column: 2; font-size: .9375rem; color: var(--wp--preset--color--grau); }
.fitmacher-out-stand { grid-column: 3; grid-row: 1 / span 2; font-size: .875rem; font-weight: 600; padding: .25rem .6rem; border-radius: 2px; background: var(--wp--preset--color--kreide); white-space: nowrap; }
.fitmacher-out-termin.is-findet .fitmacher-out-stand { background: #e6f2e8; color: #1e5e2b; }
.fitmacher-out-termin.is-voll, .fitmacher-out-termin.is-zu { opacity: .55; cursor: not-allowed; }
@media (max-width: 600px) {
	.fitmacher-formular .fitmacher-out-termin { grid-template-columns: auto 1fr; }
	.fitmacher-out-stand { grid-column: 2; grid-row: auto; justify-self: start; }
}
.fitmacher-einwilligung label { display: flex; gap: .6rem; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font-size: .9375rem !important; color: var(--wp--preset--color--text) !important; }
.fitmacher-formular .fitmacher-einwilligung input { width: auto; margin-top: .3rem; accent-color: var(--wp--preset--color--akzent); }
.fitmacher-out-leer { background: #fff; padding: 1.5rem; border-left: 3px solid var(--wp--preset--color--akzent); }

/* ---------- Unterseiten ---------- */
.fitmacher-bild-quer img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.fitmacher-untertitel { font-family: var(--wp--preset--font-family--titel); font-weight: 600; font-size: 1.375rem; text-transform: uppercase; letter-spacing: 1px; color: var(--wp--preset--color--akzent); margin-top: -.5rem !important; }
.fitmacher-preis { background: #fff; padding: 1.75rem; height: 100%; border-top: 3px solid var(--wp--preset--color--linie); }
.has-weiss-background-color .fitmacher-preis { background: var(--wp--preset--color--kreide); }
.fitmacher-preis.is-hervor { border-top-color: var(--wp--preset--color--akzent); }
.fitmacher-preis h3 { margin: 0; }
.fitmacher-preiszeile { margin: 0; line-height: 1.1; }
.fitmacher-betrag { font-family: var(--wp--preset--font-family--titel); font-weight: 700; font-size: 2.75rem; color: var(--wp--preset--color--nacht); }
.fitmacher-einheit { color: var(--wp--preset--color--grau); font-size: 1rem; }
.fitmacher-preis-unter { font-weight: 600; color: var(--wp--preset--color--akzent); margin: 0 !important; font-size: 1rem; }
.fitmacher-preis .fitmacher-haken { font-size: 1rem; margin-top: 1rem; }
.fitmacher-formularbox { box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.fitmacher-bild-hoch img[src*="koordinationsleiter"] { object-position: 70% 50%; }
/* App-Abschnitt auf dunklem Grund */
.has-schiefer-background-color .fitmacher-preis-unter { color: var(--wp--preset--color--akzent-hell); }
.has-schiefer-background-color .fitmacher-haken li::before { border-color: var(--wp--preset--color--akzent-hell); }
.has-schiefer-background-color strong { color: #fff; }

/* ---------- Schriftzug neben dem Logo ---------- */
.fitmacher-wortmarke { margin: 0; line-height: 1; }
.fitmacher-wortmarke a { text-decoration: none; color: var(--wp--preset--color--nacht); display: flex; flex-direction: column; gap: .3rem; }
.fitmacher-wortmarke-name { font-family: var(--wp--preset--font-family--titel); font-weight: 700; font-size: 1.75rem; letter-spacing: 1px; text-transform: uppercase; line-height: .9; }
.fitmacher-wortmarke-zusatz { font-family: var(--wp--preset--font-family--titel); font-weight: 600; font-size: .8125rem; letter-spacing: 3.5px; text-transform: uppercase; color: var(--wp--preset--color--akzent); }
@media (max-width: 781px) {
	.fitmacher-wortmarke-name { font-size: 1.35rem; }
	.fitmacher-wortmarke-zusatz { font-size: .6875rem; letter-spacing: 2.5px; }
}
/* Kopfzeile kompakt halten */
.fitmacher-wortmarke a, .fitmacher-header .wp-block-button__link { white-space: nowrap; }
.fitmacher-header .wp-block-navigation { font-size: 1.0625rem; }
.fitmacher-header .wp-block-navigation__container { flex-wrap: nowrap; gap: 1.4rem; }
.fitmacher-header .wp-block-navigation-item__content { white-space: nowrap; }
@media (max-width: 1320px) { .fitmacher-header .fitmacher-header-knopf { display: none; } }
@media (max-width: 1180px) and (min-width: 1024px) { .fitmacher-header .wp-block-navigation { font-size: .9375rem; } .fitmacher-header .wp-block-navigation__container { gap: 1rem; } }
/* Bis 1023px Menü-Knopf statt Leiste (Tablet) */
@media (max-width: 1023px) {
	.fitmacher-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.fitmacher-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
.fitmacher-bild-hoch img[src*="plank-gruppe"] { object-position: 18% 50%; }
