/*
 * Hunde-Kacheln (Block pv-dogs/groups), Beschluss 2026-11-08
 * Muster A: Foto-Kacheln im Stil der Hundekarten (list.css) mit Anzahl.
 * Spalten nach der Breite des Blocks (Container-Abfrage): 2 / 3 / 5.
 */

@font-face {
	font-family: "PV Roboto";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/roboto-normal-latin-400.woff2") format("woff2");
}

@font-face {
	font-family: "PV Roboto";
	font-style: normal;
	font-weight: 600 700;
	font-display: swap;
	src: url("fonts/roboto-normal-latin-700.woff2") format("woff2");
}

.pv-dogs-groups {
	--pv-dogs-accent: #79b835; /* Logo/Knöpfe, wie list.css */
	--pv-dogs-link: #4a7c22; /* Links, 5,0 : 1 */
	--pv-dogs-line-soft: #dcdcde;
	--pv-dogs-radius: 6px;
	container-type: inline-size;
	margin: 0 0 32px;
}

/* Kacheln in der Schrift der Hundekarten; Hinweise darunter in der Schrift der Seite (wie die Einleitung) */
.pv-dogs-groups .pv-dogs-groups__grid {
	font-family: "PV Roboto", Roboto, Arial, sans-serif;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pv-dogs-groups .pv-dogs-groups__item {
	margin: 0;
	padding: 0;
}

/* Schmal (2 Spalten): „Alle Hunde“ und die letzte Kachel über die ganze Breite,
   damit keine Lücke bleibt (9 Gruppen + „Alle“). */
.pv-dogs-groups__item--all,
.pv-dogs-groups__item:last-child {
	grid-column: 1 / -1;
}

.pv-dogs-groups .pv-dogs-groups__tile {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	color: #fff;
	background: #e9e7e2;
	border-radius: var(--pv-dogs-radius);
	text-decoration: none;
	isolation: isolate;
	/* Astra setzt an Links „transition: all .2s“ – ändert sich beim Laden die
	   Größe (Bildlaufleiste, Spaltenwechsel), fuhr die Kachel sichtbar auf. */
	transition: none;
}

.pv-dogs-groups__item:last-child .pv-dogs-groups__tile {
	aspect-ratio: 8 / 3;
}

/* Bildstimmung wie die Hundekarten (list.css) */
.pv-dogs-groups__tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #50627a;
	mix-blend-mode: soft-light;
	opacity: .28;
	pointer-events: none;
}

.pv-dogs-groups .pv-dogs-groups__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	filter: saturate(.65) contrast(.85) brightness(1.1);
	transition: transform .35s ease;
}

/* Leichter Zoom nur mit Maus, nicht auf Touch (dort bliebe er nach dem Tippen stehen) */
@media (hover: hover) and (pointer: fine) {
	a.pv-dogs-groups__tile:hover .pv-dogs-groups__image {
		transform: scale(1.04);
	}
}

a.pv-dogs-groups__tile:focus-visible {
	outline: 3px solid var(--pv-dogs-link);
	outline-offset: 3px;
}

/* Weiße Schrift mit kurzem Verlauf wie die Hundekarte (≈ 4,8 : 1 auf weißem Foto) */
.pv-dogs-groups__caption {
	position: absolute;
	z-index: 1;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 26px 10px 9px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
	background: linear-gradient(to top, rgba(0, 0, 0, .7) 0, rgba(0, 0, 0, .55) calc(100% - 26px), rgba(0, 0, 0, 0) 100%);
}

.pv-dogs-groups__name {
	display: block;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.15;
	overflow-wrap: break-word;
	hyphens: auto;
}

.pv-dogs-groups__count {
	display: block;
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.3;
}

/* „Alle Hunde“: grüne Fläche statt Foto, niedriger solange sie über die ganze Breite geht */
.pv-dogs-groups__item--all .pv-dogs-groups__tile {
	aspect-ratio: auto;
	min-height: 84px;
	background: var(--pv-dogs-accent);
}

.pv-dogs-groups__item--all .pv-dogs-groups__tile::after {
	display: none;
}

.pv-dogs-groups__item--all .pv-dogs-groups__caption {
	top: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 12px 14px 11px;
	background: none;
	text-shadow: none;
}

.pv-dogs-groups__item--all .pv-dogs-groups__name {
	font-size: 22px;
}

/* Ohne Foto (noch keins gewählt): Grundfläche, Schrift bleibt lesbar */
.pv-dogs-groups__item.has-no-image:not(.pv-dogs-groups__item--all) .pv-dogs-groups__tile {
	background: #8a8f94;
}

/* Hinweis „Fragen an unser Team“ (Inhalt der bisherigen Seite) */
.pv-dogs-groups .pv-dogs-groups__note {
	margin: 24px 0 0;
	padding: 14px 16px;
	color: #3c434a;
	background: #f6f7f7;
	border: 1px solid var(--pv-dogs-line-soft);
	border-radius: var(--pv-dogs-radius);
	font-size: 15px;
	line-height: 1.5;
}

.pv-dogs-groups .pv-dogs-groups__note a {
	color: var(--pv-dogs-link);
	font-weight: 600;
}

/* Sehr schmal (kleine Handys): Schrift etwas kleiner, damit das Foto sichtbar bleibt */
@container (max-width: 359px) {
	.pv-dogs-groups__caption {
		padding: 20px 8px 7px;
		background: linear-gradient(to top, rgba(0, 0, 0, .7) 0, rgba(0, 0, 0, .55) calc(100% - 20px), rgba(0, 0, 0, 0) 100%);
	}

	.pv-dogs-groups__name {
		font-size: 15px;
	}

	.pv-dogs-groups__count {
		font-size: 13px;
	}
}

/* Mittel: 3 Spalten, „Alle Hunde“ eine eigene Reihe, dann 3 × 3 */
@container (min-width: 600px) {
	.pv-dogs-groups .pv-dogs-groups__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}

	.pv-dogs-groups__item:last-child {
		grid-column: auto;
	}

	.pv-dogs-groups__item:last-child .pv-dogs-groups__tile {
		aspect-ratio: 4 / 3;
	}

	.pv-dogs-groups__caption {
		padding: 30px 14px 11px;
		background: linear-gradient(to top, rgba(0, 0, 0, .7) 0, rgba(0, 0, 0, .55) calc(100% - 30px), rgba(0, 0, 0, 0) 100%);
	}

	.pv-dogs-groups__name {
		font-size: 19px;
	}

	.pv-dogs-groups__item--all .pv-dogs-groups__tile {
		min-height: 96px;
	}

	.pv-dogs-groups__item--all .pv-dogs-groups__name {
		font-size: 24px;
	}

	.pv-dogs-groups .pv-dogs-groups__note {
		margin-top: 28px;
		padding: 16px 20px;
		font-size: 16px;
	}
}

/* Breit: 2 Reihen à 5, „Alle Hunde“ als erste Kachel */
@container (min-width: 1000px) {
	.pv-dogs-groups .pv-dogs-groups__grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.pv-dogs-groups__item--all {
		grid-column: auto;
	}

	.pv-dogs-groups__item--all .pv-dogs-groups__tile {
		aspect-ratio: 4 / 3;
		min-height: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pv-dogs-groups .pv-dogs-groups__image {
		transition: none;
	}

	a.pv-dogs-groups__tile:hover .pv-dogs-groups__image {
		transform: none;
	}
}
