/* ==========================================================================
   Compound cards + Compound Grid — unique project cards (not unit layout)
   ========================================================================== */

:root {
	--ste-cmp-navy: #373737;
	--ste-cmp-navy-2: #1f1f1f;
	--ste-cmp-gold: #373737;
	--ste-cmp-gold-soft: #e8e6e1;
	--ste-cmp-ink: #373737;
	--ste-cmp-muted: #6b6b6b;
	--ste-cmp-line: rgba(55, 55, 55, 0.12);
	--ste-cmp-bg: #f7f6f2;
	--ste-cmp-radius: 18px;
	--ste-cmp-gap: 24px;
	--ste-cmp-wa: #25d366;
	--ste-cmp-call: #373737;
	--ste-cmp-more: #373737;
}

/* ---- Grid shell (widget) ----------------------------------------------- */

.ste-compound-grid {
	--ste-cmp-cols: 3;
	display: grid !important;
	grid-template-columns: repeat(var(--ste-cmp-cols), minmax(0, 1fr)) !important;
	gap: var(--ste-cmp-gap) !important;
	width: 100%;
	align-items: stretch;
	float: none !important;
}

.ste-compound-grid.sl-grid-desktop-1 { --ste-cmp-cols: 1; }
.ste-compound-grid.sl-grid-desktop-2 { --ste-cmp-cols: 2; }
.ste-compound-grid.sl-grid-desktop-3 { --ste-cmp-cols: 3; }
.ste-compound-grid.sl-grid-desktop-4 { --ste-cmp-cols: 4; }

.elementor-grid-1 .ste-compound-grid { --ste-cmp-cols: 1; }
.elementor-grid-2 .ste-compound-grid { --ste-cmp-cols: 2; }
.elementor-grid-3 .ste-compound-grid { --ste-cmp-cols: 3; }
.elementor-grid-4 .ste-compound-grid { --ste-cmp-cols: 4; }

@media (max-width: 1024px) {
	.ste-compound-grid,
	.ste-compound-grid.sl-grid-desktop-3,
	.ste-compound-grid.sl-grid-desktop-4 {
		--ste-cmp-cols: 2;
	}

	.ste-compound-grid.sl-grid-tablet-1,
	.elementor-grid-tablet-1 .ste-compound-grid {
		--ste-cmp-cols: 1;
	}

	.ste-compound-grid.sl-grid-tablet-2,
	.elementor-grid-tablet-2 .ste-compound-grid {
		--ste-cmp-cols: 2;
	}

	.ste-compound-grid.sl-grid-tablet-3,
	.elementor-grid-tablet-3 .ste-compound-grid {
		--ste-cmp-cols: 3;
	}
}

@media (max-width: 767px) {
	.ste-compound-grid,
	.ste-compound-grid.sl-grid-desktop-2,
	.ste-compound-grid.sl-grid-desktop-3,
	.ste-compound-grid.sl-grid-desktop-4,
	.ste-compound-grid.sl-grid-tablet-2,
	.ste-compound-grid.sl-grid-tablet-3,
	.elementor-grid-1 .ste-compound-grid,
	.elementor-grid-2 .ste-compound-grid,
	.elementor-grid-3 .ste-compound-grid,
	.elementor-grid-4 .ste-compound-grid,
	.elementor-grid-tablet-2 .ste-compound-grid,
	.elementor-grid-tablet-3 .ste-compound-grid {
		--ste-cmp-cols: 1;
	}

	.ste-compound-grid.sl-grid-mobile-1,
	.elementor-grid-mobile-1 .ste-compound-grid {
		--ste-cmp-cols: 1;
	}

	.ste-compound-grid.sl-grid-mobile-2,
	.elementor-grid-mobile-2 .ste-compound-grid {
		--ste-cmp-cols: 2;
	}

	.ste-compound-grid {
		gap: 18px;
	}
}

.ste-compound-grid > * {
	min-width: 0;
	width: 100%;
	max-width: 100%;
	float: none !important;
	margin: 0 !important;
}

.ste-compound-grid__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 24px;
	text-align: center;
	color: var(--ste-cmp-muted);
}

/* ---- Widget cards only (do not affect /compounds/ archive) ------------ */

.ste-compound-grid .ste-cmp-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--ste-cmp-bg);
	border: 1px solid var(--ste-cmp-line);
	border-radius: var(--ste-cmp-radius);
	overflow: hidden;
	box-shadow: 0 10px 28px rgba(55, 55, 55, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	isolation: isolate;
}

.ste-compound-grid .ste-cmp-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(55, 55, 55, 0.14);
}

