/* =========================================================
   CL REAL ESTATE – CASAWP ARCHIVKARTEN
   ========================================================= */

/* CASAWP-Archiv als Grid */
.post-type-archive-casawp_property .site-main {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(28px, 3vw, 48px);
}

/* Überschrift, Filter und Navigation über volle Breite */
.post-type-archive-casawp_property .page-header,
.post-type-archive-casawp_property .casawp-archive-filter,
.post-type-archive-casawp_property .paging-navigation,
.post-type-archive-casawp_property .navigation,
.post-type-archive-casawp_property .casawp-pagination {
	grid-column: 1 / -1;
}

/* WordPress-Artikelwrapper neutralisieren */
.post-type-archive-casawp_property .site-main > article {
	margin: 0;
	padding: 0;
	background: transparent;
}

/* Karte */
.cl-property-card {
	--cl-card-text: var(--accent, #12414b);
	--cl-card-muted: var(--global-color-1, #847f72);
	--cl-card-border: rgba(18, 65, 75, 0.14);

	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--cl-card-border);
	border-radius: 14px;
	background: #fff;
	transition:
		transform 220ms ease,
		box-shadow 220ms ease,
		border-color 220ms ease;
}

.cl-property-card:hover {
	transform: translateY(-5px);
	border-color: rgba(18, 65, 75, 0.24);
	box-shadow: 0 22px 55px rgba(18, 65, 75, 0.10);
}

/* Bild */
.cl-property-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #d8d8d2;
}

.cl-property-card__media .casawp-thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.cl-property-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}

.cl-property-card:hover .cl-property-card__media img {
	transform: scale(1.035);
}

.cl-property-card__placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--cl-card-muted);
	font-size: 0.72rem;
	letter-spacing: 0.10em;
	text-decoration: none;
	text-transform: uppercase;
}

/* Status-Plakette aus CASAWP */
.cl-property-card .availability-outerlabel {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 3;
	margin: 0;
}

.cl-property-card .availability-label {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 7px 12px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
	color: var(--cl-card-text);
	font-size: 0.64rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

/* Inhalt */
.cl-property-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: clamp(22px, 2.3vw, 32px);
}

.cl-property-card__title {
	margin: 0 0 22px;
	font-family: inherit;
	font-size: clamp(1.25rem, 1.55vw, 1.7rem);
	font-weight: 300;
	line-height: 1.28;
	letter-spacing: 0;
	text-transform: none;
}

.cl-property-card__title a {
	color: var(--cl-card-text);
	text-decoration: none;
}

.cl-property-card__title a:hover,
.cl-property-card__title a:focus {
	color: var(--cl-card-muted);
}

/* Kerndaten */
.cl-property-card__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: 28px;
	border-top: 1px solid var(--cl-card-border);
}

.cl-property-card__fact {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
	padding: 14px 12px 14px 0;
	border-bottom: 1px solid var(--cl-card-border);
}

.cl-property-card__fact:nth-child(even) {
	padding-left: 14px;
	border-left: 1px solid var(--cl-card-border);
}

.cl-property-card__fact-label {
	overflow: hidden;
	color: var(--cl-card-muted);
	font-size: 0.61rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.cl-property-card__fact-value {
	overflow-wrap: anywhere;
	color: var(--cl-card-text);
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.35;
}

.cl-property-card__fact--wide {
	grid-column: 1 / -1;
	padding-left: 0 !important;
	border-left: 0 !important;
}

.cl-property-card__fact--wide .cl-property-card__fact-value {
	font-size: 1.04rem;
	font-weight: 500;
}

/* Link */
.cl-property-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: auto;
	padding-top: 18px;
	border-top: 1px solid var(--cl-card-border);
	color: var(--cl-card-text);
	font-size: 0.67rem;
	font-weight: 600;
	letter-spacing: 0.11em;
	text-decoration: none;
	text-transform: uppercase;
}

.cl-property-card__cta span:last-child {
	font-size: 1.2rem;
	font-weight: 300;
	transition: transform 180ms ease;
}

.cl-property-card__cta:hover span:last-child,
.cl-property-card__cta:focus span:last-child {
	transform: translateX(5px);
}

/* Alte CASAWP-Trennlinie entfernen */
.post-type-archive-casawp_property hr.soften {
	display: none;
}

@media (max-width: 1024px) {
	.post-type-archive-casawp_property .site-main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.post-type-archive-casawp_property .site-main {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.cl-property-card__media {
		aspect-ratio: 4 / 3;
	}
}
