/* Projects listing — theme project-grid-4-columns + Hausify filter bar */

/* Same imagery pipeline as home featured projects (PROJECT: home/featured-projects) */
.hausify-page-projects__banner {
	background-image: url(../../../images/home/featured-projects/project-03.jpg);
	background-position: center center;
	background-size: cover;
}

.hausify-projects-toolbar {
	margin-bottom: 1.5rem;
}

/* One row: selects + buttons aligned (wraps on narrow screens) */
.hausify-projects-filter-fields {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
}

.hausify-projects-filter-cell--grow {
	flex: 1 1 160px;
	min-width: 140px;
}

.hausify-projects-filter-cell--actions {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

.hausify-projects-filter-select.form-control-sm {
	min-height: 38px;
	border-radius: 2px;
	font-size: 0.8125rem;
	color: var(--hausify-gray, #333);
}

/* Green CTA — tighter letter-spacing than default theme button */
.hausify-projects-toolbar .hausify-projects-filter-submit.site-button {
	letter-spacing: 0.05em !important;
	padding: 0.55rem 1rem !important;
	font-size: 0.8125rem !important;
	line-height: 1.35 !important;
	margin-left: 0 !important;
	background-color: var(--hausify-color-primary, #89b740) !important;
	color: #fff !important;
}

.hausify-projects-toolbar .hausify-projects-filter-submit.site-button:hover,
.hausify-projects-toolbar .hausify-projects-filter-submit.site-button:focus,
.hausify-projects-toolbar .hausify-projects-filter-submit.site-button:active {
	background-color: var(--hausify-color-primary-hover, #769a36) !important;
	color: #fff !important;
	opacity: 1 !important;
}

.hausify-projects-toolbar .hausify-projects-filter-submit.site-button span {
	color: inherit !important;
	opacity: 1 !important;
}

/* Reset — not .site-button: avoids theme hover text/blend clashes */
.hausify-projects-filter-reset-btn {
	display: inline-block;
	padding: 0.52rem 0.95rem;
	font-family: inherit;
	font-size: 0.8125rem;
	line-height: 1.35;
	letter-spacing: 0.04em;
	cursor: pointer;
	border: 1px solid rgba(63, 64, 62, 0.22);
	border-radius: 2px;
	background-color: transparent;
	color: var(--hausify-gray, #3f403e);
	-webkit-appearance: none;
	appearance: none;
	transition:
		background-color 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease;
}

.hausify-projects-filter-reset-btn:hover,
.hausify-projects-filter-reset-btn:focus {
	background-color: var(--hausify-color-primary-softer, rgba(137, 183, 64, 0.08));
	border-color: rgba(137, 183, 64, 0.45);
	color: var(--hausify-gray, #3f403e);
	outline: none;
}

.hausify-projects-filter-reset-btn:active {
	background-color: var(--hausify-color-primary-soft, rgba(137, 183, 64, 0.14));
}

.hausify-projects-filter-pills {
	margin-bottom: 1.75rem;
	text-align: center;
}

.hausify-projects-filter-pills .hausify-projects-filter-nav {
	display: inline-block;
	padding: 0;
	margin: 0;
	list-style: none;
}

.hausify-projects-filter-pills .hausify-projects-filter-nav li {
	float: left;
	margin: 0 0.35rem 0.5rem;
}

.hausify-projects-filter-pills .hausify-projects-filter-nav li a.btn {
	min-width: auto;
}

.hausify-projects-filter-pills .hausify-projects-filter-nav li.active a {
	background-color: var(--hausify-color-primary, #89b740);
	border-color: var(--hausify-color-primary, #89b740);
	color: #fff;
}

/* Clearfix for floated pills (tema ile uyum) */
.hausify-projects-filter-pills .hausify-projects-filter-nav::after {
	content: "";
	display: table;
	clear: both;
}

/* Full card is one link to project detail */
.hausify-project-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.hausify-project-card-link:hover,
.hausify-project-card-link:focus {
	color: inherit;
	text-decoration: none;
}

.hausify-project-card-link .sx-info .sx-tilte {
	color: #fff;
}

.hausify-project-card-link:hover .sx-info .sx-tilte {
	color: #fff;
}

/* List / Map view toggle */
.hausify-projects-view-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.hausify-projects-view-bar__label {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hausify-gray, #3f403e);
}

.hausify-projects-view-toggle {
	display: inline-flex;
	border: 1px solid rgba(63, 64, 62, 0.18);
	border-radius: 2px;
	overflow: hidden;
}

.hausify-projects-view-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1rem;
	border: 0;
	background: #fff;
	color: var(--hausify-gray, #3f403e);
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.hausify-projects-view-btn + .hausify-projects-view-btn {
	border-left: 1px solid rgba(63, 64, 62, 0.18);
}

.hausify-projects-view-btn.is-active {
	background-color: var(--hausify-color-primary, #89b740);
	color: #fff;
}

.hausify-projects-view-btn:focus {
	outline: none;
	box-shadow: inset 0 0 0 2px rgba(137, 183, 64, 0.45);
}

/* Map layout — map + viewport sidebar */
.hausify-projects-map-wrap {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	min-height: min(68vh, 620px);
	border: 1px solid rgba(63, 64, 62, 0.12);
	border-radius: 2px;
	overflow: hidden;
	background: #fff;
}

.hausify-projects-map-wrap[hidden] {
	display: none !important;
}

.hausify-projects-map {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: min(68vh, 620px);
	min-height: 420px;
	border: 0;
	border-radius: 0;
	background: #e8ecef;
}

.hausify-projects-map-sidebar {
	flex: 0 0 320px;
	width: 320px;
	max-width: 38%;
	display: flex;
	flex-direction: column;
	border-left: 1px solid rgba(63, 64, 62, 0.12);
	background: #fff;
}

.hausify-projects-map-sidebar__head {
	padding: 1rem 1rem 0.75rem;
	border-bottom: 1px solid rgba(63, 64, 62, 0.1);
}

.hausify-projects-map-sidebar__title {
	margin: 0 0 0.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--hausify-gray, #3f403e);
}

.hausify-projects-map-sidebar__count {
	margin: 0;
	font-size: 0.75rem;
	color: rgba(63, 64, 62, 0.7);
}

.hausify-projects-map-list {
	flex: 1 1 auto;
	margin: 0;
	padding: 0.5rem 0;
	overflow-y: auto;
	max-height: min(68vh, 620px);
}

.hausify-projects-map-list__item {
	padding: 0.5rem 0.85rem;
	border-bottom: 1px solid rgba(63, 64, 62, 0.08);
}

.hausify-projects-map-list__item.is-active {
	background: var(--hausify-color-primary-softer, rgba(137, 183, 64, 0.08));
}

.hausify-projects-map-list__trigger {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
}

.hausify-projects-map-list__thumb {
	flex: 0 0 72px;
	width: 72px;
	height: 54px;
	overflow: hidden;
	border-radius: 2px;
	background: #e8ecef;
}

.hausify-projects-map-list__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hausify-projects-map-list__body {
	flex: 1 1 auto;
	min-width: 0;
}

.hausify-projects-map-list__title {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--hausify-gray, #3f403e);
}

.hausify-projects-map-list__meta {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.75rem;
	line-height: 1.35;
	color: rgba(63, 64, 62, 0.72);
}

.hausify-projects-map-list__link {
	display: inline-block;
	margin-top: 0.35rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--hausify-color-primary, #89b740);
	text-decoration: none;
}

.hausify-projects-map-list__link:hover,
.hausify-projects-map-list__link:focus {
	color: var(--hausify-color-primary-hover, #769a36);
	text-decoration: underline;
}

.hausify-projects-map-list__empty {
	margin: 0;
	padding: 1rem;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: rgba(63, 64, 62, 0.72);
}

.hausify-map-marker.is-active .hausify-map-marker__dot {
	transform: scale(1.15);
	box-shadow: 0 0 0 4px rgba(137, 183, 64, 0.28), 0 2px 8px rgba(0, 0, 0, 0.28);
}

@media (max-width: 991px) {
	.hausify-projects-map-wrap {
		flex-direction: column;
	}

	.hausify-projects-map-sidebar {
		flex: 0 0 auto;
		width: 100%;
		max-width: none;
		border-left: 0;
		border-top: 1px solid rgba(63, 64, 62, 0.12);
	}

	.hausify-projects-map {
		height: 52vh;
		min-height: 320px;
	}

	.hausify-projects-map-list {
		max-height: 280px;
	}
}

.hausify-map-marker {
	background: transparent;
	border: 0;
}

.hausify-map-marker__dot {
	display: block;
	width: 18px;
	height: 18px;
	margin: 5px;
	border-radius: 50%;
	background: var(--hausify-color-primary, #89b740);
	border: 3px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.leaflet-popup.hausify-map-popup-wrap .leaflet-popup-content {
	margin: 12px 14px 14px;
}

.hausify-map-popup img {
	display: block;
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 2px;
	margin-bottom: 0.65rem;
}

.hausify-map-popup__title {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	line-height: 1.3;
	color: var(--hausify-gray, #3f403e);
}

.hausify-map-popup__meta {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	color: rgba(63, 64, 62, 0.78);
}

.hausify-map-popup__link.site-button {
	display: inline-block;
	padding: 0.45rem 0.85rem !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.05em !important;
	text-decoration: none;
}

.hausify-map-popup__link.site-button span {
	color: inherit !important;
}
