/* =========================================================
   Anderl Design-Vorlage: Kategorie-Karten
   Gutenberg-Klassen:
   .anderl-kartenraster + .anderl-karten-3 / .anderl-karten-4
   .anderl-kategorie-karte
   .anderl-kategorie-bild
   .anderl-kategorie-subtitle
   .anderl-kategorie-link
========================================================= */
.anderl-kartenraster {
	display: grid !important;
	gap: clamp(16px, 2vw, 26px);
	width: 100%;
	align-items: stretch;
}

.anderl-kartenraster.anderl-karten-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.anderl-kartenraster.anderl-karten-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.anderl-kategorie-karte {
	display: flex !important;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	padding: 0 !important;
	background: #fff;
	border: 1px solid rgba(94, 33, 41, .09);
	border-radius: 5px;
	box-shadow: 0 5px 18px rgba(42, 32, 26, .08);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.anderl-kategorie-karte:hover {
	transform: translateY(-3px);
	border-color: rgba(94, 33, 41, .18);
	box-shadow: 0 9px 25px rgba(42, 32, 26, .13);
}

.anderl-kategorie-bild {
	width: 100%;
	margin: 0 !important;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 0 !important;
}

.anderl-kategorie-bild img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0 !important;
	transition: transform .3s ease;
}

.anderl-kategorie-karte:hover .anderl-kategorie-bild img {
	transform: scale(1.015);
}

.anderl-kategorie-karte > :not(.anderl-kategorie-bild) {
	margin-left: clamp(14px, 1.7vw, 21px);
	margin-right: clamp(14px, 1.7vw, 21px);
}

.anderl-kategorie-karte > .anderl-kategorie-bild + * {
	margin-top: clamp(14px, 1.7vw, 21px);
}

.anderl-kategorie-karte h3 {
	margin-bottom: 5px;
	color: var(--am-ui-red, #5e2129);
	font-size: clamp(1.2rem, 1.45vw, 1.55rem);
	line-height: 1.15;
}

.anderl-kategorie-subtitle {
	margin-top: 0 !important;
	margin-bottom: 8px !important;
	color: rgba(94, 33, 41, .78);
	font-size: .88rem;
	font-weight: 650;
	line-height: 1.3;
}

.anderl-kategorie-karte p:not(.anderl-kategorie-subtitle) {
	font-size: .98rem;
	line-height: 1.45;
}

.anderl-kategorie-link {
	display: inline-block;
	margin-top: auto !important;
	margin-bottom: clamp(14px, 1.7vw, 21px) !important;
	padding-top: 8px;
	font-weight: 650;
	color: var(--am-ui-green, #616942) !important;
	text-decoration: none !important;
}

.anderl-kategorie-link:hover,
.anderl-kategorie-link:focus-visible {
	color: var(--am-ui-red, #5e2129) !important;
}

@media (max-width: 1024px) {
	.anderl-kartenraster.anderl-karten-3,
	.anderl-kartenraster.anderl-karten-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 767px) {
	/* Bewusst zwei Karten nebeneinander – wie auf der Wein-Seite. */
	.anderl-kartenraster.anderl-karten-3,
	.anderl-kartenraster.anderl-karten-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 11px;
	}

	.anderl-kategorie-karte > :not(.anderl-kategorie-bild) {
		margin-left: 11px;
		margin-right: 11px;
	}

	.anderl-kategorie-karte > .anderl-kategorie-bild + * {
		margin-top: 11px;
	}

	.anderl-kategorie-karte h3 {
		font-size: 1.04rem;
		line-height: 1.18;
	}

	.anderl-kategorie-subtitle {
		font-size: .72rem;
	}

	.anderl-kategorie-karte p:not(.anderl-kategorie-subtitle) {
		font-size: .79rem;
		line-height: 1.32;
	}

	.anderl-kategorie-link {
		margin-bottom: 11px !important;
		font-size: .78rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.anderl-kategorie-karte,
	.anderl-kategorie-bild img {
		transition: none;
	}
}
