/* ===== Glimra Projekt: front end ===== */

/* ---------- Projektgrid ---------- */
.gp-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}

.gp-grid .gp-card {
	position: relative;
	display: block;
	min-width: 0;
	overflow: hidden;
	border-radius: 10px;
	background: #07162d;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
	box-shadow: 0 10px 30px rgba(7, 22, 45, .10);
}

/* The image sits in the normal flow, so it gives the card (and the widget) its real height.
   Specificity beats Elementor's ".elementor img { height: auto }". */
.gp-grid .gp-card .gp-card__img {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 10 / 9;
	object-fit: cover;
	border-radius: 0;
	transition: transform .6s ease;
}

.gp-grid .gp-card .gp-card__img--empty { background: #07162d; }

.gp-grid .gp-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(7, 22, 45, 0) 45%, var(--gp-overlay, rgba(7, 22, 45, .75)) 100%);
	pointer-events: none;
}

.gp-grid .gp-card__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: block;
	padding: 0 26px 26px;
}

.gp-grid .gp-card__title {
	margin: 0;
	color: #fff;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.25;
	text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

.gp-grid--zoom-yes .gp-card:hover .gp-card__img { transform: scale(1.04); }

.gp-grid .gp-card:focus-visible {
	outline: 3px solid #e2b735;
	outline-offset: 3px;
}

@media (max-width: 767px) {
	.gp-grid .gp-card__body { padding: 0 20px 20px; }
	.gp-grid .gp-card__title { font-size: 20px; }
}

/* ---------- Projektgalleri ---------- */
.gp-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.gp-gallery .gp-gallery__item {
	position: relative;
	display: block;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	background: #eef0f2;
}

.gp-gallery .gp-gallery__item--hidden { display: none; }

.gp-gallery .gp-gallery__item .gp-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 0;
	transition: transform .5s ease;
}

.gp-gallery a.gp-gallery__item { cursor: zoom-in; }

.gp-gallery--zoom-yes .gp-gallery a.gp-gallery__item:hover .gp-gallery__img { transform: scale(1.03); }

.gp-gallery a.gp-gallery__item:focus-visible {
	outline: 3px solid #e2b735;
	outline-offset: 2px;
}

/* ---------- Projektvideo ---------- */
.gp-videos {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.gp-videos .gp-video {
	margin: 0;
	overflow: hidden;
	background: #000;
	line-height: 0;
}

.gp-videos .gp-video .gp-video__el {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

/* ---------- Nyhetsgrid ---------- */
.gn-grid {
	--gn-accent: #f49f28;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.gn-grid .gn-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid rgba(40, 56, 69, .10);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(28, 26, 22, .07);
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.gn-grid .gn-card:hover {
	transform: translateY(-4px);
	border-color: rgba(244, 159, 40, .45);
	box-shadow: 0 22px 56px rgba(28, 26, 22, .11);
}

/* Image in the normal flow so the card always has its real height */
.gn-grid .gn-card .gn-card__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 0;
	transition: transform .6s ease;
}
.gn-grid .gn-card:hover .gn-card__img { transform: scale(1.03); }
.gn-grid .gn-card .gn-card__img--empty { background: linear-gradient(135deg, #283845, #354b5b); }

.gn-grid .gn-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: 22px 24px 24px;
	background: inherit;
}

.gn-grid .gn-card__date {
	color: var(--gn-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.gn-grid .gn-card__title {
	margin: 0;
	color: #283845;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
}

.gn-grid .gn-card__link {
	color: inherit;
	text-decoration: none;
}
/* Whole card is clickable, but there is only one real link (good for screen readers) */
.gn-grid .gn-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}
.gn-grid .gn-card { isolation: isolate; }
.gn-grid .gn-card__link:focus-visible { outline: none; }
.gn-grid .gn-card:focus-within {
	outline: 3px solid var(--gn-accent);
	outline-offset: 3px;
}

.gn-grid .gn-card__excerpt {
	margin: 0;
	color: #6f675c;
	font-size: 15px;
	line-height: 1.65;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gn-grid .gn-card__more {
	margin-top: auto;
	padding-top: 6px;
	color: #283845;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.gn-grid .gn-card__arrow {
	display: inline-block;
	color: var(--gn-accent);
	transition: transform .25s ease;
}
.gn-grid .gn-card:hover .gn-card__arrow { transform: translateX(4px); }

.gn-empty { margin: 0; color: #6f675c; }

/* Pagination */
.gn-pagination { margin-top: 40px; }
.gn-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gn-pagination a,
.gn-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(40, 56, 69, .16);
	border-radius: 999px;
	color: #283845;
	font-weight: 600;
	text-decoration: none;
}
.gn-pagination a:hover { border-color: #f49f28; color: #f49f28; }
.gn-pagination .current { background: #283845; border-color: #283845; color: #fff; }

@media (max-width: 1024px) {
	.gn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.gn-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.gn-grid .gn-card__title { font-size: 20px; }
}

/* ---------- Projektinfo ---------- */
.gp-info {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.gp-info .gp-info__row { margin: 0; }
.gp-info .gp-info__label { font-weight: 700; }

/* ---------- Editor-only notice ---------- */
.gp-notice {
	padding: 18px;
	border: 1px dashed #c3c4c7;
	background: #f6f7f7;
	color: #50575e;
	font-size: 13px;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.gp-grid .gp-card .gp-card__img,
	.gp-gallery .gp-gallery__item .gp-gallery__img,
	.gn-grid .gn-card,
	.gn-grid .gn-card .gn-card__img,
	.gn-grid .gn-card__arrow { transition: none; }
	.gn-grid .gn-card:hover,
	.gn-grid .gn-card:hover .gn-card__img { transform: none; }
}
