/* Pinned Portfolio Grid: styled for Dover (burgundy #85152F, gold #B79465, Montserrat + EB Garamond).
 * Override the custom properties on .ppg from theme CSS to re-skin for another site. */

.ppg {
	--ppg-primary: #85152f;
	--ppg-primary-dark: #6a1026;
	--ppg-accent: #b79465;
	--ppg-ink: #1a1a1a;
	--ppg-muted: #767b91;
	--ppg-surface: #ffffff;
	--ppg-radius: 0;
	--ppg-gap: 24px;
	--ppg-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ppg-font-ui: "Montserrat", sans-serif;
	--ppg-font-display: "EB Garamond", Georgia, serif;
	width: 100%;
	min-width: 0;
}

/* ---------------------------------------------------------------------
 * Filter pills
 * ------------------------------------------------------------------ */

.ppg .ppg-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 10px;
	margin: 0 0 40px;
	padding: 0;
}

/* Specificity (0,2,0) beats the Elementor kit's global "button" rule. */
.ppg .ppg-filter {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 22px;
	background: transparent;
	border: 1px solid var(--ppg-primary);
	border-radius: 0;
	box-shadow: none;
	font-family: var(--ppg-font-ui);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--ppg-primary);
	cursor: pointer;
	transition:
		background-color 0.25s var(--ppg-ease),
		color 0.25s var(--ppg-ease),
		border-color 0.25s var(--ppg-ease),
		box-shadow 0.25s var(--ppg-ease),
		transform 0.25s var(--ppg-ease);
}

.ppg .ppg-filter:hover {
	background: rgba(133, 21, 47, 0.08);
	color: var(--ppg-primary-dark);
	border-color: var(--ppg-primary-dark);
	box-shadow: none;
	transform: translateY(-1px);
}

.ppg .ppg-filter.is-active,
.ppg .ppg-filter.is-active:hover {
	background: var(--ppg-primary);
	color: #ffffff;
	border-color: var(--ppg-primary);
	box-shadow: 0 6px 16px -6px rgba(133, 21, 47, 0.55);
	transform: none;
}

.ppg .ppg-filter:focus-visible {
	outline: 2px solid var(--ppg-accent);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------
 * Grid
 * ------------------------------------------------------------------ */

.ppg .ppg-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--ppg-gap);
	width: 100%;
	min-width: 0;
}

.ppg .ppg-item {
	min-width: 0;
	margin: 0;
	opacity: 0;
	transform: translateY(14px);
	animation: ppg-rise 0.55s var(--ppg-ease) forwards;
	animation-delay: calc(var(--ppg-i, 0) * 45ms);
}

.ppg .ppg-item[hidden] {
	display: none;
}

@keyframes ppg-rise {
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------------------------------------------------------------------
 * Card
 * ------------------------------------------------------------------ */

.ppg .ppg-link {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--ppg-radius);
	background: var(--ppg-ink);
	text-decoration: none;
	color: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px -12px rgba(0, 0, 0, 0.25);
	transition: transform 0.45s var(--ppg-ease), box-shadow 0.45s var(--ppg-ease);
}

.ppg .ppg-link:hover,
.ppg .ppg-link:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 22px 40px -16px rgba(0, 0, 0, 0.4);
}

.ppg .ppg-link:focus-visible {
	outline: 2px solid var(--ppg-accent);
	outline-offset: 3px;
}

.ppg .ppg-thumb {
	aspect-ratio: 4 / 3;
	background: #eeeeee;
	overflow: hidden;
}

.ppg .ppg-thumb img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.001);
	transition: transform 0.9s var(--ppg-ease), filter 0.6s var(--ppg-ease);
	will-change: transform;
}

/* WebP plugins may wrap the image in <picture>; keep it filling the thumb box. */
.ppg .ppg-thumb picture {
	display: block;
	width: 100%;
	height: 100%;
}

.ppg .ppg-thumb img[hidden],
.ppg .ppg-thumb picture[hidden] {
	display: none;
}

.ppg .ppg-link:hover .ppg-thumb img,
.ppg .ppg-link:focus-visible .ppg-thumb img {
	transform: scale(1.07);
}

