/* Catalog tiles and hashtag quick links (inc/catalog-tiles/theme.php).
 * Colours come from the faceted catalog's tokens (css/catalog-facets.css),
 * so the tiles read as part of the same component. Fallbacks cover the
 * /geografiya/ pages, which render outside .igf. */

.igt {
	--igt-bg: var(--igf-mint, #eef9f7);
	--igt-bg-hover: #cfeae4;
	--igt-accent: var(--igf-accent, #2ea2cc);
	--igt-accent-dark: var(--igf-accent-dark, #2e8cb0);
	--igt-line: var(--igf-line, #e3e6ee);
	--igt-ink: var(--igf-ink, #191919);
	--igt-radius: var(--igf-radius, 14px);
	margin: 0 0 28px;
}

.igt-tiles {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
}

.igt-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 150px;
	padding: 18px 10px;
	border-radius: var(--igt-radius);
	border: 2px solid transparent;
	background: var(--igt-bg);
	color: var(--igt-ink);
	text-align: center;
	text-decoration: none;
	transition: background-color .15s, border-color .15s;
}

.igt-tile:hover,
.igt-tile:focus-visible {
	background: var(--igt-bg-hover);
	color: var(--igt-ink);
	text-decoration: none;
}

.igt-tile.is-active,
.igt-tile.is-active:hover {
	background: var(--igt-bg);
	border-color: var(--igt-accent);
	color: var(--igt-accent-dark);
}

.igt-icon {
	flex: none;
}

.igt-label {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.igt-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.igt-tag {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--igt-line);
	border-radius: 20px;
	background: #fff;
	color: var(--igt-ink);
	font-size: 14px;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	transition: border-color .15s;
}

.igt-tag:hover,
.igt-tag:focus-visible {
	border-color: var(--igt-accent);
	color: var(--igt-ink);
	text-decoration: none;
}

/* Under 992px: each row scrolls sideways; the next tile is cut at the edge. */
@media only screen and (max-width: 992px) {
	.igt {
		margin-bottom: 20px;
	}

	.igt-tiles,
	.igt-tags {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		margin-right: -15px;
		padding-right: 15px;
	}

	.igt-tiles::-webkit-scrollbar,
	.igt-tags::-webkit-scrollbar {
		display: none;
	}

	.igt-tiles {
		gap: 10px;
	}

	.igt-tile {
		flex: 0 0 124px;
		min-height: 112px;
		padding: 12px 8px;
		gap: 10px;
	}

	.igt-label {
		font-size: 12px;
	}

	.igt-tags {
		gap: 8px;
		margin-top: 14px;
	}

	.igt-tag {
		padding: 7px 14px;
		font-size: 13px;
	}
}

/* Section chips (pages without tiles): one level up, same family as tiles. */
.igt-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.igt-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 10px 20px 10px 16px;
	border-radius: var(--igt-radius);
	border: 2px solid transparent;
	background: var(--igt-bg);
	color: var(--igt-ink);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s, border-color .15s;
}

.igt-chip:hover,
.igt-chip:focus-visible {
	background: var(--igt-bg-hover);
	color: var(--igt-ink);
	text-decoration: none;
}

.igt-chip.is-active,
.igt-chip.is-active:hover {
	background: var(--igt-bg);
	border-color: var(--igt-accent);
	color: var(--igt-accent-dark);
}

.igt-chip .igt-icon {
	width: 24px;
	height: 24px;
	stroke-width: 1.4;
}

.igt-chip-label {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
}

@media only screen and (max-width: 992px) {
	.igt-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		margin-right: -15px;
		padding-right: 15px;
		gap: 8px;
	}

	.igt-chips::-webkit-scrollbar {
		display: none;
	}

	.igt-chip {
		flex: none;
		min-height: 48px;
		padding: 8px 16px 8px 12px;
	}

	.igt-chip-label {
		font-size: 13px;
	}
}

/* Current hashtag: same family as the active tile. */
.igt-tag.is-active,
.igt-tag.is-active:hover {
	border: 2px solid var(--igt-accent);
	padding: 7px 15px;
	color: var(--igt-accent-dark);
	font-weight: 700;
}

@media only screen and (max-width: 992px) {
	.igt-tag.is-active,
	.igt-tag.is-active:hover {
		padding: 6px 13px;
	}
}
