/* Specialty landing grid. Design tokens mirror the tag manager / uploader. */

.mas-specialty-grid {
	--mas-surface: #fff;
	--mas-bg: #f6f6f7;
	--mas-border: #e4e4e7;
	--mas-border-strong: #d3d3d8;
	--mas-text: #232323;
	--mas-muted: #6b6b72;
	--mas-accent: #2b232f;
	--mas-radius: 12px;
	--mas-shadow: 0 1px 2px rgba(16, 15, 20, 0.05), 0 6px 20px rgba(16, 15, 20, 0.06);

	margin: 1.5em 0;
	color: var(--mas-text);
}

.mas-specialty-grid *,
.mas-specialty-grid *::before,
.mas-specialty-grid *::after {
	box-sizing: border-box;
}

.mas-specialty-grid__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.25em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mas-specialty-grid__card {
	margin: 0;
	background: var(--mas-surface);
	border: 1px solid var(--mas-border);
	border-radius: var(--mas-radius);
	box-shadow: var(--mas-shadow);
	overflow: hidden;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mas-specialty-grid__card:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(16, 15, 20, 0.08), 0 12px 28px rgba(16, 15, 20, 0.1);
}

.mas-specialty-grid__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.mas-specialty-grid__thumb {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--mas-bg);
	overflow: hidden;
}

.mas-specialty-grid__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mas-specialty-grid__thumb.is-empty {
	background:
		linear-gradient(135deg, #ededf0 25%, transparent 25%) -8px 0,
		linear-gradient(225deg, #ededf0 25%, transparent 25%) -8px 0,
		linear-gradient(315deg, #ededf0 25%, transparent 25%),
		linear-gradient(45deg, #ededf0 25%, transparent 25%);
	background-size: 16px 16px;
	background-color: var(--mas-bg);
}

.mas-specialty-grid__body {
	display: flex;
	flex-direction: column;
	gap: 0.2em;
	padding: 0.85em 1em;
}

.mas-specialty-grid__label {
	font-weight: 600;
	font-size: 1.05rem;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.mas-specialty-grid__count {
	font-size: 13px;
	color: var(--mas-muted);
}

.mas-specialty-grid__empty {
	margin: 2em 0;
	font-style: italic;
	color: var(--mas-muted);
}
