/**
 * Home landing (page-home.php) — hero + cities.
 * Cities use flex (not Bootstrap .row) so rows with fewer than 2 / 3 / 6 items stay centered.
 */

/* ---- Cities: flex wrap + centered incomplete rows, fixed circle ---- */
.cities-section {
	background: transparent;
}

.cities-section__head {
	margin-bottom: 1.5rem;
}

.cities-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-content: flex-start;
	width: 100%;
	margin: 0;
	padding: 0;
	row-gap: 0.9rem;
	column-gap: 0.65rem;
}

a.city-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	text-decoration: none;
	color: #0b2239;
	background: #fff;
	border-radius: 14px;
	padding: 1rem 0.45rem 0.85rem;
	border: 1px solid rgba(11, 34, 57, 0.08);
	box-shadow: 0 2px 10px rgba(11, 34, 57, 0.06);
	min-width: 0;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	/* 2 per row: (100% − 1×column-gap) / 2 */
	flex: 0 0 calc((100% - 0.65rem) / 2);
	max-width: calc((100% - 0.65rem) / 2);
}

@media (min-width: 576px) {
	.cities-grid {
		row-gap: 1rem;
		column-gap: 0.75rem;
	}
	a.city-tile {
		/* 3 per row: (100% − 2×gaps) / 3 */
		flex: 0 0 calc((100% - 2 * 0.75rem) / 3);
		max-width: calc((100% - 2 * 0.75rem) / 3);
	}
}

@media (min-width: 992px) {
	.cities-grid {
		row-gap: 1.1rem;
		column-gap: 0.85rem;
	}
	a.city-tile {
		/* 6 per row: (100% − 5×gaps) / 6 — last row with <6 centers via justify-content */
		flex: 0 0 calc((100% - 5 * 0.85rem) / 6);
		max-width: calc((100% - 5 * 0.85rem) / 6);
	}
}

a.city-tile:hover {
	box-shadow: 0 6px 20px rgba(11, 34, 57, 0.1);
	border-color: rgba(197, 147, 88, 0.35);
	color: #0b2239;
}

/* Fixed circle: explicit px so it always paints (no aspect-ratio-only collapse) */
.city-tile__ring {
	width: 104px;
	height: 104px;
	min-width: 104px;
	min-height: 104px;
	border-radius: 50%;
	overflow: hidden;
	margin: 0 0 0.65rem;
	background: #e4e8ed;
	display: block;
	box-shadow: 0 2px 10px rgba(11, 34, 57, 0.1);
	flex-shrink: 0;
}

.city-tile__img {
	width: 100%;
	height: 100%;
	min-height: 104px;
	object-fit: cover;
	display: block;
	vertical-align: top;
}

.city-tile__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 104px;
	background: linear-gradient(160deg, #d8dee6 0%, #eef1f5 100%);
}

.city-tile__name {
	font-size: 0.8rem;
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 0.45rem;
	width: 100%;
	overflow-wrap: anywhere;
}

.city-tile__count {
	font-size: 0.75rem;
	font-weight: 600;
	color: #333;
	background: #f0f2f5;
	border-radius: 999px;
	padding: 0.2rem 0.6rem;
	line-height: 1.3;
	border: 1px solid rgba(11, 34, 57, 0.06);
}

a.city-tile:hover .city-tile__count {
	background: #c59358;
	color: #fff;
	border-color: transparent;
}

/* ---- Rest of home (hero) ---- */
.hero-section {
	background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4)),
		url('../images/hero.png') center/cover,
		url('../images/hero.png') center/cover;
	padding: 200px 0;
	position: relative;
}

.section-title-border {
	border-inline-start: 3px solid #c59358;
	padding-inline-start: 1rem;
}

.hero-section--projects {
	padding: 3.5rem 0 2.5rem;
}

@media (min-width: 768px) {
	.hero-section--projects {
		padding: 4.5rem 0 3rem;
	}
}
