/*
Theme Name: Rettungsstation Sarneraatal
Theme URI: https://sarneraatal.ch/
Author: Rettungsstation Sarneraatal
Author URI: https://sarneraatal.ch/
Description: Schlichtes, zeitloses Block-Theme für den Webauftritt der Rettungsstation Sarneraatal. Reduziert auf Beschrieb, Jahresprogramm und Spenden/Mitgliedschaft.
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rettungsstation-sarneraatal
*/

/* ---- Signature: topographic contour motif, used once, in the homepage hero only. ---- */
/* It sits on the full-bleed charcoal frame AROUND the wide video cover, so the ---- */
/* off-white rings show beside (not on top of) the footage. ---- */
.hero-frame {
	position: relative;
}
.hero-frame::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("./assets/images/contour-lines.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	opacity: 0.6;
	pointer-events: none;
}
/* Second, much fainter copy of the motif ABOVE the video (same geometry ---- */
/* as ::before, so the rings continue seamlessly from frame onto footage). ---- */
.hero-frame::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image: url("./assets/images/contour-lines.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	opacity: 0.15;
	pointer-events: none;
}
.hero-frame .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

/* ---- Hero video: still image sits behind the video as CSS background, ---- */
/* visible while the clip loads and permanently for reduced-motion users ---- */
.hero-video {
	background-image: url("./assets/images/fotos/seilbahn-uebung.jpg");
	background-size: cover;
	background-position: center;
}
/* Feathered edges in the frame color (charcoal, #242526) so the video ---- */
/* melts into the surrounding .hero-frame instead of meeting it as a hard ---- */
/* cut: each side ramps from fully opaque at the border (seamless against ---- */
/* the frame) to transparent over a long eased run. Sits above the video, ---- */
/* below the inner container (core gives that z-index 1). ---- */
.hero-video::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to right,  rgba(36,37,38,1) 0%, rgba(36,37,38,0.87) 4%, rgba(36,37,38,0.6) 9%, rgba(36,37,38,0.32) 14%, rgba(36,37,38,0.12) 19%, rgba(36,37,38,0) 25%),
		linear-gradient(to left,   rgba(36,37,38,1) 0%, rgba(36,37,38,0.87) 4%, rgba(36,37,38,0.6) 9%, rgba(36,37,38,0.32) 14%, rgba(36,37,38,0.12) 19%, rgba(36,37,38,0) 25%),
		linear-gradient(to bottom, rgba(36,37,38,1) 0%, rgba(36,37,38,0.8) 4%, rgba(36,37,38,0.4) 9%, rgba(36,37,38,0.1) 14%, rgba(36,37,38,0) 18%),
		linear-gradient(to top,    rgba(36,37,38,1) 0%, rgba(36,37,38,0.8) 4%, rgba(36,37,38,0.4) 9%, rgba(36,37,38,0.1) 14%, rgba(36,37,38,0) 18%);
	pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
	.hero-video .wp-block-cover__video-background {
		display: none;
	}
}

