/*
Theme Name: heilSAMEN Raum
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
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: heilsamen-raum
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts margin-block-start: var(--wp--style--block-gap) between the
   template's top-level sections (header part, main, footer part) — a gap that
   exists even when no markup asks for it. Zero it so sections butt edge-to-edge
   and own their vertical rhythm via padding; this does not affect block gaps
   inside nested layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* === cards (Angebot overview) === */
.is-style-card {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--secondary);
	border-top: 3px solid var(--wp--preset--color--primary);
	padding: var(--wp--preset--spacing--40);
	transition: border-color 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}
.is-style-card:hover {
	border-color: var(--wp--preset--color--accent);
	transform: translateY(-2px);
}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--wp--preset--color--secondary);
}
.wp-block-table.is-style-stripes th,
.wp-block-table.is-style-stripes td {
	padding: 0.7rem 1rem;
}
.is-style-card .wp-block-image {
	width: 100%;
	margin: 0;
}
.wp-image-78 {
	object-position: center 25%;
}
.wp-image-49 {
	object-position: center top;
}
/* Karte + Seitenkopf "Heilinstrument Stimme": Kopf darf nicht abgeschnitten werden */
.wp-image-248 {
	object-position: center top;
}

/* Keep offer-page header photos as a calm banner, not a dominant hero, flush with the text column */
.entry-content > .wp-block-image:first-child img {
	aspect-ratio: 2 / 1 !important;
	object-fit: cover;
}
.is-style-card img {
	width: 100%;
	height: 14rem;
	object-fit: cover;
}
.is-style-card h3 {
	margin-top: var(--wp--preset--spacing--30);
	margin-bottom: 0;
}
.is-style-card .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
	width: 100%;
}
.is-style-card .wp-block-button,
.is-style-card .wp-element-button {
	width: 100%;
	box-sizing: border-box;
}

@media (max-width: 640px) {
	.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
}

/* === outline buttons: turquoise by default, filled turquoise on hover === */
.wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

/* === header row: wider than the content column so seven menu items hold one line === */
.site-header-row .wp-block-navigation {
	font-size: 1rem;
}
.site-header-row .wp-block-navigation__container {
	gap: 16px;
	column-gap: 16px;
	row-gap: 8px;
}
/* Below the wide layout the row stacks: brand on top, menu beneath it. */
@media (max-width: 1000px) {
	.site-header-row {
		flex-direction: column;
		align-items: flex-start;
		row-gap: var(--wp--preset--spacing--30);
	}
}
@media (max-width: 780px) {
	.site-header-row .wp-block-navigation {
		font-size: 0.9rem;
	}
	.site-header-row .wp-block-navigation__container {
		gap: 10px;
		column-gap: 10px;
	}
}

/* === Galerien (Kunst): gleich große Kacheln, Bilder werden NIE beschnitten (contain statt cover) === */
.wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-grow: 0 !important;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 4 / 5;
	object-fit: contain;
}

/* Beschriftungen unter dem Bild statt als Overlay über dem Werk */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption.wp-element-caption {
	position: static;
	background: none;
	color: var(--wp--preset--color--contrast);
	font-size: 0.95rem;
	line-height: 1.4;
	max-height: none;
	overflow: visible;
	margin: 0;
	padding: 0.5rem 0 0;
	text-align: left;
}

/* === Meine Bilder: Bild links, Beschriftung rechts daneben, Zeilenbreite selbst einstellbar === */
.entry-content .wp-block-columns {
	margin-bottom: 0;
}
.entry-content .wp-block-columns + .wp-block-columns {
	margin-top: 3rem;
}
.entry-content .wp-block-columns .wp-block-image {
	margin-bottom: 0;
}

/* Mehr Luft zwischen den Bildzeilen auf "Meine Bilder" */
.page-id-222 .entry-content .wp-block-columns + .wp-block-columns,
.editor-styles-wrapper .wp-block-columns + .wp-block-columns {
	margin-top: 6rem;
}

/* Zwischenüberschriften in der Galerie (Seelenbilder / Landschaftsmalerei) */
.galerie-ueberschrift {
	margin-top: 6rem;
	margin-bottom: 2rem;
}

/* Bilder immer links bündig – auch im Editor, damit schmale Bilder nicht mittig sitzen */
.entry-content .wp-block-image,
.editor-styles-wrapper .wp-block-image {
	text-align: left;
}
.entry-content .wp-block-image img,
.editor-styles-wrapper .wp-block-image img {
	margin-left: 0;
	margin-right: auto;
}

/* === termin box === */
.is-style-termin-box {
	background-color: var(--wp--preset--color--secondary);
	padding: var(--wp--preset--spacing--50);
	border-left: 3px solid var(--wp--preset--color--accent);
}
.is-style-termin-box h2,
.is-style-termin-box h3 {
	margin-top: 0;
	font-family: var(--wp--preset--font-family--label);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.95rem;
	color: var(--wp--preset--color--primary);
}
.is-style-termin-box p {
	margin: 0.35rem 0;
}

/* === Lange Wörter in Überschriften umbrechen (z. B. "Verbraucherstreitbeilegung/Universalschlichtungsstelle") === */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3,
.wp-block-post-content h4,
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
	overflow-wrap: break-word;
	hyphens: auto;
}
