/* Filtros ACF para Elementor */

.eaf-filters {
	--eaf-primary: #1d4157;
	--eaf-text: #1d4157;
	--eaf-border: #8f9aa3;
	--eaf-soft: #e3e8ec;
	--eaf-accent: var(--eaf-primary);
	--eaf-box: 18px;
	--eaf-col-gap: 16px;
	--eaf-row-gap: 28px;
	margin: 0;
	color: var(--eaf-text);
}

.eaf-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Grelha de campos ---------- */
.eaf-fields {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	column-gap: var(--eaf-col-gap);
	row-gap: var(--eaf-row-gap);
}

.eaf-field {
	position: relative;
	flex: 1 1 200px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.eaf-field--search {
	flex-grow: 2;
}

.eaf-field--toggles,
.eaf-field--list {
	flex-basis: 100%;
}

.eaf-label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--eaf-text);
}

/* ---------- Inputs ---------- */
.eaf-control {
	position: relative;
}

.eaf-input {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 8px 44px 8px 14px;
	font: inherit;
	font-size: 15px;
	line-height: 1.3;
	color: var(--eaf-text);
	background: #fff;
	border: 1px solid var(--eaf-border);
	border-radius: 6px;
	box-shadow: none;
	outline: none;
	text-align: left;
	cursor: text;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.eaf-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.eaf-input:hover {
	border-color: var(--eaf-primary);
}

.eaf-input:focus,
.eaf-input:focus-visible,
.eaf-dropdown.is-open .eaf-input {
	border-color: var(--eaf-primary);
	box-shadow: 0 0 0 3px rgba(29, 65, 87, .12);
}

.eaf-input::placeholder,
.eaf-dropdown-value.is-placeholder {
	color: #8f9aa3;
}

.eaf-icon {
	width: 20px;
	height: 20px;
	color: var(--eaf-text);
	flex: 0 0 auto;
}

.eaf-control .eaf-icon {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	pointer-events: none;
}

/* ---------- Dropdown ---------- */
.eaf-dropdown {
	position: relative;
}

button.eaf-dropdown-toggle,
button.eaf-dropdown-toggle:hover,
button.eaf-dropdown-toggle:focus {
	cursor: pointer;
	justify-content: space-between;
	gap: 8px;
	padding-right: 14px;
	background-color: #fff;
	color: var(--eaf-text);
	text-transform: none;
	letter-spacing: normal;
}

.eaf-dropdown-value {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: inherit;
}

.eaf-chevron {
	transition: transform .2s ease;
}

.eaf-dropdown.is-open .eaf-chevron {
	transform: rotate(180deg);
}

.eaf-dropdown-panel {
	position: absolute;
	z-index: 50;
	top: calc(100% + 6px);
	left: 0;
	min-width: 100%;
	max-width: min(360px, 90vw);
	max-height: 300px;
	overflow-y: auto;
	padding: 6px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #d5dce1;
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba(16, 33, 45, .14);
	overscroll-behavior: contain;
}

.eaf-dropdown-panel[hidden] {
	display: none;
}

/* ---------- Opções (dropdown + checkbox/radio) ---------- */
.eaf-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 10px;
	font-size: 14px;
	line-height: 1.35;
	color: var(--eaf-text);
	border-radius: 5px;
	cursor: pointer;
	user-select: none;
}

.eaf-dropdown-panel .eaf-option:hover {
	background: #f1f4f6;
}

.eaf-dropdown-panel .eaf-option.is-checked {
	background: var(--eaf-soft);
	font-weight: 600;
}

.eaf-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.eaf-mark {
	position: relative;
	flex: 0 0 auto;
	width: var(--eaf-box);
	height: var(--eaf-box);
	box-sizing: border-box;
	border: 1.5px solid var(--eaf-border);
	border-radius: 4px;
	background: #fff;
	transition: background-color .15s ease, border-color .15s ease;
}

.eaf-mark--radio,
.eaf-option--all .eaf-mark {
	border-radius: 50%;
}

.eaf-option input:checked + .eaf-mark {
	border-color: var(--eaf-accent);
	background: var(--eaf-accent);
}

.eaf-option input:checked + .eaf-mark--checkbox::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 45%;
	width: 28%;
	height: 52%;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -50%) rotate(45deg);
}

.eaf-option input:checked + .eaf-mark--radio::after,
.eaf-option--all input:checked + .eaf-mark::after {
	content: "";
	position: absolute;
	inset: 25%;
	border-radius: 50%;
	background: #fff;
}

.eaf-option input:focus-visible + .eaf-mark {
	outline: 2px solid var(--eaf-accent);
	outline-offset: 2px;
}

/* Na lista pendente de escolha única não mostramos o círculo. */
.eaf-field[data-type="select"] .eaf-mark {
	display: none;
}

