/* Портфолио: видео-превью проектов + галерея объекта */

.pf-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 10px 0 34px;
}
.pf-filter button {
	appearance: none;
	border: 1px solid #d9dce3;
	background: #fff;
	color: #1a1a1a;
	padding: 10px 22px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s;
}
.pf-filter button:hover {
	border-color: #1a1a1a;
}
.pf-filter button.is-active {
	background: #1a1a1a;
	border-color: #1a1a1a;
	color: #fff;
}

.pf-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.pf-card {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 14px;
	background: #e9ebef;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
	animation: pfIn .5s ease both;
}
.pf-card:hover,
.pf-card:focus {
	color: #fff;
	text-decoration: none;
}
.pf-card[hidden] {
	display: none !important;
}

.pf-media,
.pf-media video,
.pf-media img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.pf-media video,
.pf-media img {
	object-fit: cover;
	transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.pf-card:hover .pf-media video,
.pf-card:hover .pf-media img {
	transform: scale(1.06);
}

/* затемнение снизу под подпись */
.pf-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, 0) 55%);
}

.pf-count {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	border-radius: 999px;
	background: rgba(0, 0, 0, .45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.pf-info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: block;
	padding: 22px 20px 18px;
}
.pf-title {
	display: block;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
}
.pf-sub {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	opacity: .8;
}
.pf-cta {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	opacity: .9;
	transform: translateY(0);
	transition: transform .3s, opacity .3s;
}
.pf-card:hover .pf-cta {
	transform: translateX(4px);
	opacity: 1;
}

.pf-more-wrap {
	margin-top: 34px;
	text-align: center;
}
.pf-more[hidden] {
	display: none !important;
}

@keyframes pfIn {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	.pf-card {
		animation: none;
	}
	.pf-media video,
	.pf-media img {
		transition: none;
	}
}

/* планшет */
@media (max-width: 991px) {
	.pf-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
}

/* телефон: две колонки, компактные подписи */
@media (max-width: 575px) {
	.pf-grid {
		gap: 10px;
	}
	.pf-card {
		aspect-ratio: 3 / 4;
		border-radius: 10px;
	}
	.pf-info {
		padding: 16px 12px 12px;
	}
	.pf-title {
		font-size: 14px;
	}
	.pf-sub {
		display: none;
	}
	.pf-cta {
		font-size: 12px;
		margin-top: 6px;
	}
	.pf-count {
		top: 8px;
		right: 8px;
		padding: 5px 9px;
		font-size: 11px;
	}
	.pf-filter {
		gap: 8px;
		margin-bottom: 22px;
	}
	.pf-filter button {
		padding: 8px 14px;
		font-size: 12px;
	}
}
