/**
 * Hustadvika Katalog - Enkeltoppføring (single)
 *
 * Refinert minimalisme. Generøs hero, rolig informasjonshierarki,
 * presise kort med god luft. Bygger på designtokens fra frontend.css.
 */

.hk-single {
	--hk-single-maks: 1140px;
	background: var(--hk-color-bg-soft);
}

/* ============================================================ */
/* Hero                                                          */
/* ============================================================ */

.hk-single__hero {
	position: relative;
	min-height: 520px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.hk-single__hero-bilde {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.hk-single__hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hk-single__hero-bilde--tom {
	background: linear-gradient(135deg, #0a4d7c 0%, #1a6ba8 60%, #2d6e5f 100%);
}

.hk-single__hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: linear-gradient(
		to top,
		rgba(8, 20, 35, 0.78) 0%,
		rgba(8, 20, 35, 0.35) 35%,
		rgba(8, 20, 35, 0.05) 70%,
		rgba(8, 20, 35, 0.15) 100%
	);
}

.hk-single__hero-innhold {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: var(--hk-single-maks);
	margin: 0 auto;
	padding: var(--hk-space-xl) var(--hk-space-lg);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--hk-space-lg);
	flex-wrap: wrap;
}

.hk-single__hero-omrade {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: var(--hk-space-sm);
	font-weight: 500;
	animation: hk-hero-inn 600ms ease backwards;
}

.hk-single__tittel {
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 700;
	color: #fff;
	margin: 0;
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
	animation: hk-hero-inn 600ms ease 80ms backwards;
}

.hk-single__hero-knapper {
	display: flex;
	gap: var(--hk-space-sm);
	flex-wrap: wrap;
	animation: hk-hero-inn 600ms ease 160ms backwards;
}

@keyframes hk-hero-inn {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}

.hk-single__hero-knapp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: var(--hk-color-primary);
	color: #fff;
	border-radius: var(--hk-radius-sm);
	font-size: 0.92rem;
	font-weight: 500;
	text-decoration: none;
	transition: transform var(--hk-transition), background-color var(--hk-transition), box-shadow var(--hk-transition);
	box-shadow: 0 4px 16px rgba(10, 77, 124, 0.35);
}

.hk-single__hero-knapp:hover {
	background: var(--hk-color-primary-hover);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(10, 77, 124, 0.45);
}

/* ============================================================ */
/* Fanerad                                                       */
/* ============================================================ */

.hk-single__faner {
	background: var(--hk-color-bg-card);
	border-bottom: 1px solid var(--hk-color-border);
}

.hk-single__fane {
	display: inline-block;
	max-width: var(--hk-single-maks);
	margin: 0 auto;
	padding: var(--hk-space-md) var(--hk-space-lg);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--hk-color-text);
	position: relative;
}

.hk-single__fane--aktiv::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: var(--hk-space-lg);
	right: var(--hk-space-lg);
	height: 2px;
	background: var(--hk-color-primary);
}

/* ============================================================ */
/* Kropp                                                         */
/* ============================================================ */

.hk-single__kropp {
	max-width: var(--hk-single-maks);
	margin: 0 auto;
	padding: var(--hk-space-xl) var(--hk-space-lg);
}

/* Hurtighandlinger */
.hk-single__handlinger {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--hk-space-sm);
	margin-bottom: var(--hk-space-xl);
}

.hk-single__handling {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 18px;
	background: var(--hk-color-bg-card);
	border: 1px solid var(--hk-color-border);
	border-radius: var(--hk-radius-pill);
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--hk-color-text);
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
	transition: all var(--hk-transition);
}

.hk-single__handling:hover {
	border-color: var(--hk-color-primary);
	color: var(--hk-color-primary);
	transform: translateY(-1px);
	box-shadow: var(--hk-shadow-sm);
}

.hk-single__handling svg {
	color: var(--hk-color-text-muted);
	transition: color var(--hk-transition);
}

.hk-single__handling:hover svg {
	color: var(--hk-color-primary);
}

/* ============================================================ */
/* Todelt rutenett                                               */
/* ============================================================ */

.hk-single__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
	gap: var(--hk-space-lg);
	align-items: start;
}

.hk-single__hovedkolonne,
.hk-single__sidekolonne {
	display: flex;
	flex-direction: column;
	gap: var(--hk-space-lg);
}

/* ============================================================ */
/* Kort-paneler (beskrivelse, kart)                              */
/* ============================================================ */

.hk-kort-panel {
	background: var(--hk-color-bg-card);
	border: 1px solid var(--hk-color-border);
	border-radius: var(--hk-radius);
	overflow: hidden;
}