/* Caption overlay: always shows the title; the category chips and CTA reveal on hover. */
.ppg .ppg-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	padding: 22px 22px 20px;
	background: linear-gradient(to top, rgba(20, 8, 12, 0.7) 0%, rgba(20, 8, 12, 0.28) 38%, rgba(20, 8, 12, 0) 62%);
	transition: background 0.4s var(--ppg-ease);
}

.ppg .ppg-link:hover .ppg-overlay,
.ppg .ppg-link:focus-visible .ppg-overlay {
	background: linear-gradient(to top, rgba(20, 8, 12, 0.94) 0%, rgba(60, 12, 24, 0.5) 50%, rgba(133, 21, 47, 0.12) 100%);
}

.ppg .ppg-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: 100%;
	margin: 0 0 10px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.35s var(--ppg-ease), transform 0.35s var(--ppg-ease);
}

/* Quiet glass chips, so three or four categories still read as one tidy row. */
.ppg .ppg-cat {
	display: inline-block;
	margin: 0;
	padding: 4px 9px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.4);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-family: var(--ppg-font-ui);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.3;
	text-transform: uppercase;
	white-space: nowrap;
	color: #ffffff;
	transition: background-color 0.25s var(--ppg-ease), border-color 0.25s var(--ppg-ease);
}

/* The active tab's category leads the row in brand burgundy. */
.ppg .ppg-cat.is-active {
	background: var(--ppg-primary);
	border-color: var(--ppg-primary);
}

.ppg .ppg-title {
	margin: 0;
	font-family: var(--ppg-font-display);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.2;
	text-align: left;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	transition: transform 0.35s var(--ppg-ease);
	overflow-wrap: anywhere;
}

.ppg .ppg-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-height: 0;
	margin-top: 0;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 0;
	font-family: var(--ppg-font-ui);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #ffffff;
	opacity: 0;
	overflow: hidden;
	transform: translateY(8px);
	transition:
		max-height 0.4s var(--ppg-ease),
		margin-top 0.4s var(--ppg-ease),
		padding 0.4s var(--ppg-ease),
		opacity 0.35s var(--ppg-ease) 0.05s,
		transform 0.35s var(--ppg-ease) 0.05s,
		background-color 0.25s var(--ppg-ease);
}

.ppg .ppg-cta svg {
	width: 14px;
	height: 14px;
	flex: none;
	transition: transform 0.3s var(--ppg-ease);
}

.ppg .ppg-link:hover .ppg-cats,
.ppg .ppg-link:focus-visible .ppg-cats {
	opacity: 1;
	transform: none;
}

.ppg .ppg-link:hover .ppg-cta,
.ppg .ppg-link:focus-visible .ppg-cta {
	max-height: 40px;
	margin-top: 14px;
	padding: 8px 16px;
	opacity: 1;
	transform: none;
}

.ppg .ppg-link:hover .ppg-cta svg {
	transform: translateX(3px);
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.ppg .ppg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		--ppg-gap: 18px;
	}

	.ppg .ppg-title {
		font-size: 21px;
	}
}

@media (max-width: 767px) {
	.ppg .ppg-grid {
		grid-template-columns: minmax(0, 1fr);
		--ppg-gap: 16px;
	}

	.ppg .ppg-filters {
		gap: 8px;
		margin-bottom: 28px;
	}

	.ppg .ppg-filter {
		padding: 8px 16px;
		font-size: 11px;
	}

	/* No hover on touch: keep the category chips and CTA visible. */
	.ppg .ppg-cats {
		opacity: 1;
		transform: none;
	}

	.ppg .ppg-cta {
		max-height: 40px;
		margin-top: 14px;
		padding: 8px 16px;
		opacity: 1;
		transform: none;
	}
}

@media (hover: none) {
	.ppg .ppg-cats,
	.ppg .ppg-cta {
		opacity: 1;
		transform: none;
	}

	.ppg .ppg-cta {
		max-height: 40px;
		margin-top: 14px;
		padding: 8px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ppg .ppg-item {
		animation: none;
		opacity: 1;
		transform: none;
	}

	.ppg .ppg-link,
	.ppg .ppg-thumb img,
	.ppg .ppg-filter,
	.ppg .ppg-cats,
	.ppg .ppg-cat,
	.ppg .ppg-cta,
	.ppg .ppg-overlay {
		transition: none;
	}

	.ppg .ppg-link:hover {
		transform: none;
	}

	.ppg .ppg-link:hover .ppg-thumb img {
		transform: none;
	}
}
