/*
 * Design-Werte 1:1 aus dem bestehenden "Content Views"-Grid der Website übernommen
 * (per Chrome-Inspektion von .pt-cv-content-item auf https://baern-gliders.ch/ am 08.09.2026):
 * Schrift "Libre Franklin" (Theme Twenty Seventeen), Textfarbe #333, Karten-Radius 5px,
 * weicher Rundum-Schatten 0 0 10px #e1e1e1, Bild-Seitenverhältnis 356:250 (=178:125),
 * Titel 18px/500, Textauszug 15px, Datum 11px/#000.
 */
.bg-post-grid {
	--bg-grid-radius: 5px;
	--bg-grid-shadow: 0 0 10px rgba(225, 225, 225, 1);
	--bg-grid-text: #333333;
	--bg-grid-date: #000000;
	--bg-grid-font: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;

	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
	margin-block: 1.5rem;
	font-family: var(--bg-grid-font);
}

/* Ab genug Platz die gewünschte Spaltenzahl erzwingen, statt nur "so viele wie passen". */
@media (min-width: 700px) {
	.bg-post-grid {
		grid-template-columns: repeat(var(--bg-grid-columns, 3), 1fr);
	}
}

.bg-grid-card {
	display: block;
	background: transparent;
	border-radius: var(--bg-grid-radius);
	box-shadow: var(--bg-grid-shadow);
	overflow: hidden;
}

.bg-grid-card-media {
	display: block;
	aspect-ratio: 178 / 125;
	margin: 0 0 10px;
	background: #eee;
}

.bg-grid-card-media img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	display: block;
}

.bg-grid-card-media-placeholder {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	background: linear-gradient(135deg, #dfe9f0, #eef3ea);
}

.bg-grid-card-body {
	padding: 0 15px 15px;
}

.bg-grid-card-title {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.1;
	color: var(--bg-grid-text);
	margin: 0 0 10px;
}

.bg-grid-card-title a,
.bg-grid-card-title a:link,
.bg-grid-card-title a:visited,
.bg-grid-card-title a:hover,
.bg-grid-card-title a:focus,
.bg-grid-card-title a:active {
	color: var(--bg-grid-text) !important;
	text-decoration: none !important;
}

.bg-grid-card-title a:hover,
.bg-grid-card-title a:focus-visible {
	text-decoration: underline !important;
}

.bg-grid-card-excerpt {
	font-size: 15px;
	line-height: 1.5;
	color: var(--bg-grid-text);
	margin: 0 0 10px;
}

.bg-grid-card-stats {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 10px;
	padding: 0;
}

.bg-grid-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 13px;
	font-weight: 600;
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	white-space: nowrap;
}

.bg-grid-stat-icon {
	inline-size: 0.9rem;
	block-size: 0.9rem;
	flex-shrink: 0;
	background-color: currentColor;
}

/* Höhenmeter: Berg-Symbol, warmer Alpin-Ton. */
.bg-grid-stat--elevation {
	color: #b5651d;
	background: #fbe9dc;
}
.bg-grid-stat--elevation .bg-grid-stat-icon {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 6l4.5 7.5H21L14 2 3 20h5.2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 6l4.5 7.5H21L14 2 3 20h5.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Wanderzeit: Uhr-Symbol, kühler Himmel-Ton. */
.bg-grid-stat--duration {
	color: #1f6f8b;
	background: #dcecf2;
}
.bg-grid-stat--duration .bg-grid-stat-icon {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 .001 20.001A10 10 0 0 0 12 2zm1 10.59V6h-2v7.41l4.29 4.3 1.42-1.42z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 .001 20.001A10 10 0 0 0 12 2zm1 10.59V6h-2v7.41l4.29 4.3 1.42-1.42z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Strecke: Loop-/Pfad-Symbol, Wiesen-Ton. */
.bg-grid-stat--distance {
	color: #4a7c59;
	background: #e4efe0;
}
.bg-grid-stat--distance .bg-grid-stat-icon {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12a8 8 0 1 1 8 8 1 1 0 0 1 0-2 6 6 0 1 0-6-6 1 1 0 0 1-2 0z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12a8 8 0 1 1 8 8 1 1 0 0 1 0-2 6 6 0 1 0-6-6 1 1 0 0 1-2 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Startrichtung: kleine Windrose statt Distanz-Badge. */
.bg-grid-stat--richtung {
	padding: 0.2rem;
	background: #fff;
	border: 1px solid #e2e2e2;
}
.bg-grid-stat-compass {
	display: flex;
	align-items: center;
	justify-content: center;
}
.bg-grid-stat-compass svg {
	display: block;
}

.bg-grid-card-date {
	font-size: 11px;
	color: var(--bg-grid-date);
}

.bg-grid-empty {
	color: #666;
	font-style: italic;
}

.bg-grid-pagination .page-numbers {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 2rem 0 0;
	padding: 0;
}

.bg-grid-pagination .page-numbers li {
	margin: 0;
}

.bg-grid-pagination a.page-numbers,
.bg-grid-pagination span.page-numbers,
.bg-grid-pagination a.page-numbers:link,
.bg-grid-pagination a.page-numbers:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 2.25rem;
	block-size: 2.25rem;
	padding: 0 0.6rem;
	border-radius: var(--bg-grid-radius, 5px);
	font-size: 14px;
	color: var(--bg-grid-text, #333333) !important;
	text-decoration: none !important;
	background: #f4f4f2;
}

.bg-grid-pagination a.page-numbers:hover,
.bg-grid-pagination a.page-numbers:focus-visible {
	background: #e6e6e3;
}

.bg-grid-pagination span.page-numbers.current {
	background: var(--bg-grid-text, #333333);
	color: #fff !important;
	font-weight: 600;
}

.bg-grid-pagination span.page-numbers.dots {
	background: none;
}

.bg-grid-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
}
.bg-grid-filters--richtung {
	margin-top: -0.75rem;
}

#bg-grid-anchor {
	display: block;
	/* Falls das Theme eine fixierte Kopfzeile hat, verhindert das, dass der Anker-Sprung den
	   Filter/das Grid direkt darunter versteckt. 100px ist ein grosszügiger Standardwert. */
	scroll-margin-top: 100px;
}

.bg-grid-filter,
.bg-grid-filter:link,
.bg-grid-filter:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	color: var(--bg-grid-text, #333333) !important;
	text-decoration: none !important;
	background: #f4f4f2;
	border: 1px solid transparent;
}

/* Grenzwert im Label ("Kurz (bis 1:40 h)"): dezenter als das Stichwort selbst. */
.bg-grid-filter-hint {
	font-weight: 400;
	opacity: 0.8;
	margin-inline-start: 0.35em;
	white-space: nowrap;
}

.bg-grid-filter:hover,
.bg-grid-filter:focus-visible {
	background: #e6e6e3;
}

.bg-grid-filter--current,
.bg-grid-filter--current:link,
.bg-grid-filter--current:visited {
	background: var(--bg-grid-text, #333333);
	color: #fff !important;
}

.bg-grid-filter--current:hover,
.bg-grid-filter--current:focus-visible {
	background: var(--bg-grid-text, #333333);
}
