/**
 * Blocos da Home — front-end.
 *
 * Os valores aqui foram extraídos do CSS que o Elementor gera para o bloco
 * #bloco-venda da home (post-2.css) e para o Loop Item "Loop imovel Card"
 * (loop-138.css), para que o bloco renderizado pelo plugin fique visualmente
 * igual ao montado à mão no Elementor.
 *
 * As variáveis --e-global-color-* são as do kit do Elementor; os fallbacks
 * mantêm as cores certas caso o CSS do kit não esteja carregado.
 */

/* -------------------------------------------------------------------------
 * Bloco (container + título)
 * ---------------------------------------------------------------------- */

.tdp-bh-block {
	padding: 2% 0;
	box-sizing: border-box;
}

.tdp-bh-block *,
.tdp-bh-block *::before,
.tdp-bh-block *::after {
	box-sizing: border-box;
}

.tdp-bh-block__header {
	text-align: center;
}
.tdp-bh-block__header .elementor-widget-container{
	margin-bottom: 25px;
}

/* Especificidade de 3 classes para vencer a regra global do Elementor
   `.elementor-widget-heading .elementor-heading-title`. */
.tdp-bh-block .elementor-widget-heading .elementor-heading-title,
.tdp-bh-block .tdp-bh-block__title {
	margin: 0;
	font-family: "Roboto", Sans-serif;
	font-weight: 400;
	text-transform: uppercase;
	color: var( --e-global-color-53f2087, #444444 );
}

.tdp-bh-block .tdp-bh-block__title b,
.tdp-bh-block .tdp-bh-block__title strong {
	color: var( --e-global-color-primary, #0F994A );
	font-weight: inherit;
}

.tdp-bh-block .tdp-bh-empty {
	text-align: center;
	color: var( --e-global-color-text, #7A7A7A );
}

/* -------------------------------------------------------------------------
 * Carrossel
 * ---------------------------------------------------------------------- */

.tdp-bh-carousel {
	position: relative;
}

.tdp-bh-carousel .swiper {
	/* Deixa espaço para as setas, que ficam "outside" como no #bloco-venda. */
	margin: 0;
}

/* Cards de alturas diferentes ficam todos com a altura do slide mais alto,
   igual ao `.swiper-slide > .elementor-element { height: 100% }` do Elementor. */
.tdp-bh-carousel .swiper-wrapper {
	align-items: stretch;
}

.tdp-bh-carousel .swiper-slide {
	height: auto;
	display: flex;
}

.tdp-bh-carousel .swiper-slide > .tdp-bh-card {
	width: 100%;
}

/* Setas — 60px, cor primária, hover accent, posicionadas para fora do palco.
   Classes próprias de propósito: `.elementor-swiper-button` do e-swiper.css
   força cor quase branca e `svg { fill; width: 1em }`, que quebrariam o ícone. */
.tdp-bh-carousel__stage {
	position: relative;
}

.tdp-bh-carousel .tdp-bh-arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 60px;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: var( --e-global-color-primary, #0F994A );
	background: none;
	border: 0;
	appearance: none;
	transition: color 0.2s;
}

.tdp-bh-carousel .tdp-bh-arrow:hover,
.tdp-bh-carousel .tdp-bh-arrow:focus-visible {
	color: var( --e-global-color-accent, #61CE70 );
}

.tdp-bh-carousel .tdp-bh-arrow svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tdp-bh-carousel .tdp-bh-arrow--prev {
	left: -45px;
}

.tdp-bh-carousel .tdp-bh-arrow--next {
	right: -45px;
}

.tdp-bh-carousel .tdp-bh-arrow.swiper-button-disabled {
	opacity: 0.3;
	pointer-events: none;
}

/* Bolinhas — cor #1E8349 e 25px de respiro, como no widget original. */
.tdp-bh-carousel .tdp-bh-pagination {
	position: static;
	margin-top: 25px;
	text-align: center;
}

.tdp-bh-carousel .tdp-bh-pagination .swiper-pagination-bullet {
	background: var( --e-global-color-ee24d7f, #1E8349 );
	opacity: 0.35;
}

.tdp-bh-carousel .tdp-bh-pagination .swiper-pagination-bullet-active {
	opacity: 1;
}

/* -------------------------------------------------------------------------
 * Grid de fallback (sem Swiper disponível)
 * ---------------------------------------------------------------------- */

.tdp-bh-grid__inner {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 10px;
	align-items: stretch;
}

.tdp-bh-grid__item {
	display: flex;
}

.tdp-bh-grid__item > .tdp-bh-card {
	width: 100%;
}

/* -------------------------------------------------------------------------
 * Card (espelha loop-138.css)
 * ---------------------------------------------------------------------- */

.tdp-bh-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0;
	border-radius: 5px;
	overflow: hidden;
	background-color: #4444440D;
	box-shadow: 0 0 10px 0 rgba( 0, 0, 0, 0.34 );
}

.tdp-bh-card__link {
	position: absolute;
	inset: 0;
	z-index: 11;
	display: block;
	text-decoration: none;
}

.tdp-bh-card__image {
	position: relative;
	min-height: 190px;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	background-color: #4444442B;
	border-radius: 5px 5px 0 0;
}

.tdp-bh-card__image::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.2;
	background-image: linear-gradient( 180deg, #FFFFFF00 0%, #1E8349 90% );
	border-radius: 5px 5px 0 0;
}

/* Finalidade como badge sobre a imagem (não mais na área de texto do card). */
.tdp-bh-card__finalidade {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	display: inline-block;
	margin: 0;
	padding: 4px 12px;
	border-radius: 3px;
	background-color: var( --e-global-color-primary, #0F994A );
	font-family: "Roboto", Sans-serif;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
	white-space: nowrap;
}

.tdp-bh-card__body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex-grow: 1;
	flex-shrink: 0;
	padding: 2% 3% 5%;
}

.tdp-bh-card__top {
	display: flex;
	flex-direction: column;
}

.tdp-bh-card__tipo {
	display: block;
	margin: 0 0 7px;
	text-align: center;
	font-family: "Roboto", Sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	color: var( --e-global-color-primary, #0F994A );
}

.tdp-bh-card__title {
	margin: 0;
	text-align: center;
	font-family: "Roboto", Sans-serif;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.3em;
	letter-spacing: 0;
	color: var( --e-global-color-53f2087, #444444 );
}

.tdp-bh-card__valor {
	padding-top: 5px;
	text-align: center;
	font-family: "Roboto", Sans-serif;
	font-size: 25px;
	font-weight: 400;
	color: var( --e-global-color-primary, #0F994A );
}

/* -------------------------------------------------------------------------
 * Responsivo — mesmos breakpoints do Elementor (1024 / 767)
 * ---------------------------------------------------------------------- */

@media ( max-width: 1024px ) {
	.tdp-bh-grid__inner {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 767px ) {
	.tdp-bh-block {
		padding: 5%;
	}

	.tdp-bh-grid__inner {
		grid-template-columns: 1fr;
	}

	.tdp-bh-carousel .tdp-bh-arrow--prev {
		left: -10px;
	}

	.tdp-bh-carousel .tdp-bh-arrow--next {
		right: -10px;
	}

	.tdp-bh-carousel .tdp-bh-arrow {
		width: 28px;
		height: 42px;
	}
}
