/**
 * Project Grid — Filterable Video Projects
 */

/* ── Filter Buttons ── */
.project-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 8px 0;
	margin-bottom: 16px;
}

.project-filters::-webkit-scrollbar {
	display: none;
}

.project-filters__btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	padding: 8px 16px;
	border: 1px solid var(--wp--preset--color--light-gray);
	border-radius: 24px;
	background: transparent;
	color: var(--wp--preset--color--slate);
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.1px;
	cursor: pointer;
	transition:
		background 0.2s,
		color 0.2s,
		border-color 0.2s;
	white-space: nowrap;
}

.project-filters__btn:hover {
	border-color: var(--wp--preset--color--rich-black);
	color: var(--wp--preset--color--rich-black);
}

.project-filters__btn.is-active {
	background: var(--wp--preset--color--rich-black);
	border-color: var(--wp--preset--color--rich-black);
	color: var(--wp--preset--color--warm-white);
}

.project-filters__btn.is-unavailable {
	opacity: 0.35;
	pointer-events: none;
	cursor: default;
}

/* ── Secondary Filter (hidden by default, revealed on industry selection) ── */
.project-filters--secondary {
	display: none;
	padding-top: 8px;
}

.project-filters--secondary.is-visible {
	display: flex;
	margin-bottom: 32px;
}

/* ── Project Grid ── */
.project-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 32px;
	row-gap: 48px;
	min-height: 200px;
}

.project-grid.is-loading {
	opacity: 0.4;
	pointer-events: none;
}

/* ── Suppress wpautop artefacts injected when shortcode runs inside UAGB/Spectra Container ── */
.project-grid > p {
	display: none;
}

.project-item > p,
.project-item__meta > p {
	margin: 0;
	padding: 0;
	line-height: 0;
}

.project-item br,
.project-item__image br {
	display: none;
}

/* ── Project Item ── */
.project-item {
	display: block;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	background: transparent;
	transition: transform 0.2s ease;
}

.project-item:hover {
	transform: translateY(-4px);
}

.project-item__image {
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--wp--preset--color--ghost-white);
	border-radius: 4px;
}

.project-item__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.project-item:hover .project-item__image img {
	transform: scale(1.03);
}

.project-item__placeholder {
	width: 100%;
	height: 100%;
	background: var(--wp--preset--color--outline);
}

.project-item__meta {
	padding: 12px 0 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.project-item__tags {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-family: 'Roboto Mono', monospace;
	font-size: 11px;
	color: var(--wp--preset--color--steel);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	line-height: 1.2;
}

.project-item__client-tag,
.project-item__service-tag {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.project-item__title {
	margin: 0;
	font-family: 'Roboto', sans-serif;
	font-size: 20px;
	font-weight: 500;
	color: var(--wp--preset--color--rich-black);
	line-height: 1.2;
	letter-spacing: -0.4px;
}

.project-item__client {
	display: none;
}

/* ── Empty State ── */
.project-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: var(--wp--preset--spacing--x-large)
		var(--wp--preset--spacing--medium);
	color: var(--wp--preset--color--neutral);
}

/* ── Skeleton Loading ── */
.project-grid__loading[hidden] {
	display: none;
}

.project-grid__loading:not([hidden]) {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 32px;
	row-gap: 48px;
}

.project-item--skeleton .project-item__image {
	aspect-ratio: 16 / 9;
	background: linear-gradient(
		90deg,
		var(--wp--preset--color--surface) 25%,
		var(--wp--preset--color--outline) 50%,
		var(--wp--preset--color--surface) 75%
	);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.5s infinite;
}

.project-item--skeleton .project-item__meta {
	padding: var(--wp--preset--spacing--small);
}

.project-item--skeleton .project-item__title {
	height: 1em;
	width: 70%;
	background: var(--wp--preset--color--outline);
	border-radius: 4px;
}

.project-item--skeleton .project-item__client {
	display: block;
	height: 0.8em;
	width: 40%;
	margin-top: var(--wp--preset--spacing--xxx-small);
	background: var(--wp--preset--color--outline);
	border-radius: 4px;
}

@keyframes skeleton-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* ── Pagination ── */
.project-grid__pagination {
	text-align: right;
	margin-top: 40px;
}

.project-grid__load-more {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--wp--preset--color--slate);
	font-family: 'Roboto', sans-serif;
	font-size: 18px;
	font-weight: 400;
	cursor: pointer;
	transition: color 0.2s ease, gap 0.2s ease;
}

