/*
Theme Name: Heimatverein Recke
Theme URI: https://heimatverein-recke.de
Author: Horst
Description: Block-Theme für den Heimatverein Recke e.V. in den Farben des Recker Wappens – Blau, Schwarz und Silber. Schriften lokal eingebunden (DSGVO-freundlich), Startseite und Gruppenseiten als fertige Muster.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
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: hvr-recke
Tags: block-patterns, full-site-editing, one-column, custom-colors, editor-style
*/

/* --------------------------------------------------------------
   Grundlagen
   Farben, Schriften und Abstände stehen in theme.json.
   Hier nur, was theme.json nicht abbilden kann.
-------------------------------------------------------------- */

:root {
	--hvr-rahmen: var(--wp--preset--color--rahmen);
	--hvr-radius: 6px;
}

/* Fokus gut sichtbar (Tastaturbedienung) */
:where(a, button, input, select, textarea, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--blau);
	outline-offset: 2px;
}

/* --------------------------------------------------------------
   Wappen-Balken: blau-weiße Streifen unter dem Kopf und über dem Fuß
-------------------------------------------------------------- */

.hvr-balken {
	height: 14px;
	background: repeating-linear-gradient(
		180deg,
		var(--wp--preset--color--blau) 0 2px,
		var(--wp--preset--color--weiss) 2px 4px
	);
	margin-block: 0 !important;
}

/* --------------------------------------------------------------
   Kopfzeile
-------------------------------------------------------------- */

.hvr-kopf {
	background: var(--wp--preset--color--weiss);
}

.hvr-kopf__inner {
	padding-block: 1rem;
}

.hvr-kopf .wp-block-site-title {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 700;
	line-height: 1.1;
}

.hvr-kopf .wp-block-site-title a {
	color: var(--wp--preset--color--dunkel);
	text-decoration: none;
}

.hvr-kopf .wp-block-site-tagline {
	color: var(--wp--preset--color--textgrau);
	margin-top: 0.15rem;
}

.hvr-kopf .wp-block-navigation a {
	text-decoration: none;
}

.hvr-kopf .wp-block-navigation a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* --------------------------------------------------------------
   Fußzeile
-------------------------------------------------------------- */

.hvr-fuss {
	padding-block: 3.5rem 1.5rem;
}

.hvr-fuss a {
	color: var(--wp--preset--color--hellgrau);
	text-decoration: none;
}

.hvr-fuss a:hover {
	color: var(--wp--preset--color--weiss);
	text-decoration: underline;
}

.hvr-fuss strong {
	color: var(--wp--preset--color--weiss);
}

.hvr-fuss__unten {
	border-top: 1px solid #2c3038;
	margin-top: 2.5rem !important;
	padding-top: 1.25rem;
	color: #9aa2ae;
}

/* --------------------------------------------------------------
   Startseite: Abschnitte liegen ohne Lücke untereinander
-------------------------------------------------------------- */

.hvr-startseite > .alignfull,
.hvr-startseite > .alignfull + * {
	margin-block-start: 0;
}

.hvr-sektion {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.hvr-hero {
	padding-block: clamp(3.5rem, 7vw, 5rem);
}

.hvr-hero .hvr-dachzeile {
	color: #9fb7d8;
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.hvr-hero h1 {
	color: var(--wp--preset--color--weiss);
}

.hvr-hero .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--hvr-radius);
}

.hvr-hero .is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--weiss);
	border-color: var(--wp--preset--color--hellgrau);
}

.hvr-band {
	padding-block: 1.25rem;
	border-bottom: 1px solid #ccd8ea;
}

.hvr-band strong {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--mittel);
	color: var(--wp--preset--color--blau);
}

/* --------------------------------------------------------------
   Blockstile (im Editor unter „Stile“ auswählbar)
-------------------------------------------------------------- */

/* Karte: weiße Fläche mit Rahmen, z. B. Ruthemühle / Niemeyers Hof */
.wp-block-group.is-style-karte {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--hvr-rahmen);
	border-top: 4px solid var(--wp--preset--color--blau);
	border-radius: var(--hvr-radius);
	overflow: hidden;
}

.wp-block-group.is-style-karte > .wp-block-image {
	margin: 0;
}

