/* /kulturel-miras/ — overrides on museum md-* system */

/* Solid header like city hubs / listing (not museum/blog hero overlay). */
body.mc-heritage-detail .mc-site-header,
body.md-heritage-hub-page .mc-site-header,
body.mc-heritage-detail.mc-blog-detail .mc-site-header,
body.md-heritage-hub-page.mc-blog-detail .mc-site-header {
	position: relative !important;
	background: rgba(243, 248, 249, 0.96) !important;
	border-bottom: 1px solid rgba(229, 235, 237, 0.85) !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	z-index: 40;
}

body.mc-heritage-detail .mc-topbar,
body.md-heritage-hub-page .mc-topbar {
	max-width: 800px;
	width: min(100% - 32px, 800px);
	padding: 14px 0;
	margin: 0 auto;
}

.md-heritage .md-kicker,
.md-heritage-hub .md-kicker {
	margin: 0 0 8px;
	color: #5c6b68;
	font-size: var(--text-xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.md-heritage .md-kicker a,
.md-heritage-hub .md-kicker a {
	color: #0f172a;
	text-decoration: none;
	border-bottom: 1px solid rgba(15, 23, 42, 0.28);
}

.md-heritage .md-kicker a:hover,
.md-heritage-hub .md-kicker a:hover {
	color: #8a6a4a;
	border-bottom-color: rgba(196, 164, 132, 0.85);
}

/* Detail: title + rail-width gallery first; sheet below (no cover overlap). */
.md-heritage-intro {
	width: min(100% - 32px, var(--rail, 800px));
	margin: 8px auto 0;
	padding-top: 4px;
}

.md-heritage-intro .md-head {
	margin-bottom: 16px;
}

.md-heritage-intro .md-title {
	color: #0f172a;
	font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.25rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.18;
	text-wrap: balance;
}

.md-heritage-hero {
	margin: 0 0 8px;
}

.md-heritage-hero__grid {
	display: grid;
	gap: 10px;
	width: 100%;
	min-height: 220px;
	height: clamp(220px, 42vw, 360px);
}

.md-heritage-hero__grid--one {
	grid-template-columns: 1fr;
}

.md-heritage-hero__grid--two {
	grid-template-columns: 1.35fr 1fr;
}

.md-heritage-hero__grid--three {
	grid-template-columns: 1.55fr 1fr;
	grid-template-rows: 1fr 1fr;
}

.md-heritage-hero__cell {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 16px;
	overflow: hidden;
	cursor: pointer;
	background: #e5ebed;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	font: inherit;
	text-align: left;
}

.md-heritage-hero__cell--main {
	grid-row: 1 / -1;
}

.md-heritage-hero__grid--one .md-heritage-hero__cell--main {
	grid-row: auto;
}

.md-heritage-hero__cell img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.md-heritage-hero__cell:focus-visible {
	outline: 2px solid rgba(95, 143, 150, 0.55);
	outline-offset: 3px;
}

.md-heritage-hero__all {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 11px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 12px;
	background: rgba(12, 16, 18, 0.55);
	backdrop-filter: blur(14px) saturate(1.1);
	-webkit-backdrop-filter: blur(14px) saturate(1.1);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	pointer-events: none;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.md-heritage-hero__all .md-ico,
.md-heritage-hero__all iconify-icon {
	color: #fff !important;
}

.md-heritage-hero__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.2);
	font-size: 11px;
	font-weight: 800;
}

@media (max-width: 719px) {
	.md-heritage-hero__grid--two,
	.md-heritage-hero__grid--three {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
		height: auto;
		min-height: 0;
	}

	.md-heritage-hero__cell--main {
		grid-column: 1 / -1;
		grid-row: auto;
		aspect-ratio: 16 / 10;
	}

	.md-heritage-hero__cell--side {
		aspect-ratio: 1 / 1;
	}
}

.md-heritage .md-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.md-heritage .md-meta__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

a.md-meta__chip--link {
	text-decoration: none;
	color: var(--muted);
	transition: color 0.15s ease;
}

a.md-meta__chip--link:hover {
	color: var(--ink);
}

.md-heritage .md-info__row .md-info__go {
	display: none;
}

.md-heritage-about {
	margin-top: 8px;
}

.md-heritage-about .md-about__body {
	padding: 20px 22px;
}

.md-heritage-about .md-about__text,
.md-heritage-about .md-about__body p {
	color: #1e293b;
	font-size: var(--text-base, 1rem);
	line-height: 1.65;
}

.md-heritage-about .mc-desc__toggle {
	margin-top: 8px;
}

.md-heritage-source__links {
	margin: 0;
	font-size: var(--text-sm, 14px);
}

.md-heritage-source__links a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.md-heritage-source__credit {
	margin: 8px 0 0;
	font-size: var(--text-xs, 12px);
	color: var(--muted, #68736f);
}

/* No museum-style overlapping sheet on heritage detail. */
body.mc-heritage-detail .md-heritage .md-sheet {
	display: none;
}

/* Hub */
.md-heritage-hub {
	padding-bottom: 48px;
}

.md-heritage-hub__intro {
	width: min(100% - 32px, var(--rail, 800px)) !important;
	margin: 12px auto 0 !important;
}

.md-heritage-hub__intro .md-sheet__inner {
	margin-top: 0 !important;
	padding: 20px 18px 22px !important;
	border-radius: 20px;
}

.md-heritage-hub__intro .md-sheet__rail {
	width: 100% !important;
	max-width: none;
}

.md-heritage-hub .md-title {
	color: #0f172a;
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.2;
	text-wrap: balance;
}

.md-heritage-hub .md-lead {
	margin: 12px 0 0;
	max-width: 42rem;
	color: #334155;
	font-size: var(--text-sm, 0.9375rem);
	font-weight: 500;
	line-height: 1.55;
}

.md-heritage-hub .md-content.rail {
	width: min(100% - 32px, var(--rail, 800px)) !important;
	margin-top: 18px;
}

.md-heritage-hub__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.md-heritage-hub__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 14px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(18, 35, 31, 0.08);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.md-heritage-hub__card:hover {
	transform: translateY(-2px);
	border-color: rgba(196, 164, 132, 0.45);
}

.md-heritage-hub__media {
	aspect-ratio: 1 / 1;
	background: #0b0f1a;
	overflow: hidden;
}

.md-heritage-hub__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.md-heritage-hub__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: rgba(255, 255, 255, 0.55);
}

.md-heritage-hub__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 10px 12px;
	min-width: 0;
}

