/**
 * Archive Projetos — listagem do CPT projeto.
 * Paleta e tipografia: Astra (globais + fallbacks do site).
 */

body.post-type-archive-projeto {
	--projeto-cyan: var(--ast-global-color-2, #00a5cf);
	--projeto-teal: var(--ast-global-color-0, #003b4a);
	--projeto-teal-mid: var(--ast-global-color-1, #236373);
	--projeto-ice: #d5e7ec;
	--projeto-gray: var(--ast-global-color-6, #f7f7f7);
	--projeto-white: var(--ast-global-color-5, #ffffff);
	--projeto-ink: var(--ast-global-color-3, #121212);
	--projeto-muted: var(--ast-global-color-4, #54595f);
	--projeto-shell: 1200px;
	--projeto-gutter: 40px;
	--projeto-radius: 6px;
	background: var(--projeto-white);
	overflow-x: clip;
}

html:has(body.post-type-archive-projeto):not(.elementor-html) {
	overflow-x: clip;
}

body.post-type-archive-projeto .projetos-archive {
	color: var(--projeto-teal-mid);
}

body.post-type-archive-projeto #content {
	padding-top: 0;
	background: var(--projeto-white);
}

body.post-type-archive-projeto .site-content > .ast-container {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
	margin: 0;
}

body.post-type-archive-projeto #primary,
body.post-type-archive-projeto .site-main {
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: none;
	float: none;
}

body.post-type-archive-projeto.ast-separate-container .projetos-archive,
body.post-type-archive-projeto article.projetos-archive {
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
}

.projetos-shell {
	width: min(100% - (var(--projeto-gutter) * 2), var(--projeto-shell));
	margin-inline: auto;
}

.projetos-intro {
	position: relative;
	max-height: 50vh;
	padding: 56px 0 40px;
	overflow: hidden;
	background: var(--projeto-ice);
	color: var(--projeto-teal);
}

.projetos-intro__title {
	margin: 0 0 12px;
	max-width: 18ch;
	font-family: "Old Standard TT", serif;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 400;
	font-style: italic;
	line-height: 1.2;
	text-align: start;
	color: var(--projeto-teal);
}

.projetos-intro__lead {
	margin: 0;
	max-width: 42rem;
	font-family: Inter, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	color: #236373;
}

.projetos-filters {
	padding: 16px 0 20px;
	background: transparent;
	box-shadow: none;
	border-bottom: 1px solid var(--projeto-ice);
}

.projetos-filters__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.projetos-filters__label {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--projeto-cyan);
}

.projetos-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.projetos-pill {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border: 1px solid var(--projeto-cyan);
	border-radius: var(--projeto-radius);
	background: var(--projeto-white);
	color: var(--projeto-teal);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.projetos-pill:hover,
.projetos-pill:focus-visible {
	border-color: #00A5CF;
	background: var(--projeto-white);
	color: var(--projeto-teal);
}

.projetos-pill.is-active,
.projetos-pill.is-active:hover,
.projetos-pill.is-active:focus-visible {
	background: #236373;
	border-color: #236373;
	color: #ffffff;
}

.projetos-filters__secondary {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
}

.projetos-select {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 132px;
	flex: 0 1 160px;
}

.projetos-select span {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--projeto-muted);
}

.projetos-select select {
	height: 36px;
	padding: 0 28px 0 10px;
	border: 1px solid var(--projeto-ice);
	border-radius: var(--projeto-radius);
	background-color: var(--projeto-white);
	color: var(--projeto-teal);
	font-size: 12px;
}

.projetos-filters__meta {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-inline-start: auto;
	flex: 0 0 auto;
	white-space: nowrap;
}

body.post-type-archive-projeto .projetos-filters__clear {
	padding: 0;
	margin: 0;
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: #00A5CF;
	text-decoration: none;
	text-underline-offset: 3px;
}

body.post-type-archive-projeto .projetos-filters__clear:hover,
body.post-type-archive-projeto .projetos-filters__clear:focus-visible {
	color: #003B4A;
	text-decoration: underline;
}

.projetos-filters__clear.is-idle {
	visibility: hidden;
	pointer-events: none;
}

.projetos-filters__count {
	margin: 0;
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: #236373;
}

.projetos-listing {
	padding: 48px 0 96px;
	background: var(--projeto-white);
}

.projetos-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px 24px;
}

html.js-projetos .projetos-card {
	opacity: 0;
	transform: translateY(14px);
}

html.js-projetos .projetos-card.is-inview {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.projetos-card.is-hidden {
	display: none;
}

.projetos-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.projetos-card__link:hover .projetos-card__image,
.projetos-card__link:focus-visible .projetos-card__image {
	opacity: 0.85;
}

.projetos-card__link:hover .projetos-card__title,
.projetos-card__link:focus-visible .projetos-card__title {
	color: var(--projeto-cyan);
}

.projetos-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--projeto-radius);
	background: var(--projeto-ice);
}

.projetos-card__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: 50% 50% !important;
	transition: opacity 0.3s ease;
}

.projetos-card__placeholder {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: flex-end;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	padding: 16px;
	background: var(--projeto-ice);
}

.projetos-card__placeholder-title {
	display: block;
	max-width: 100%;
	font-size: 1.05rem;
	font-weight: 400;
	font-style: italic;
	line-height: 1.25;
	color: var(--projeto-teal);
	overflow-wrap: anywhere;
}

.projetos-card video,
.projetos-card__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0;
	padding: 0;
	border: 0;
	object-fit: cover !important;
	object-position: 50% 50% !important;
	transform: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.projetos-card__media.is-playing .projetos-card__video {
	opacity: 1;
}

.projetos-card__badge {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	z-index: 2;
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--projeto-cyan);
	color: var(--projeto-white);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	background: rgba(0, 165, 207, 0.85);
}

.projetos-card__body {
	padding: 16px 2px 0;
}

.projetos-card__title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	font-weight: 400;
	font-style: italic;
	line-height: 1.3;
	color: var(--projeto-teal);
}