.wp-block-group.is-style-karte > .wp-block-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}

.wp-block-group.is-style-karte > :not(.wp-block-image) {
	margin-inline: 1.75rem;
}

.wp-block-group.is-style-karte > :last-child {
	margin-bottom: 1.75rem;
}

/* Kachel: kleine Fläche für die Gruppen-Übersicht */
.wp-block-group.is-style-kachel {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--hvr-rahmen);
	border-radius: var(--hvr-radius);
	padding: 1.1rem 1.25rem;
	transition: border-color 0.15s ease;
}

.wp-block-group.is-style-kachel:hover {
	border-color: var(--wp--preset--color--blau);
}

.wp-block-group.is-style-kachel p {
	margin: 0;
}

.wp-block-group.is-style-kachel a {
	color: var(--wp--preset--color--dunkel);
	text-decoration: none;
}

/* Termin: Zeile mit blauem Datumskästchen */
.wp-block-group.is-style-termin {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--hvr-rahmen);
	border-radius: var(--hvr-radius);
	padding: 1rem;
	gap: 1.1rem;
}

.wp-block-group.is-style-termin p {
	margin: 0;
}

.hvr-datum {
	flex: 0 0 72px;
	width: 72px;
	min-height: 72px;
	border-radius: 4px;
	background: var(--wp--preset--color--blau);
	color: var(--wp--preset--color--weiss);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.1;
	gap: 0.15rem !important;
}

.hvr-datum p:first-child {
	font-size: 1.6rem;
	font-weight: 700;
}

.hvr-datum p:last-child {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Linkliste: Zeilen mit Trennlinie und Pfeil (Bereich Geschichte) */
.wp-block-group.is-style-linkliste > p {
	margin: 0;
	border-bottom: 1px solid var(--hvr-rahmen);
}

.wp-block-group.is-style-linkliste > p a {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.95rem;
	color: var(--wp--preset--color--dunkel);
	font-size: var(--wp--preset--font-size--mittel);
	font-weight: 600;
	text-decoration: none;
}

.wp-block-group.is-style-linkliste > p a::after {
	content: "→";
	color: var(--wp--preset--color--blau);
}

.wp-block-group.is-style-linkliste > p a:hover {
	color: var(--wp--preset--color--blau);
}

/* Aufruf „Mitglied werden“ */
.hvr-cta {
	border-radius: var(--hvr-radius);
	padding: clamp(1.75rem, 4vw, 3rem);
}

.hvr-cta h2 {
	color: var(--wp--preset--color--weiss);
}

.hvr-cta .is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--weiss);
	border-color: var(--wp--preset--color--weiss);
}

/* Beitragsliste auf der Startseite */
.hvr-beitragsliste .wp-block-post-featured-image {
	flex: 0 0 120px;
	margin: 0;
}

.hvr-beitragsliste .wp-block-post-featured-image img {
	border-radius: 4px;
}

.hvr-beitragsliste .wp-block-post-title a {
	color: var(--wp--preset--color--dunkel);
	text-decoration: none;
}

.hvr-beitragsliste .wp-block-post-title a:hover {
	color: var(--wp--preset--color--blau);
}

/* --------------------------------------------------------------
   Vorstand / Porträts: runde, gleich große Fotos
   Wirkt nur in einem Gruppen-Block mit der Klasse „hvr-vorstand“
   oder mit dem Blockstil „Porträts“.
-------------------------------------------------------------- */

.hvr-vorstand,
.wp-block-group.is-style-portraets {
	text-align: center;
}

.hvr-vorstand .wp-block-image,
.wp-block-group.is-style-portraets .wp-block-image {
	width: 160px !important;
	margin: 0 auto 1rem !important;
}

.hvr-vorstand .wp-block-image img,
.wp-block-group.is-style-portraets .wp-block-image img {
	width: 160px !important;
	height: 160px !important;
	object-fit: cover;
	object-position: center 15%;
	border-radius: 50%;
}

/* --------------------------------------------------------------
   Handy
-------------------------------------------------------------- */

@media (max-width: 600px) {
	.hvr-beitragsliste .wp-block-post-featured-image {
		flex-basis: 80px;
	}
}