.md-heritage-hub__name {
	font-weight: 700;
	color: #0f172a;
	font-size: 0.8125rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.md-heritage-hub__sub {
	color: var(--muted);
	font-size: 0.6875rem;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.md-heritage-hub__empty {
	color: var(--muted);
}

.md-heritage-hub .mc-pagination {
	margin-top: 28px;
}

@media (min-width: 640px) {
	.md-heritage-hub__intro .md-sheet__inner {
		padding: 22px 24px 26px !important;
	}

	.md-heritage-hub .md-lead {
		font-size: var(--text-base, 1rem);
	}

	.md-heritage-hub__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 14px;
	}

	.md-heritage-hub__card {
		border-radius: 16px;
	}

	.md-heritage-hub__media {
		aspect-ratio: 16 / 10;
	}

	.md-heritage-hub__body {
		padding: 12px 14px 14px;
	}

	.md-heritage-hub__name {
		font-size: var(--text-sm, 0.9375rem);
	}

	.md-heritage-hub__sub {
		font-size: var(--text-xs, 0.75rem);
	}
}

@media (min-width: 900px) {
	.md-heritage-hub__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 16px;
	}

	.md-heritage-hub__card {
		border-radius: 18px;
	}

	.md-heritage-hub__name {
		font-size: 1.05rem;
	}
}