.ste-compound-grid .ste-cmp-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(145deg, var(--ste-cmp-navy), var(--ste-cmp-navy-2));
	text-decoration: none !important;
}

.ste-compound-grid .ste-cmp-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.ste-compound-grid .ste-cmp-card:hover .ste-cmp-card__img {
	transform: scale(1.06);
}

.ste-compound-grid .ste-cmp-card__media-shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(55, 55, 55, 0.08) 18%, rgba(55, 55, 55, 0.82) 100%);
	pointer-events: none;
}

.ste-compound-grid .ste-cmp-card__chips {
	position: absolute;
	z-index: 2;
	top: 14px;
	left: 14px;
	right: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ste-compound-grid .ste-cmp-card[dir="rtl"] .ste-cmp-card__chips {
	justify-content: flex-end;
}

.ste-compound-grid .ste-cmp-card__chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	border: 0;
}

.ste-compound-grid .ste-cmp-card__chip--brand {
	background: var(--ste-cmp-navy);
	color: #fff;
}

.ste-compound-grid .ste-cmp-card__chip--soft {
	background: var(--ste-cmp-gold);
	color: var(--ste-cmp-navy);
}

.ste-compound-grid .ste-cmp-card__price {
	position: absolute;
	z-index: 2;
	left: 14px;
	right: 14px;
	bottom: 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: #fff;
}

.ste-compound-grid .ste-cmp-card[dir="rtl"] .ste-cmp-card__price {
	align-items: flex-end;
	text-align: right;
}

.ste-compound-grid .ste-cmp-card__price-label {
	font-size: 0.72rem;
	font-weight: 600;
	opacity: 0.9;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ste-compound-grid .ste-cmp-card__price-value {
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--ste-cmp-gold-soft);
}

.ste-compound-grid .ste-cmp-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 16px 18px;
	flex: 1 1 auto;
}

.ste-compound-grid .ste-cmp-card__title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 800;
	line-height: 1.35;
	color: var(--ste-cmp-ink);
}

.ste-compound-grid .ste-cmp-card__title a {
	color: inherit !important;
	text-decoration: none !important;
}

.ste-compound-grid .ste-cmp-card__title a:hover {
	color: var(--ste-cmp-more) !important;
}

.ste-compound-grid .ste-cmp-card__subtitle {
	margin: 0;
	color: var(--ste-cmp-muted);
	font-size: 0.9rem;
	line-height: 1.4;
}

.ste-compound-grid .ste-cmp-card__location {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	color: var(--ste-cmp-navy-2);
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.4;
}

.ste-compound-grid .ste-cmp-card__pin {
	width: 8px;
	height: 8px;
	margin-top: 6px;
	border-radius: 50%;
	background: var(--ste-cmp-gold);
	box-shadow: 0 0 0 3px rgba(55, 55, 55, 0.18);
	flex: 0 0 auto;
}

.ste-compound-grid .ste-cmp-card__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 4px 0 0;
	padding: 10px 0 0;
	list-style: none;
	border-top: 1px solid var(--ste-cmp-line);
}

.ste-compound-grid .ste-cmp-card__stats li {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ste-compound-grid .ste-cmp-card__stat-label {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--ste-cmp-muted);
}

.ste-compound-grid .ste-cmp-card__stat-value {
	font-size: 0.86rem;
	font-weight: 800;
	color: var(--ste-cmp-navy);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ste-compound-grid .ste-cmp-card__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
	direction: ltr;
}

.ste-compound-grid .ste-cmp-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 8px 10px;
	border-radius: 10px;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	color: #fff !important;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.ste-compound-grid .ste-cmp-card__btn:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
	color: #fff !important;
}

.ste-compound-grid .ste-cmp-card__btn--wa { background: var(--ste-cmp-wa); }
.ste-compound-grid .ste-cmp-card__btn--call { background: var(--ste-cmp-call); }
.ste-compound-grid .ste-cmp-card__btn--more {
	grid-column: 1 / -1;
	background: var(--ste-cmp-navy);
}

.ste-compound-grid .ste-cmp-card__btn--more:hover {
	background: var(--ste-cmp-more);
}