/* ---- Header / navigation: quiet, flat, no dropdown chrome ---- */
.wp-block-navigation a {
	text-transform: none;
	letter-spacing: 0.01em;
	font-weight: 600;
}
.site-header-row {
	border-bottom: 1px solid var(--wp--preset--color--gray-hairline);
	/* Flex-Layout-Gruppen bekommen kein has-global-padding — Root-Padding manuell übernehmen */
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

/* ---- Seitentitel: lange Einzelwörter (z. B. «Jahresprogramm») dürfen auf ---- */
/* schmalen Screens an gültiger Silbengrenze umbrechen statt mitten im Wort. ---- */
/* Greift dank lang="de-CH" nur, wenn das Wort sonst überliefe (Desktop: keine Trennung). ---- */
.wp-block-post-title {
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: break-word;
}

/* ---- Teaser row: vertical hairlines between columns on desktop, ---- */
/* horizontal hairlines when the columns block stacks on mobile ---- */
.teaser-col {
	padding-top: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--wp--preset--color--gray-hairline);
}
.teaser-col h3 {
	-webkit-hyphens: auto;
	hyphens: auto;
}
.teaser-col:first-child {
	padding-top: 0;
	border-top: none;
}
/* Der Link ist immer das letzte Element: über die ganze Zeile unten bündig, ---- */
/* auch wenn eine Überschrift (Jahresprogramm) zweizeilig umbricht ---- */
.teaser-col {
	display: flex;
	flex-direction: column;
}
.teaser-col > p:last-child {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--20);
}
@media (min-width: 783px) {
	.teaser-col {
		padding-top: 0;
		padding-left: var(--wp--preset--spacing--30);
		padding-right: var(--wp--preset--spacing--30);
		border-top: none;
		border-right: 1px solid var(--wp--preset--color--gray-hairline);
	}
	.teaser-col:first-child {
		padding-left: 0;
	}
	.teaser-col-last {
		padding-right: 0;
		border-right: none;
	}
}

/* ---- Footer ---- */
/* ---- Notfall strip above the footer: alarm-red on the numbers is functional ---- */
/* (emergency signal), not decorative — the one text use of red besides link hover ---- */
.notfall-strip {
	margin-top: var(--wp--preset--spacing--50);
	padding-block: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--wp--preset--color--gray-hairline);
}
.notfall-nummer {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--alarm-red);
	text-decoration: none;
}

.site-footer {
	background-color: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--off-white);
}
.site-footer a {
	color: var(--wp--preset--color--off-white);
}
.site-footer a:hover {
	color: var(--wp--preset--color--alarm-red);
}

/* ---- Kennzahlen row (Die Rettung): even grid of number + label pairs, so the ---- */
/* four figures line up instead of a flex row leaving one orphan on a second line ---- */
.kennzahlen > .wp-block-group {
	align-items: baseline;
	gap: 0.5rem;
}
.kennzahlen .board-role,
.kennzahlen p {
	margin: 0;
}

/* ---- Utility: monospace "instrument" text for data-like content (IBAN, Koordinaten, Daten) ---- */
.is-style-mono {
	font-family: var(--wp--preset--font-family--mono);
	letter-spacing: 0.01em;
}

/* ---- Geo-tag detail (footer / hero): quiet coordinate reference, not decoration ---- */
.geo-tag {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gray-mid);
	letter-spacing: 0.02em;
}

/* ---- Board list: hairline rows instead of cards ---- */
.board-list .board-row {
	display: flex;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	padding-block: var(--wp--preset--spacing--10);
	border-bottom: 1px solid var(--wp--preset--color--gray-hairline);
}
.board-list .board-row:first-child {
	border-top: 1px solid var(--wp--preset--color--gray-hairline);
}
.board-list .board-role {
	color: var(--wp--preset--color--gray-mid);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	white-space: nowrap;
}

/* ---- Category tags (Einsatzarten): plain inline labels, not a fake numbered process ---- */
.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10);
	padding: 0;
	margin: 0;
	list-style: none;
}
.tag-list li {
	border: 1px solid var(--wp--preset--color--gray-hairline);
	padding: 0.35rem 0.85rem;
	font-size: var(--wp--preset--font-size--small);
}

/* ---- Donation IBAN emphasis: the number itself is the typographic moment, no fake CTA ---- */
.iban-display {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	letter-spacing: 0.02em;
	white-space: nowrap;
	border-top: 1px solid var(--wp--preset--color--gray-hairline);
	border-bottom: 1px solid var(--wp--preset--color--gray-hairline);
	padding-block: var(--wp--preset--spacing--20);
}
@media (max-width: 480px) {
	.iban-display {
		white-space: normal;
	}
}

