.city-directory-page,
.city-detail-page {
	padding-bottom: 88px;
	background:
		radial-gradient(circle at 8% 2%, rgba(0, 163, 161, 0.08), transparent 28%),
		linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.city-page-header {
	margin-bottom: 48px;
}

.city-page-header .page-subtitle {
	margin-bottom: 40px;
}

.city-quick-stats {
	gap: 20px;
}

.city-quick-stats .quick-stat-item {
	min-width: 190px;
	padding: 16px 24px;
}

.city-quick-stats .stat-icon {
	width: 48px;
	height: 48px;
}

.city-search-section {
	position: relative;
	z-index: 20;
	margin: 0 0 72px;
	padding: 24px;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid var(--border);
	border-radius: 20px;
	box-shadow: 0 18px 50px rgba(29, 66, 137, 0.1);
}

.city-filter-form {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) minmax(190px, 0.42fr) minmax(190px, 0.42fr) auto;
	gap: 14px;
	align-items: center;
}

.city-search-control,
.city-select-control {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
	height: 54px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 12px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.city-search-control:focus-within,
.city-select-control:focus-within {
	border-color: var(--secondary);
	box-shadow: 0 0 0 4px rgba(0, 163, 161, 0.1);
}

.city-search-icon,
.city-select-control > i {
	flex: 0 0 auto;
	margin-left: 17px;
	color: var(--secondary);
	font-size: 16px;
	pointer-events: none;
}

.city-search-input,
.city-filter-select {
	width: 100%;
	height: 100%;
	min-width: 0;
	padding: 0 44px 0 13px;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--text-primary);
	font-family: 'Inter', sans-serif;
	font-size: 15px;
}

.city-filter-select {
	padding-right: 34px;
	cursor: pointer;
}

.city-search-input::placeholder {
	color: #9ca3af;
}

.city-search-input::-webkit-search-cancel-button {
	display: none;
}

.city-search-clear {
	position: absolute;
	top: 50%;
	right: 11px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: var(--light-bg);
	color: var(--text-secondary);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.city-search-clear:hover {
	background: rgba(0, 163, 161, 0.12);
	color: var(--secondary);
}

.city-search-clear.is-hidden {
	display: none;
}

.city-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	height: 54px;
	padding: 0 24px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--primary), #285bad);
	color: var(--white);
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(29, 66, 137, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.city-search-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(29, 66, 137, 0.28);
}

.city-filter-reset {
	grid-column: 1 / -1;
	justify-self: end;
	color: var(--primary);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.city-filter-reset:hover {
	color: var(--secondary);
	text-decoration: none;
}

.city-search-suggestions {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	max-height: 420px;
	overflow-y: auto;
	padding: 8px;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 14px;
	box-shadow: 0 22px 55px rgba(26, 29, 41, 0.18);
	z-index: 50;
}

.city-search-suggestion {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) auto;
	gap: 13px;
	align-items: center;
	min-height: 68px;
	padding: 7px;
	border-radius: 10px;
	color: var(--text-primary);
	text-decoration: none;
	transition: background 0.18s ease;
}

.city-search-suggestion:hover,
.city-search-suggestion.is-active {
	background: var(--light-bg);
	color: var(--text-primary);
	text-decoration: none;
}

.city-search-suggestion img {
	width: 80px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	background: var(--light-bg);
}

.city-suggestion-copy {
	min-width: 0;
}

.city-suggestion-name {
	display: block;
	overflow: hidden;
	margin-bottom: 2px;
	font-family: 'Montserrat', sans-serif;
	font-size: 15px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.city-suggestion-country {
	display: block;
	overflow: hidden;
	color: var(--text-secondary);
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.city-suggestion-places {
	padding-right: 8px;
	color: var(--secondary);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.city-search-message {
	padding: 18px;
	color: var(--text-secondary);
	font-size: 14px;
	text-align: center;
}

.city-section {
	margin-bottom: 78px;
}

.city-section-header,
.city-results-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
	padding-bottom: 17px;
	border-bottom: 2px solid var(--border);
}

.city-section-header h2,
.city-results-header h2 {
	margin: 0 0 4px;
	color: var(--primary);
	font-family: 'Montserrat', sans-serif;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.7px;
}

.city-section-header p,
.city-results-header p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 15px;
}

.city-section-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 50px;
	height: 50px;
	border-radius: 13px;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	color: var(--white);
	font-size: 20px;
}

.city-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
	gap: 24px;
}

.city-grid--popular {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.city-card {
	position: relative;
	display: block;
	height: 300px;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--light-bg);
	color: var(--white);
	text-decoration: none;
	box-shadow: 0 8px 25px rgba(26, 29, 41, 0.07);
	isolation: isolate;
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.city-card:hover {
	transform: translateY(-7px);
	border-color: var(--secondary);
	box-shadow: 0 18px 42px rgba(29, 66, 137, 0.17);
	color: var(--white);
	text-decoration: none;
}

.city-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s ease;
}

