.countries_page {
	box-sizing: border-box;
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 38px 20px 60px;
}

.countries_title {
	margin: 0 0 28px;
	text-align: center;
	font-size: 32px;
	line-height: 1.25;
	font-weight: 600;
	color: #333;
}

.countries_grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
	align-items: start;
}

.country_item {
	position: relative;
	min-width: 0;
}

.country_link {
	display: block;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.country {
	position: relative;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 13px 16px;
	border: 1px solid #e3e3e3;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.country:hover {
	transform: translateY(-2px);
	border-color: #d0d0d0;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.country_clickable {
	cursor: pointer;
}

.country_flag {
	display: block;
	flex: 0 0 44px;
	width: 44px;
	height: 25px;
	background-image: url("../images/flags/sprite.png");
	background-repeat: no-repeat;
	background-size: auto;
	overflow: hidden;
}

.country_flag_bolivia {
	background-image: url("../images/flags/bolivia.png");
	background-repeat: no-repeat;
	background-position: 0 0;
	background-size: auto 25px;
}

.country_flag_azores {
	background-image: url("../images/flags/azores.png");
	background-repeat: no-repeat;
	background-position: 0 0;
	background-size: auto 25px;
}

.country_flag_martinica {
	background-image: url("../images/flags/martinica.png");
	background-repeat: no-repeat;
	background-position: 0 0;
	background-size: auto 25px;
}

.country_name {
	display: block;
	font-size: 16px;
	line-height: 1.25;
	font-weight: 500;
	color: #333;
}

.country_popup {
	position: absolute;
	z-index: 999;
	left: 0;
	top: calc(100% + 8px);
	box-sizing: border-box;
	width: 320px;
	max-width: 90vw;
	padding: 14px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
	cursor: default;
}

.country_additional {
	display: block;
	margin-bottom: 8px;
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.popup_close_btn {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.cities {
	width: 100%;
}

.cities center {
	display: block;
	text-align: left;
}

.category,
.premium {
	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 6px 0;
	padding: 9px 11px;
	border-radius: 8px;
	background: #f4f4f4;
	font-size: 14px;
	line-height: 1.25;
	color: #333;
	cursor: pointer;
	transition: background-color .15s ease;
}

.category:hover,
.premium:hover {
	background: #e9e9e9;
}

@media (max-width: 700px) {
	.countries_page {
		padding: 28px 14px 44px;
	}

	.countries_title {
		font-size: 26px;
		margin-bottom: 22px;
	}

	.countries_grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.country {
		min-height: 52px;
		padding: 12px 14px;
		border-radius: 10px;
	}

	.country_popup {
		position: fixed;
		left: 14px;
		right: 14px;
		top: 90px;
		width: auto;
		max-width: none;
	}
}
.country_popup {
	width: 520px;
	max-height: 420px;
	overflow-y: auto;
}

.cities {
	width: 100%;
}

.cities center {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 7px;
	text-align: left;
}

.cities h4,
.cities .category {
	grid-column: 1 / -1;
}

.category,
.premium {
	width: auto;
	margin: 0;
}
@media (min-width: 1000px) {
	.country_popup {
		width: 640px;
	}

	.cities center {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
@media (max-width: 700px) {
	.cities center {
		grid-template-columns: 1fr;
	}

	.country_popup {
		max-height: 70vh;
		overflow-y: auto;
	}
}