/* ---- Program table: scroll inside its own figure on narrow screens, never the page. ---- */
/* Scroll-shadow hint (Lea Verou technique): a soft shadow appears on whichever ---- */
/* edge has hidden content, so it's obvious the table swipes sideways on mobile. ---- */
figure.wp-block-table {
	overflow-x: auto;
	background:
		linear-gradient(to right, var(--wp--preset--color--white) 30%, rgba(255, 255, 255, 0)) left center,
		linear-gradient(to left,  var(--wp--preset--color--white) 30%, rgba(255, 255, 255, 0)) right center,
		radial-gradient(farthest-side at 0 50%,   rgba(36, 37, 38, 0.14), rgba(36, 37, 38, 0)) left center,
		radial-gradient(farthest-side at 100% 50%, rgba(36, 37, 38, 0.14), rgba(36, 37, 38, 0)) right center;
	background-repeat: no-repeat;
	background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
	background-attachment: local, local, scroll, scroll;
}
@media (max-width: 600px) {
	.wp-block-table table {
		font-size: 0.8125rem;
	}
	.wp-block-table th,
	.wp-block-table td {
		padding: 0.4rem 0.6rem;
	}
}

/* ---- Kontaktformular (Spenden): stille Hairline-Felder, kein Karten-Look. ---- */
/* Der Absenden-Button bleibt bewusst charcoal/outline — Rot gehört allein ---- */
/* dem Spenden-CTA und dem Link-Hover. ---- */
.kontakt-form p {
	margin: 0 0 var(--wp--preset--spacing--20);
}
.kontakt-form label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gray-mid);
	margin-bottom: 0.35rem;
}
.kontakt-form input[type="text"],
.kontakt-form input[type="email"],
.kontakt-form textarea {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--wp--preset--color--gray-hairline);
	border-radius: 0;
	background-color: var(--wp--preset--color--white);
	font: inherit;
	color: inherit;
}
.kontakt-form input:focus,
.kontakt-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--charcoal);
}
/* Honeypot: visuell und für Screenreader aus dem Weg, für Bots ein normales Feld */
.kontakt-form .kf-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.kontakt-form button {
	font: inherit;
	font-weight: 600;
	background-color: transparent;
	color: var(--wp--preset--color--charcoal);
	border: 1px solid var(--wp--preset--color--charcoal);
	padding: 0.6rem 1.6rem;
	cursor: pointer;
}
.kontakt-form button:hover {
	background-color: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--white);
}
.kontakt-notice {
	border: 1px solid var(--wp--preset--color--gray-hairline);
	padding: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: var(--wp--preset--spacing--20);
}
.kontakt-notice-fehler {
	border-color: var(--wp--preset--color--alarm-red);
}

/* ---- Donate button accent: the one place red is used solid ---- */
.is-style-spenden .wp-block-button__link {
	background-color: var(--wp--preset--color--alarm-red);
	color: var(--wp--preset--color--white);
}
.is-style-spenden .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--charcoal);
}

.spenden-qr img {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 20rem;
	height: auto;
	/* Preserve a white quiet zone around the supplied, tightly cropped code. */
	padding: 1.5rem;
	background: #fff;
}

/* Keyboard navigation and readable wrapping on narrow screens. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}
.kontakt-form input,
.kontakt-form textarea {
	box-sizing: border-box;
}
.board-list .board-row {
	flex-wrap: wrap;
}
.hero-video .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--30);
}
.hero-video .wp-block-button__link {
	background: var(--wp--preset--color--off-white);
	color: var(--wp--preset--color--charcoal);
}
.hero-video .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	text-decoration: underline;
}
.program-archive {
	margin-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--gray-hairline);
	padding-top: var(--wp--preset--spacing--20);
}
.program-archive summary {
	cursor: pointer;
	font-weight: 600;
}
.program-archive .wp-block-table {
	margin-inline: 0;
}
.program-table caption {
	text-align: left;
	padding-bottom: var(--wp--preset--spacing--20);
}
@media (max-width: 600px) {
	.hero-video.wp-block-cover {
		min-height: 65svh !important;
	}
}

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