/* Block Khu công nghiệp (Figma "Detail page → Cooperate" → Frame 101: 1808 × 886, top 150 (46 dưới header);
   chữ nền Zalando 800 198/194 #B3B3B3 20%: "INDUSTRIAL" left 7, "PARK" left 986 top 186;
   thẻ 585 × 345 bo 16, bóng 0 4 10 / 10%: thẻ 1 (0, 413), thẻ 2 (611.5, 541), thẻ 3 (1223, 413)) */

.block-parks {
	position: relative;
	display: grid;
	gap: 24px;
	margin: clamp(24px, 2.4vw, 46px) var(--gutter) 0;
}

.block-parks__decor {
	font-size: clamp(48px, 10.31vw, 198px);
	line-height: 0.98;
	text-align: left;
	white-space: normal;
}

.block-parks__decor--2 {
	text-align: right;
}

.block-parks__list {
	display: grid;
	gap: 24px;
}

/*
 * Ảnh cắt chéo bằng clip-path theo vị trí thẻ (đo trên thẻ 585 × 345 trong Figma).
 * Thẻ không chọn: nền trắng, ảnh đen trắng, tên chữ đen; thẻ đang chọn: nền xanh, ảnh màu, chữ trắng + thông tin.
 */
.park-card {
	--pc-shape: polygon(31% 0, 100% 0, 100% 72%, 72% 92%, 47% 80%, 31% 50%);
	--pc-bg: #fff;
	--pc-ink: #111;
	--pc-filter: grayscale(1);
	--pc-facts: none;
	position: relative;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	border-radius: var(--radius-md);
	aspect-ratio: 585 / 345;
	background: var(--pc-bg);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	color: var(--pc-ink);
	outline-offset: 4px;
	isolation: isolate;
	transition: background-color 0.35s ease, color 0.35s ease;
}

.park-card:nth-child(3n + 2) { --pc-shape: polygon(40% 0, 100% 0, 100% 100%, 79% 100%, 13% 35%); }
.park-card:nth-child(3n + 3) { --pc-shape: polygon(20% 0, 100% 0, 100% 100%, 48% 100%); }

/* Feedback vòng 4: mặc định cả 3 thẻ đen trắng; rê chuột / focus thẻ nào thì thẻ đó nền xanh, ảnh màu, hiện số liệu.
   Thiết bị cảm ứng (không rê chuột được): thẻ "Chọn sẵn" nổi bật sẵn, không thì không bao giờ thấy số liệu. */
.park-card:focus-within {
	--pc-bg: #3d9df3;
	--pc-ink: #fff;
	--pc-filter: none;
	--pc-facts: grid;
}

@media (hover: hover) {
	.park-card:hover {
		--pc-bg: #3d9df3;
		--pc-ink: #fff;
		--pc-filter: none;
		--pc-facts: grid;
	}
}

@media (hover: none) {
	.park-card--default {
		--pc-bg: #3d9df3;
		--pc-ink: #fff;
		--pc-filter: none;
		--pc-facts: grid;
	}
}

.park-card__image {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	clip-path: var(--pc-shape);
	filter: var(--pc-filter);
	transition: filter 0.35s ease;
}

.park-card > picture {
	display: contents;
}

.park-card__body {
	display: grid;
	gap: clamp(8px, 0.94vw, 18px);
	max-width: 70%;
	padding: clamp(16px, 1.04vw, 20px) clamp(16px, 1.04vw, 20px) clamp(20px, 1.82vw, 35px);
}

.park-card__name {
	font-size: clamp(22px, 2.08vw, 40px);
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
	color: inherit;
}

.park-card__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
}

.park-card__link .icon {
	width: 0.85em;
	height: 0.85em;
}

.park-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.park-card__facts {
	display: var(--pc-facts);
	gap: 4px;
	font-size: clamp(12px, 0.73vw, 14px);
	line-height: 1.4;
}

.park-card__facts div {
	display: flex;
	flex-wrap: wrap;
	gap: 0 4px;
}

/* Desktop: dựng theo toạ độ Figma trên khung 1808 × 886. */
@media (min-width: 1024px) {
	.block-parks {
		display: block;
		aspect-ratio: 1808 / 886;
	}

	.block-parks__decor {
		position: absolute;
		left: 0.37%;          /* 7 / 1808 */
		top: 0;
	}

	.block-parks__decor--2 {
		right: 3.98%;         /* (1808 − 986 − 750) / 1808 */
		left: auto;
		top: 21.05%;          /* 186.5 / 886 */
	}

	.block-parks__list {
		display: contents;
	}

	.park-card {
		position: absolute;
		width: 32.36%;        /* 585 / 1808 */
	}

	.park-card:nth-child(3n + 1) { top: 46.6%; left: 0; }            /* 413 / 886 */
	.park-card:nth-child(3n + 2) { top: 61.06%; left: 33.82%; }      /* 541 / 886, 611.5 / 1808 */
	.park-card:nth-child(3n + 3) { top: 46.6%; left: 67.64%; }       /* 1223 / 1808 */
}

@media (prefers-reduced-motion: reduce) {
	.park-card,
	.park-card__image {
		transition: none;
	}
}

/* Mobile / tablet (feedback vòng 4): thẻ trên 1 dải cuộn ngang, thẻ sau ló ra mép phải. */
@media (max-width: 1023px) {
	.block-parks {
		margin-inline: 0;
	}

	.block-parks__decor {
		padding-inline: var(--gutter);
		font-size: 8.6vw; /* "INDUSTRIAL" vừa bề ngang như Figma mobile, không làm trang cuộn ngang */
	}

	.block-parks__list {
		display: flex;
		gap: 16px;
		padding: 8px var(--gutter) 24px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		scrollbar-width: none;
	}

	.block-parks__list::-webkit-scrollbar {
		display: none;
	}

	.park-card {
		flex: 0 0 min(76vw, 440px);
		scroll-snap-align: start;
	}
}