.project-grid__load-more:hover {
	color: var(--wp--preset--color--rich-black);
	gap: 20px;
}

/* ── 2-column variant ── */
.project-filters-wrap[data-columns="2"] .project-grid,
.project-filters-wrap[data-columns="2"] .project-grid__loading:not([hidden]) {
	grid-template-columns: repeat(2, 1fr);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
	.project-grid,
	.project-grid__loading {
		grid-template-columns: repeat(2, 1fr);
	}

	.project-filters-wrap[data-columns="2"] .project-grid,
	.project-filters-wrap[data-columns="2"] .project-grid__loading:not([hidden]) {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.project-grid,
	.project-grid__loading {
		grid-template-columns: 1fr;
	}

	.project-filters-wrap[data-columns="2"] .project-grid,
	.project-filters-wrap[data-columns="2"] .project-grid__loading:not([hidden]) {
		grid-template-columns: 1fr;
	}
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
	.project-item,
	.project-item__image img,
	.project-filters__btn,
	.project-grid__load-more {
		transition: none;
	}

	.project-item--skeleton .project-item__image {
		animation: none;
	}
}

/* ══════════════════════════════════════════════════════════
   FEATURED PROJECT HERO
   ══════════════════════════════════════════════════════════ */

.featured-project {
	display: grid;
	grid-template-columns: minmax(0, 524px) 1fr;
	gap: clamp(32px, 11.8vw, 142px);
	align-items: start;
	margin-bottom: var(--wp--preset--spacing--x-large);
}

/* ── Left column (label + media) ── */
.featured-project__left {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ── Labels: above-media label and right-column kicker ── */
.featured-project__label,
.featured-project__kicker {
	font-family: 'Roboto Mono', monospace;
	font-size: 0.75em;
	line-height: 1.4;
	color: var(--wp--preset--color--steel);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 1rem;
}

/* ── Media ── */
.featured-project__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 4px;
	background: var(--wp--preset--color--pale-gray);
	aspect-ratio: 16 / 9;
	text-decoration: none;
}

.featured-project__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.featured-project__media:hover img {
	transform: scale(1.03);
}

.featured-project__media:focus-visible {
	outline: 2px solid var(--wp--preset--color--vpe-red);
	outline-offset: 4px;
}

/* ── Placeholder (no thumbnail) ── */
.featured-project__media--placeholder {
	cursor: default;
	display: flex;
	align-items: center;
	justify-content: center;
}

.featured-project__play-icon {
	color: var(--wp--preset--color--steel);
	display: block;
}

/* ── Content (right column) ── */
.featured-project__content {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.featured-project__kicker {
	margin-bottom: 8px;
}

.featured-project__title {
	font-size: clamp(1.5rem, 2.5vw, 2.25rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
}

.featured-project__title a {
	color: var(--wp--preset--color--rich-black);
	text-decoration: none;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.featured-project__title a:hover {
	color: var(--wp--preset--color--vpe-red);
}

.featured-project__title a:focus-visible {
	outline: 2px solid var(--wp--preset--color--vpe-red);
	outline-offset: 4px;
	border-radius: 2px;
}

.featured-project__excerpt {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--wp--preset--color--slate);
	margin: 0 0 28px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.featured-project {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.featured-project__media img {
		transition: none;
	}
}
