/* ================================================================== */
/* iHELP galerija platforme – samostojen modul                          */
/* Vsi razredi imajo predpono "ihg-", zato ne vpliva na ostalo stran.  */
/* ================================================================== */

.ihg {
	background: #f9f8f7;
	padding: 60px 0;
	color: #3a3a3a;
}

.ihg-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 42px;
}

/* ---------- Naslov ---------- */
.ihg-head {
	margin: 0 0 40px;
}

.ihg .ihg-eyebrow {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #3a3a3a;
}

.ihg .ihg-title {
	margin: 6px 0 20px;
	font-size: clamp(34px, 5vw, 64px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -.03em;
	color: #3a3a3a;
}

.ihg .ihg-lead {
	margin: 0;
	max-width: 640px;
	font-size: clamp(16px, 1.6vw, 20px);
	line-height: 1.5;
	color: #3a3a3a;
}

/* ---------- Mreža kartic ---------- */
.ihg-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Kartica ---------- */
.ihg .ihg-card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1.33;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 18px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 10px 30px rgba(38, 38, 42, .08);
	font: inherit;
	text-align: left;
	color: #fff;
	cursor: zoom-in;
	-webkit-appearance: none;
	appearance: none;
}

.ihg .ihg-card img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top left;
	transition: transform .4s ease;
}

/* temen prehod v spodnjem delu kartice */
.ihg .ihg-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(20, 20, 22, .9) 0%, rgba(20, 20, 22, .6) 30%, rgba(20, 20, 22, 0) 60%);
	pointer-events: none;
}

.ihg .ihg-card-text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	display: block;
	padding: 0 30px 24px;
}

.ihg .ihg-card-title {
	display: block;
	margin: 0 0 6px;
	font-size: clamp(20px, 2vw, 28px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.02em;
	color: #fff;
}

.ihg .ihg-card-desc {
	display: block;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	color: #e3dfe0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ihg .ihg-card:hover img {
	transform: scale(1.04);
}

.ihg .ihg-card:focus-visible {
	outline: 3px solid #a6202a;
	outline-offset: 4px;
}

/* ---------- Pogovorno okno (povečava) ---------- */
.ihg-dialog {
	width: min(1100px, calc(100% - 28px));
	max-height: calc(100dvh - 28px);
	margin: auto;
	padding: 12px;
	border: 1px solid #e2e1e4;
	border-radius: 16px;
	background: #fff;
	color: #26262a;
}

.ihg-dialog::backdrop {
	background: rgba(24, 24, 28, .75);
}

.ihg-dialog-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 8px;
}

.ihg-dialog .ihg-dialog-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}

.ihg-dialog .ihg-dialog-close {
	flex: none;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 1px solid #e2e1e4;
	border-radius: 7px;
	background: #f1f1f3;
	font: inherit;
	font-size: 22px;
	line-height: 1;
	color: #26262a;
	cursor: pointer;
}

.ihg-dialog .ihg-dialog-img {
	display: block;
	max-width: 100%;
	max-height: calc(85dvh - 52px);
	margin: 0 auto;
	object-fit: contain;
}

/* ---------- Odzivnost ---------- */
@media (max-width: 980px) {
	.ihg-inner {
		padding: 0 26px;
	}

	.ihg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (max-width: 620px) {
	.ihg {
		padding: 44px 0;
	}

	.ihg-inner {
		padding: 0 20px;
	}

	.ihg-grid {
		grid-template-columns: 1fr;
	}

	.ihg .ihg-card-text {
		padding: 0 20px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ihg .ihg-card img {
		transition: none;
	}
}
