/**
 * Manx Rent – Landlords / agents directory polish (Homeo Agents List demo).
 */

.manx-agents-polish {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	--manx-accent: #ff5a5f;
	--manx-ink: #202040;
	--manx-muted: #5c6b7a;
	--manx-border: #e8eef2;
	--manx-surface: #fff;
	--manx-radius: 12px;
}

/* Page title */
.manx-agents-polish .page-title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--manx-ink);
}

/* Directory intro + stats */
.manx-agents-directory-intro {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px 32px;
	align-items: center;
	margin-bottom: 28px;
	padding: 24px 28px;
	background: linear-gradient(135deg, #fafbfc 0%, #fff 55%, #fff5f5 100%);
	border: 1px solid var(--manx-border);
	border-radius: var(--manx-radius);
	box-shadow: 0 4px 24px rgba(32, 32, 64, 0.05);
}

.manx-agents-directory-intro__eyebrow {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--manx-accent);
}

.manx-agents-directory-intro__title {
	margin: 0 0 8px;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	font-weight: 700;
	color: var(--manx-ink);
	line-height: 1.25;
}

.manx-agents-directory-intro__lead {
	margin: 0;
	max-width: 52ch;
	font-size: 15px;
	line-height: 1.55;
	color: var(--manx-muted);
}

.manx-agents-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.manx-agents-stat {
	flex: 1 1 100px;
	min-width: 100px;
	padding: 14px 18px;
	text-align: center;
	background: var(--manx-surface);
	border: 1px solid var(--manx-border);
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(32, 32, 64, 0.04);
}

.manx-agents-stat__value {
	display: block;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--manx-ink);
	line-height: 1.2;
}

.manx-agents-stat__label {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--manx-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Featured landlords */
.manx-featured-landlords {
	margin-bottom: 32px;
	padding: 22px 24px;
	background: var(--manx-surface);
	border: 1px solid var(--manx-border);
	border-radius: var(--manx-radius);
	box-shadow: 0 4px 20px rgba(32, 32, 64, 0.06);
}

.manx-featured-landlords__head {
	margin-bottom: 18px;
}

.manx-featured-landlords__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--manx-ink);
}

.manx-featured-landlords__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 90, 95, 0.12);
	color: var(--manx-accent);
}

.manx-featured-landlords__subtitle {
	margin: 0;
	font-size: 14px;
	color: var(--manx-muted);
}

.manx-featured-landlords__track {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.manx-featured-card {
	display: flex;
	flex-direction: column;
	background: #fafbfc;
	border: 1px solid var(--manx-border);
	border-radius: 10px;
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.manx-featured-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px rgba(32, 32, 64, 0.1);
}

.manx-featured-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #e8eef2;
}

.manx-featured-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.manx-featured-card:hover .manx-featured-card__media img {
	transform: scale(1.06);
}

.manx-featured-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 2.5rem;
	color: #b0bcc8;
}

.manx-featured-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	background: var(--manx-accent);
	border-radius: 4px;
}

.manx-featured-card__body {
	padding: 14px 16px 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.manx-featured-card__name {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 600;
}

.manx-featured-card__name a {
	color: var(--manx-ink);
	transition: color 0.2s ease;
}

.manx-featured-card__name a:hover {
	color: var(--manx-accent);
}

.manx-featured-card__job {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--manx-muted);
}

.manx-featured-card__listings {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 600;
	color: var(--manx-accent);
}

.manx-featured-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
}

/* Buttons */
.manx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.manx-btn--sm {
	padding: 8px 12px;
	font-size: 12px;
}

.manx-btn--primary {
	background: var(--manx-accent);
	color: #fff;
}

.manx-btn--primary:hover {
	background: #e84e53;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(255, 90, 95, 0.35);
}

.manx-btn--outline {
	background: transparent;
	border-color: var(--manx-border);
	color: var(--manx-ink);
}

.manx-btn--outline:hover {
	border-color: var(--manx-accent);
	color: var(--manx-accent);
}

.manx-btn--ghost {
	padding: 8px 10px;
	background: #fff;
	border-color: var(--manx-border);
	color: var(--manx-muted);
}

.manx-btn--ghost:hover {
	border-color: var(--manx-accent);
	color: var(--manx-accent);
}

/* Rating */
.manx-rating {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 6px;
	font-size: 13px;
}

.manx-rating__stars {
	color: #f5a623;
	letter-spacing: 1px;
}

.manx-rating__stars .far {
	color: #d0d8e0;
}

.manx-rating__value {
	font-weight: 700;
	color: var(--manx-ink);
}