.hk-kort-panel__tittel {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	padding: var(--hk-space-md) var(--hk-space-lg);
	border-bottom: 1px solid var(--hk-color-border);
	color: var(--hk-color-text);
}

.hk-kort-panel__tittel svg {
	color: var(--hk-color-primary);
}

.hk-kort-panel__innhold {
	padding: var(--hk-space-lg);
}

.hk-single__beskrivelse {
	color: var(--hk-color-text);
	line-height: 1.7;
}

.hk-single__beskrivelse p {
	margin: 0 0 var(--hk-space-md);
}

.hk-single__beskrivelse p:last-child {
	margin-bottom: 0;
}

.hk-single__beskrivelse a {
	color: var(--hk-color-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ============================================================ */
/* Kart i single                                                 */
/* ============================================================ */

.hk-single__kart-holder {
	padding: var(--hk-space-md);
}

.hk-single__kart {
	width: 100%;
	height: 320px;
	border-radius: var(--hk-radius-sm);
	overflow: hidden;
	background: var(--hk-color-bg-soft);
}

.hk-single__kart-bunn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hk-space-md);
	padding: 0 var(--hk-space-md) var(--hk-space-md);
	flex-wrap: wrap;
}

.hk-single__kart-adresse {
	font-size: 0.88rem;
	color: var(--hk-color-text-muted);
}

.hk-single__kart-lenke {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--hk-color-primary);
	text-decoration: none;
	padding: 8px 14px;
	border: 1px solid var(--hk-color-border);
	border-radius: var(--hk-radius-sm);
	transition: all var(--hk-transition);
}

.hk-single__kart-lenke:hover {
	background: var(--hk-color-primary-light);
	border-color: var(--hk-color-primary);
}

/* ============================================================ */
/* Info-kort (sidekolonne)                                       */
/* ============================================================ */

.hk-info-kort {
	background: var(--hk-color-bg-card);
	border: 1px solid var(--hk-color-border);
	border-radius: var(--hk-radius);
	padding: var(--hk-space-md) var(--hk-space-lg);
}

.hk-info-kort__tittel {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hk-color-text-muted);
	margin: 0 0 var(--hk-space-sm);
}

.hk-info-kort__tittel svg {
	color: var(--hk-color-primary);
}

.hk-info-kort__verdi {
	font-size: 0.98rem;
	color: var(--hk-color-text);
	margin: 0;
	line-height: 1.5;
}

.hk-info-kort__verdi--lenke {
	color: var(--hk-color-primary);
	text-decoration: none;
	font-weight: 500;
}

.hk-info-kort__verdi--lenke:hover {
	text-decoration: underline;
}

.hk-info-kort__verdi--flerlinje {
	white-space: pre-line;
}

/* Pjetter (chips) for område/kategori */
.hk-info-kort__pjsetter,
.hk-info-kort__pjetter {
	display: flex;
	flex-wrap: wrap;
	gap: var(--hk-space-xs);
}

.hk-pjette {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: var(--hk-color-bg-soft);
	border: 1px solid var(--hk-color-border);
	border-radius: var(--hk-radius-pill);
	font-size: 0.85rem;
	color: var(--hk-color-text);
	text-decoration: none;
	transition: all var(--hk-transition);
}

.hk-pjette:hover {
	border-color: var(--hk-color-primary);
	color: var(--hk-color-primary);
}

.hk-pjette svg {
	color: var(--hk-color-text-muted);
}

.hk-pjette--kategori {
	background: var(--hk-color-primary-light);
	border-color: transparent;
	color: var(--hk-color-primary);
	font-weight: 500;
}

.hk-pjette--kategori:hover {
	background: var(--hk-color-primary);
	color: #fff;
}

/* ============================================================ */
/* Relaterte oppføringer                                         */
/* ============================================================ */

.hk-single__relaterte {
	margin-top: var(--hk-space-xl);
	padding-top: var(--hk-space-xl);
	border-top: 1px solid var(--hk-color-border);
}

.hk-single__relaterte-tittel {
	text-align: center;
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0 0 var(--hk-space-lg);
	color: var(--hk-color-text);
}

.hk-single__relaterte-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--hk-space-md);
}

/* ============================================================ */
/* Responsivt                                                    */
/* ============================================================ */

@media (max-width: 880px) {
	.hk-single__grid {
		grid-template-columns: 1fr;
	}

	.hk-single__hero {
		min-height: 380px;
	}

	.hk-single__hero-innhold {
		flex-direction: column;
		align-items: flex-start;
	}
}