.city-card:hover .city-card-image {
	transform: scale(1.08);
}

.city-card::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.35) 48%, rgba(15, 23, 42, 0.05) 78%);
	pointer-events: none;
}

.city-card-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 24px;
}

.city-card-country {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 6px;
	color: rgba(255, 255, 255, 0.88);
	font-size: 13px;
	font-weight: 600;
}

.city-card-country i {
	color: #59d5d2;
}

.city-card h3 {
	margin: 0 0 7px;
	color: var(--white);
	font-family: 'Montserrat', sans-serif;
	font-size: 23px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.4px;
}

.city-card-places {
	display: inline-flex;
	align-items: center;
	padding: 5px 10px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.14);
	color: rgba(255, 255, 255, 0.94);
	font-size: 12px;
	font-weight: 600;
	backdrop-filter: blur(8px);
}

.city-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 42px;
	padding-top: 25px;
	border-top: 1px solid var(--border);
}

.city-pagination .pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.city-pagination .pagination > li > a,
.city-pagination .pagination > li > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: 9px;
	background: var(--white);
	color: var(--text-primary);
	text-decoration: none;
	transition: all 0.2s ease;
}

.city-pagination .pagination > li > a:hover {
	border-color: var(--secondary);
	color: var(--secondary);
}

.city-pagination .pagination > .active > span {
	border-color: var(--primary);
	background: var(--primary);
	color: var(--white);
}

.city-pagination-results {
	margin: 0;
	color: var(--text-secondary);
	font-size: 14px;
}

.city-empty-state {
	padding: 70px 24px;
	border: 1px dashed #cbd5e1;
	border-radius: 20px;
	background: var(--white);
	text-align: center;
}

.city-empty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 20px;
	border-radius: 50%;
	background: rgba(0, 163, 161, 0.1);
	color: var(--secondary);
	font-size: 28px;
}

.city-empty-state h3 {
	margin: 0 0 8px;
	color: var(--primary);
	font-family: 'Montserrat', sans-serif;
	font-size: 24px;
}

.city-empty-state p {
	margin: 0 auto 24px;
	max-width: 520px;
	color: var(--text-secondary);
}

.city-empty-button,
.city-back-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 12px 20px;
	border-radius: 10px;
	background: var(--primary);
	color: var(--white);
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}

.city-empty-button:hover,
.city-back-link:hover {
	transform: translateY(-2px);
	background: var(--secondary);
	color: var(--white);
	text-decoration: none;
}

.city-detail-header {
	margin-bottom: 32px;
	padding: 36px 40px;
	border: 1px solid var(--border);
	border-radius: 20px;
	background:
		radial-gradient(circle at 92% 12%, rgba(0, 163, 161, 0.14), transparent 32%),
		var(--white);
	box-shadow: 0 12px 36px rgba(26, 29, 41, 0.06);
}

.city-detail-header h1 {
	max-width: 950px;
	margin: 0 0 17px;
	color: var(--primary);
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(38px, 6vw, 64px);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -1.6px;
}

.city-detail-hero {
	position: relative;
	min-height: 520px;
	overflow: hidden;
	margin-bottom: 64px;
	border-radius: 24px;
	background: var(--light-bg);
	box-shadow: 0 20px 55px rgba(26, 29, 41, 0.14);
}

.city-detail-image {
	display: block;
	width: 100%;
	height: 650px;
	max-height: 68vh;
	min-height: 520px;
	object-fit: cover;
}

.city-detail-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10, 18, 35, 0.92) 0%, rgba(10, 18, 35, 0.28) 56%, rgba(10, 18, 35, 0.03) 80%);
}

.city-detail-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 55px;
	color: var(--white);
}

.city-detail-country {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	padding: 8px 13px;
	border: 1px solid rgba(0, 163, 161, 0.2);
	border-radius: 22px;
	background: rgba(0, 163, 161, 0.09);
	color: var(--primary);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	backdrop-filter: blur(10px);
}

.city-detail-country:hover {
	background: rgba(0, 163, 161, 0.16);
	color: var(--secondary);
	text-decoration: none;
}

.city-detail-overlay h1 {
	max-width: 900px;
	margin: 0 0 17px;
	color: var(--white);
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(38px, 6vw, 70px);
	font-weight: 900;
	line-height: 1.02;
	letter-spacing: -1.8px;
}

.city-detail-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.city-detail-stats span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text-secondary);
	font-size: 14px;
	font-weight: 600;
}

.city-detail-stats i {
	color: #59d5d2;
}

.city-description-section {
	margin-bottom: 42px;
}

.city-description-content {
	padding: 42px;
	border: 1px solid var(--border);
	border-radius: 20px;
	background: var(--white);
	box-shadow: 0 12px 36px rgba(26, 29, 41, 0.06);
	color: var(--text-primary);
	font-size: 16px;
	line-height: 1.8;
}

.city-description-content h2,
.city-description-content h3 {
	margin: 28px 0 12px;
	color: var(--primary);
	font-family: 'Montserrat', sans-serif;
}