.manx-rating__count {
	font-size: 12px;
	color: var(--manx-muted);
}

/* Toolbar */
.manx-agents-polish .agents-ordering-wrapper,
.manx-agents-polish .before-loop-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 24px;
	padding: 14px 18px;
	background: var(--manx-surface);
	border: 1px solid var(--manx-border);
	border-radius: var(--manx-radius);
	box-shadow: 0 2px 12px rgba(32, 32, 64, 0.04);
}

.manx-agents-polish .display-mode-form ul {
	display: inline-flex;
	gap: 0;
	margin: 0;
	padding: 4px;
	list-style: none;
	background: #f4f6f8;
	border-radius: 8px;
}

.manx-agents-polish .display-mode-form li {
	margin: 0;
}

.manx-agents-polish .display-mode-form label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 36px;
	margin: 0;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.2s ease, color 0.2s ease;
}

.manx-agents-polish .display-mode-form input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.manx-agents-polish .display-mode-form input:checked + i,
.manx-agents-polish .display-mode-form label:has(input:checked) {
	background: #fff;
	color: var(--manx-accent);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.manx-agents-polish .agents-ordering select {
	min-height: 42px;
	padding: 8px 36px 8px 14px;
	border-radius: 8px;
	border-color: #e0e6eb;
	font-size: 14px;
}

/* Filter sidebar */
.manx-agents-polish .filter-agent-form,
.manx-agents-polish .filter-listing-form {
	padding: 20px;
	background: var(--manx-surface);
	border: 1px solid var(--manx-border);
	border-radius: var(--manx-radius);
	box-shadow: 0 4px 24px rgba(32, 32, 64, 0.06);
}

.manx-agents-polish .filter-agent-form .form-group,
.manx-agents-polish .filter-listing-form .form-group {
	margin-bottom: 16px;
}

.manx-agents-polish .filter-agent-form label,
.manx-agents-polish .filter-listing-form label {
	font-weight: 600;
	font-size: 13px;
	color: #3e4c66;
	margin-bottom: 6px;
}

.manx-agents-polish .filter-agent-form .form-control,
.manx-agents-polish .filter-listing-form .form-control,
.manx-agents-polish .filter-agent-form select {
	border-radius: 8px;
	border-color: #dde3e8;
	min-height: 42px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.manx-agents-polish .filter-agent-form .form-control:focus,
.manx-agents-polish .filter-listing-form .form-control:focus {
	border-color: var(--manx-accent);
	box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.12);
}

.manx-agents-polish .filter-agent-form .btn-theme {
	width: 100%;
	padding: 12px 20px;
	border-radius: 8px;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.manx-agents-polish .filter-agent-form .btn-theme:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(255, 90, 95, 0.3);
}

/* Agent cards (grid v1) */
.manx-agent-card-wrap {
	height: 100%;
	margin-bottom: 24px;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.manx-agent-card-wrap.manx-agent-card--visible {
	opacity: 1;
	transform: translateY(0);
}

.manx-agents-polish .agent-grid-v1 {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--manx-surface);
	border: 1px solid var(--manx-border);
	border-radius: var(--manx-radius);
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.25s ease;
}

.manx-agents-polish .manx-agent-card-wrap:hover .agent-grid-v1 {
	transform: translateY(-5px);
	box-shadow: 0 18px 44px rgba(32, 32, 64, 0.12);
	border-color: rgba(255, 90, 95, 0.25);
}

.manx-agent-card--featured .agent-grid-v1 {
	border-color: rgba(255, 90, 95, 0.35);
}

.manx-agents-polish .agent-grid-v1 .member-thumbnail-wrapper {
	position: relative;
	overflow: hidden;
}

.manx-agents-polish .agent-grid-v1 .member-thumbnail-wrapper img {
	width: 100%;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.manx-agents-polish .manx-agent-card-wrap:hover .agent-grid-v1 .member-thumbnail-wrapper img {
	transform: scale(1.05);
}

.manx-agent-card__ribbon {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	padding: 4px 10px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: var(--manx-accent);
	border-radius: 4px;
}

.manx-agents-polish .agent-grid-v1 .agency-socials {
	position: absolute;
	bottom: 12px;
	left: 12px;
	z-index: 2;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.manx-agents-polish .manx-agent-card-wrap:hover .agency-socials {
	opacity: 1;
	transform: translateY(0);
}

.manx-agents-polish .agent-grid-v1 .agency-socials a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-right: 4px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 50%;
	color: var(--manx-ink);
	transition: background 0.2s ease, color 0.2s ease;
}

.manx-agents-polish .agent-grid-v1 .agency-socials a:hover {
	background: var(--manx-accent);
	color: #fff;
}

.manx-agent-card__content {
	padding: 16px 18px 18px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.manx-agents-polish .agent-grid-v1 .agent-title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
}

.manx-agents-polish .agent-grid-v1 .agent-title a {
	color: var(--manx-ink);
	transition: color 0.2s ease;
}

.manx-agents-polish .agent-grid-v1 .agent-title a:hover {
	color: var(--manx-accent);
}

.manx-agent-card__meta {
	margin-bottom: 8px;
}

.manx-agent-card__listings-count {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--manx-muted);
}

.manx-agent-card__listings-count i {
	margin-right: 6px;
	color: var(--manx-accent);
}

.manx-agent-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
}