.projetos-card__location {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--projeto-muted);
}

.projetos-empty {
	margin: 0;
	padding: 48px 0;
	text-align: start;
	color: var(--projeto-muted);
}

@media (max-width: 1024px) {
	body.post-type-archive-projeto {
		--projeto-gutter: 32px;
	}

	.projetos-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	body.post-type-archive-projeto {
		--projeto-gutter: 24px;
	}

	.projetos-intro {
		padding: 40px 0 28px;
	}

	.projetos-filters__secondary {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
	}

	.projetos-select {
		min-width: 0;
		width: 100%;
		flex: none;
	}

	.projetos-filters__meta {
		margin-inline-start: 0;
		justify-content: flex-start;
		align-self: stretch;
		width: 100%;
	}

	.projetos-filters__clear.is-idle {
		display: none;
	}

	.projetos-filters__count {
		text-align: start;
		margin-inline: 0;
	}

	.projetos-grid {
		grid-template-columns: 1fr;
	}

	/*
	 * Inventário 375px: o iframe YouTube da CTA (elementor-background-video-embed)
	 * mede 565px e sai da viewport. O SVG do X no footer traz width="1200".
	 * Não aplicar object-fit a .projetos-card__image (C6).
	 */
	body.post-type-archive-projeto .elementor-background-video-container {
		max-width: 100%;
		overflow: hidden;
	}

	body.post-type-archive-projeto .elementor-background-video-embed,
	body.post-type-archive-projeto .elementor-background-video-hosted {
		max-width: 100%;
		height: auto;
	}

	body.post-type-archive-projeto .ast-builder-social-element .ahfb-svg-iconset {
		max-width: 100%;
		overflow: hidden;
	}

	body.post-type-archive-projeto .ast-builder-social-element svg {
		max-width: 100%;
		height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.js-projetos .projetos-card,
	html.js-projetos .projetos-card.is-inview {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.projetos-card__image,
	.projetos-pill,
	.projetos-card__video {
		transition: none;
	}
}