.city-description-content h2:first-child,
.city-description-content h3:first-child {
	margin-top: 0;
}

.city-description-content p {
	margin-bottom: 16px;
}

.city-description-content p:last-child {
	margin-bottom: 0;
}

.city-back-link {
	margin-bottom: 24px;
}

@media (max-width: 1100px) {
	.city-filter-form {
		grid-template-columns: minmax(280px, 1fr) minmax(210px, 0.55fr);
	}

	.city-search-submit {
		width: 100%;
	}

	.city-grid--popular {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.city-directory-page,
	.city-detail-page {
		padding-bottom: 55px;
	}

	.city-page-header {
		margin-bottom: 36px;
	}

	.city-page-header .page-title {
		font-size: 38px;
	}

	.city-page-header .page-subtitle {
		margin-bottom: 30px;
		font-size: 17px;
	}

	.city-quick-stats {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 9px;
		width: 100%;
	}

	.city-quick-stats .quick-stat-item {
		min-width: 0;
		padding: 13px 8px;
		flex-direction: column;
		gap: 7px;
		text-align: center;
	}

	.city-quick-stats .stat-icon {
		width: 40px;
		height: 40px;
	}

	.city-quick-stats .stat-info {
		width: 100%;
		text-align: center; /* число і підпис по центру картки */
	}

	.city-quick-stats .stat-value {
		font-size: 20px;
	}

	.city-search-section {
		margin-bottom: 50px;
		padding: 16px;
		border-radius: 16px;
	}

	.city-filter-form {
		grid-template-columns: 1fr;
		gap: 11px;
	}

	.city-filter-reset {
		grid-column: 1;
		justify-self: center;
	}

	.city-search-suggestions {
		max-height: 350px;
	}

	.city-section {
		margin-bottom: 56px;
	}

	.city-section-header h2,
	.city-results-header h2 {
		font-size: 27px;
	}

	.city-grid,
	.city-grid--popular {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.city-card {
		height: 260px;
		border-radius: 13px;
	}

	.city-card-overlay {
		padding: 18px;
	}

	.city-card h3 {
		font-size: 20px;
	}

	.city-pagination {
		flex-direction: column;
		align-items: flex-start;
	}

	.city-detail-hero,
	.city-detail-image {
		min-height: 430px;
		height: 500px;
	}

	.city-detail-hero {
		margin-bottom: 48px;
		border-radius: 18px;
	}

	.city-detail-overlay {
		padding: 32px 26px;
	}

	.city-detail-overlay h1 {
		font-size: 42px;
	}

	.city-detail-header {
		padding: 28px;
	}

	.city-detail-header h1 {
		font-size: 42px;
	}

	.city-description-content {
		padding: 28px;
	}
}

@media (max-width: 520px) {
	.city-grid,
	.city-grid--popular {
		grid-template-columns: 1fr;
	}

	.city-card {
		height: 280px;
	}

	.city-search-suggestion {
		grid-template-columns: 64px minmax(0, 1fr);
	}

	.city-search-suggestion img {
		width: 64px;
		height: 48px;
	}

	.city-suggestion-places {
		display: none;
	}

	.city-section-icon {
		display: none;
	}

	.city-detail-hero,
	.city-detail-image {
		min-height: 390px;
		height: 440px;
	}

	.city-detail-overlay {
		padding: 26px 20px;
	}

	.city-detail-overlay h1 {
		font-size: 34px;
	}

	.city-detail-header {
		padding: 24px 20px;
		border-radius: 16px;
	}

	.city-detail-header h1 {
		font-size: 34px;
	}
}

/* Places list: selected filters and links to the city / country pages */
.places-filter-links { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; margin: 12px 0 0; }
.places-filter-link { color: inherit; font-weight: 600; text-decoration: none; border-bottom: 1px dashed currentColor; }
.places-filter-link:hover { opacity: .8; }
.places-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.places-active-filters__title { font-size: 14px; opacity: .7; }
.places-filter-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(37,99,235,.1); color: inherit; font-size: 14px; text-decoration: none; }
.places-filter-chip:hover { background: rgba(37,99,235,.2); }
.places-filter-chip i { font-size: 12px; opacity: .7; }

.places-tab-count { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: rgba(37,99,235,.1); font-size: 12px; }

.country-meta-item a { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.country-meta-item a:hover { opacity: .8; }

/* "All ..." link rendered as the last card of a tab grid */
.city-card--more { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary, #1d4289), var(--secondary, #0f9aa0)); }
.city-card--more::after { display: none; }
.city-card-more-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 800; color: var(--white, #fff); }
.city-card-more-inner i { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.2); transition: transform .3s ease; }
.city-card--more:hover .city-card-more-inner i { transform: translateX(6px); }

/* Tabs: wrap instead of scrolling (no stray scrollbar) */
.popular-places .places-tabs { flex-wrap: wrap; overflow: visible; gap: 4px 12px; }