.ste-compound-grid .ste-cmp-card[dir="rtl"] .ste-cmp-card__title,
.ste-compound-grid .ste-cmp-card[dir="rtl"] .ste-cmp-card__subtitle,
.ste-compound-grid .ste-cmp-card[dir="rtl"] .ste-cmp-card__location,
.ste-compound-grid .ste-cmp-card[dir="rtl"] .ste-cmp-card__stat-label,
.ste-compound-grid .ste-cmp-card[dir="rtl"] .ste-cmp-card__stat-value {
	font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

@media (max-width: 480px) {
	.ste-compound-grid .ste-cmp-card__price-value {
		font-size: 1.05rem;
	}

	.ste-compound-grid .ste-cmp-card__stats {
		grid-template-columns: 1fr;
	}
}

/* ---- Archive /compounds/ — 2 per row, titles + buttons share row lines */

.properties-archive #properties > .row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 0;
	align-items: stretch;
}

.properties-archive #properties .sl-col {
	width: 100%;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
	margin-bottom: 28px;
	display: grid;
	grid-template-rows: subgrid;
	grid-row: span 5;
}

.properties-archive #properties .sl-item.property-grid {
	display: grid;
	grid-template-rows: subgrid;
	grid-row: span 5;
	width: 100%;
	height: 100%;
	margin-bottom: 0;
}

.properties-archive #properties .sl-item.property-grid .image img {
	width: 100%;
	aspect-ratio: 640 / 427;
	object-fit: cover;
	height: auto;
}

.properties-archive #properties .sl-item.property-grid .property-info {
	display: grid;
	grid-template-rows: subgrid;
	grid-row: span 4;
	padding: 14px 16px 28px;
}

.properties-archive #properties .ste-cmp-head .title {
	font-size: 16px;
	line-height: 1.35;
	margin: 0 0 4px;
}

.properties-archive #properties .ste-cmp-head .title a,
.properties-archive #properties .ste-cmp-head a {
	text-decoration: none;
}

.properties-archive #properties .ste-cmp-archive-pager {
	grid-column: 1 / -1;
	width: 100%;
	max-width: none;
	margin-top: 8px;
}

@supports not (grid-template-rows: subgrid) {
	.properties-archive #properties .sl-col,
	.properties-archive #properties .sl-item.property-grid,
	.properties-archive #properties .sl-item.property-grid .property-info {
		display: flex;
		flex-direction: column;
	}

	.properties-archive #properties .sl-item.property-grid .property-info {
		flex: 1 1 auto;
	}

	.properties-archive #properties .ste-cmp-head {
		min-height: 2.7em;
	}

	.properties-archive #properties .ste-cmp-card__actions {
		margin-top: auto !important;
	}
}

@media (max-width: 767px) {
	.properties-archive #properties > .row {
		grid-template-columns: 1fr;
	}
}

.properties-archive .ste-cmp-card__badge {
	border: 0 !important;
	font-weight: 700 !important;
}

.properties-archive .image-top .type.ste-cmp-card__badge {
	background: #373737 !important;
	color: #f7f6f2 !important;
}

.properties-archive .image-top .status.ste-cmp-card__badge--soft {
	background: #373737 !important;
	color: #f7f6f2 !important;
}

.properties-archive .ste-cmp-card__subtitle {
	margin: 0 0 8px;
	color: #6b7280;
	font-size: 0.9rem;
}

.properties-archive #properties .property-info .address {
	font-size: 14px;
	line-height: 18px;
	margin: 0 0 10px;
}

.properties-archive #properties .property-info ul.features {
	display: flex;
	overflow: hidden;
	margin: 0 0 12px;
	padding: 10px 0;
	border: 1.8px dashed rgb(72 12 168 / 25%);
	border-radius: 5px;
	list-style: none;
}

.properties-archive #properties .property-info ul.features li {
	float: none;
	width: 33.33%;
	list-style: none;
	text-align: center;
	border-right: 1.8px dashed rgb(72 12 168 / 25%);
}

.properties-archive #properties .property-info ul.features li:last-child {
	border-right: none;
}

.properties-archive #properties .property-info ul.features li p {
	margin-bottom: 0;
}

.properties-archive .ste-cmp-card__actions {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 0;
	padding-top: 4px;
	direction: ltr;
}

.properties-archive .ste-cmp-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none !important;
	line-height: 1;
	color: #fff !important;
}

.properties-archive .ste-cmp-card__btn--wa {
	background: #25d366;
}

.properties-archive .ste-cmp-card__btn--call {
	background: #b48a61;
}

.properties-archive .ste-cmp-card__btn--more {
	background: #2d8cff;
}

.properties-archive[dir="rtl"] .property-info .title,
.properties-archive[dir="rtl"] .property-info .address,
.properties-archive[dir="rtl"] .property-info .features {
	font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

@media (max-width: 767px) {
	.properties-archive .ste-cmp-card__btn {
		flex: 1 1 auto;
	}
}