/* List view */
.manx-agents-polish .agent-list.agent-item {
	margin-bottom: 20px;
	padding: 20px;
	background: var(--manx-surface);
	border: 1px solid var(--manx-border);
	border-radius: var(--manx-radius);
	transition: box-shadow 0.3s ease, border-color 0.25s ease;
}

.manx-agents-polish .agent-list.agent-item:hover {
	box-shadow: 0 12px 32px rgba(32, 32, 64, 0.08);
	border-color: rgba(255, 90, 95, 0.2);
}

/* Empty state */
.manx-agents-empty {
	padding: 48px 24px;
	background: #fafbfc;
	border-radius: var(--manx-radius);
	border: 1px dashed var(--manx-border);
}

.manx-agents-empty i {
	display: block;
	margin-bottom: 12px;
	font-size: 2.5rem;
	color: #c5d0da;
}

/* Pagination */
.manx-agents-polish .pagination,
.manx-agents-polish .apus-pagination {
	margin-top: 32px;
}

.manx-agents-polish .pagination .page-numbers {
	border-radius: 8px;
	min-width: 40px;
	height: 40px;
	line-height: 40px;
	transition: background 0.2s ease, color 0.2s ease;
}

.manx-agents-polish .pagination .page-numbers.current,
.manx-agents-polish .pagination .page-numbers:hover {
	background: var(--manx-accent);
	color: #fff;
	border-color: var(--manx-accent);
}

/* Mobile filter overlay */
.manx-agents-polish .over-dark-filter {
	position: fixed;
	inset: 0;
	z-index: 10040;
	background: #1d293e;
	opacity: 0;
	visibility: hidden;
	cursor: pointer;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.manx-agents-polish .over-dark-filter.active {
	opacity: 0.55;
	visibility: visible;
}

/* Mobile filter drawer */
.manx-agents-polish.manx-filter-open {
	overflow: hidden;
}

@media (max-width: 991px) {
	.manx-agents-directory-intro {
		grid-template-columns: 1fr;
		padding: 20px;
	}

	.manx-agents-stats {
		width: 100%;
	}

	.manx-agents-polish #main-content .sidebar.manx-filter-visible {
		display: block !important;
		position: fixed;
		top: 0;
		left: 0;
		width: min(320px, 88vw);
		height: 100vh;
		z-index: 10050;
		overflow-y: auto;
		background: #fff;
		padding: 20px 16px 80px;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
	}

	.manx-agents-polish .manx-agent-card-wrap:hover .agent-grid-v1 {
		transform: none;
	}

	.manx-featured-landlords__track {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 8px;
	}

	.manx-featured-card {
		flex: 0 0 min(280px, 85vw);
		scroll-snap-align: start;
	}

	.manx-agents-polish .manx-mobile-filter-bar {
		display: flex;
		margin-bottom: 16px;
		padding: 12px 16px;
		background: var(--manx-surface);
		border: 1px solid var(--manx-border);
		border-radius: 10px;
		position: sticky;
		top: calc(var(--manx-header-height, 80px) + 8px);
		z-index: 100;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	}

	.manx-agents-polish .manx-mobile-filter-bar .btn-show-filter-mobile {
		flex: 1;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 10px 16px;
		background: var(--manx-ink);
		color: #fff;
		border: 0;
		border-radius: 8px;
		font-weight: 600;
		font-size: 14px;
		cursor: pointer;
	}
}

@media (min-width: 992px) {
	.manx-agents-polish .manx-mobile-filter-bar {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.manx-featured-card,
	.manx-agents-polish .agent-grid-v1,
	.manx-agents-polish .agent-grid-v1 .member-thumbnail-wrapper img {
		transition: none !important;
	}
}