.eaf-options {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	gap: 4px 18px;
}

.eaf-options .eaf-option {
	padding: 4px 0;
}

/* ---------- Toggles ---------- */
.eaf-toggles {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

button.eaf-toggle {
	flex: 0 1 auto;
	margin: 0;
	padding: 8px 18px;
	min-height: 34px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--eaf-text);
	background: #fff;
	border: 1px solid #c9d1d7;
	border-radius: 999px;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

button.eaf-toggle:hover {
	border-color: var(--eaf-primary);
	background: #fff;
	color: var(--eaf-text);
}

button.eaf-toggle.is-active,
button.eaf-toggle.is-active:hover {
	background: var(--eaf-primary);
	border-color: var(--eaf-primary);
	color: #fff;
}

button.eaf-toggle:focus-visible {
	outline: 2px solid var(--eaf-primary);
	outline-offset: 2px;
}

.eaf-toggle-stretch-yes .eaf-toggle {
	flex: 1 1 auto;
}

/* ---------- Filtros aplicados ---------- */
.eaf-active {
	margin-top: 32px;
}

.eaf-active[hidden] {
	display: none;
}

.eaf-active-title {
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--eaf-text);
}

.eaf-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

button.eaf-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 6px 12px;
	min-height: 30px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--eaf-text);
	background: var(--eaf-soft);
	border: 0;
	border-radius: 999px;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color .15s ease;
}

button.eaf-chip:hover,
button.eaf-chip:focus {
	background: #d3dbe1;
	color: var(--eaf-text);
}

.eaf-chip svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}

button.eaf-clear {
	margin: 0;
	padding: 4px 2px;
	font: inherit;
	font-size: 13px;
	color: var(--eaf-text);
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

button.eaf-clear:hover {
	background: none;
	color: var(--eaf-text);
	text-decoration: none;
}

.eaf-empty-hint {
	font-size: 13px;
	opacity: .7;
}

/* ---------- Resultados ---------- */
.eaf-results {
	position: relative;
}

.eaf-count {
	margin-bottom: 32px;
	font-size: 13px;
	color: #3a4a55;
}

.eaf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 40px;
	row-gap: 48px;
	transition: opacity .2s ease;
}

.eaf-grid:empty {
	display: none;
}

.eaf-results.is-loading .eaf-grid {
	opacity: .4;
	pointer-events: none;
}

.eaf-results.is-loading::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 120px;
	width: 32px;
	height: 32px;
	margin-left: -16px;
	border: 3px solid rgba(29, 65, 87, .2);
	border-top-color: #1d4157;
	border-radius: 50%;
	animation: eaf-spin .7s linear infinite;
}

@keyframes eaf-spin {
	to { transform: rotate(360deg); }
}

.eaf-item {
	min-width: 0;
}

.eaf-empty {
	padding: 24px 0;
	font-size: 16px;
	color: #3a4a55;
}

.eaf-empty[hidden] {
	display: none;
}

/* Cartão simples */
.eaf-card-media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #e6e6e6;
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.eaf-card-media img,
.eaf-card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

a.eaf-card-media:hover img {
	transform: scale(1.03);
}

.eaf-card-body {
	padding-top: 22px;
}

.eaf-card-eyebrow {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	font-weight: 700;
	color: #111;
}

.eaf-card-title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	color: #1d4157;
}

.eaf-card-title a {
	color: inherit;
	text-decoration: none;
}

.eaf-card-title a:hover {
	text-decoration: underline;
}

/* Paginação */
.eaf-pagination {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}

.eaf-pagination:empty {
	display: none;
}

.eaf-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}

button.eaf-load-more,
.eaf-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 22px;
	box-sizing: border-box;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #1d4157;
	background: #fff;
	border: 1px solid #c9d1d7;
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.eaf-page {
	padding: 8px 12px;
}

button.eaf-load-more:hover,
.eaf-page:hover,
.eaf-page.is-active {
	background: #1d4157;
	border-color: #1d4157;
	color: #fff;
}

.eaf-page--dots,
.eaf-page--dots:hover {
	border-color: transparent;
	background: none;
	color: inherit;
	cursor: default;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
	.eaf-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.eaf-stack-yes .eaf-field {
		flex: 1 1 100% !important;
		max-width: 100% !important;
	}

	.eaf-toggle-scroll-yes .eaf-toggles {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 2px;
	}

	.eaf-toggle-scroll-yes .eaf-toggles::-webkit-scrollbar {
		display: none;
	}

	.eaf-toggle-scroll-yes .eaf-toggle {
		flex: 0 0 auto;
	}

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

	.eaf-dropdown-panel {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eaf-grid,
	.eaf-card-media img,
	.eaf-chevron {
		transition: none;
	}
}
