/* mod_inovasi_layanan — warna utama lewat --sp-primary (parameter modul) */
.mod-inovasi {
	--sp-ink: color-mix(in srgb, var(--sp-primary) 30%, #0a1511);
	--sp-muted: color-mix(in srgb, var(--sp-ink) 62%, #fff);
	--sp-line: color-mix(in srgb, var(--sp-primary) 10%, #e8ece9);
	--sp-tint: color-mix(in srgb, var(--sp-primary) 11%, #fff);
	--sp-text: color-mix(in srgb, var(--sp-primary) 80%, #0a1511);
	--iv-band: color-mix(in srgb, var(--sp-primary) 52%, #06130c);
	--iv-w: 252px;
	--iv-ov: 52px;

	margin: var(--sp-mt, 24px) 0 var(--sp-mb, 24px);
	font-family: inherit;
	color: var(--sp-ink);
	line-height: 1.4;
}
.mod-inovasi *, .mod-inovasi *::before, .mod-inovasi *::after { box-sizing: border-box; }
.mod-inovasi [hidden] { display: none !important; }

.mod-inovasi .iv-banner {
	margin: 0; padding: 14px 24px; background: var(--sp-primary); color: #fff; text-align: center;
	font-size: 1.3rem; font-weight: 700; line-height: 1.25; letter-spacing: 0; text-transform: none; border-radius: 12px;
}
.iv-sub { margin: 14px auto 0; max-width: 70ch; text-align: center; color: var(--sp-muted); font-size: .95rem; }

/* ---------- Filter ---------- */
.iv-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.iv-chip {
	cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; color: var(--sp-ink);
	padding: 7px 16px; border-radius: 999px; border: 1px solid var(--sp-line); background: #fff;
	transition: background .15s, color .15s, border-color .15s;
}
.iv-chip:hover { border-color: var(--sp-primary); }
.iv-chip[aria-pressed="true"] { background: var(--sp-primary); border-color: var(--sp-primary); color: #fff; }
.iv-chip:focus-visible, .iv-pg:focus-visible, .iv-card:focus-visible { outline: 3px solid var(--sp-primary); outline-offset: 3px; }

/* ---------- Kartu bertumpuk ---------- */
.iv-fan { display: flex; justify-content: center; align-items: flex-start; padding: 58px 28px 56px; }

.iv-card {
	--d: calc(var(--i) - (var(--n) - 1) / 2);
	--r: calc(var(--d) * 2.6deg);
	--y: calc(var(--d) * var(--d) * 5px);
	--tx: 0px;

	position: relative; z-index: calc(var(--i) + 1);
	display: flex; flex: 0 0 var(--iv-w); width: var(--iv-w); min-height: 380px;
	background: #fff; border: 1px solid var(--sp-line); border-radius: 16px; overflow: hidden;
	color: inherit; text-decoration: none;
	box-shadow: 0 2px 4px rgb(10 21 17 / .05), 0 14px 32px rgb(10 21 17 / .10);
	transform: translate(var(--tx), var(--y)) rotate(var(--r));
	transform-origin: 50% 85%;
	transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .35s, filter .35s, box-shadow .35s;
}
.iv-card:not([hidden]) ~ .iv-card:not([hidden]) { margin-left: calc(var(--iv-ov) * -1); }

.iv-band {
	flex: 0 0 38px; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
	padding: 16px 0 12px; background: var(--iv-band); color: #fff;
}
.iv-band__t {
	writing-mode: vertical-rl; transform: rotate(180deg); max-height: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	font-size: .66rem; font-weight: 700; letter-spacing: .16em;
}
.iv-band__no { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.iv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px 16px; }
.iv-kick { font-size: .66rem; font-weight: 700; letter-spacing: .16em; color: var(--sp-text); }
.iv-title { display: block; font-size: 1.35rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--sp-ink); }
.iv-desc {
	display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
	color: var(--sp-muted); font-size: .86rem; padding-top: 8px; border-top: 1px solid var(--sp-line);
}
.iv-art {
	margin-top: auto; height: 120px; border-radius: 12px; overflow: hidden; display: flex;
	background: linear-gradient(160deg, color-mix(in srgb, var(--sp-primary) 13%, #fff), color-mix(in srgb, var(--sp-primary) 4%, #fff));
}
.iv-art__svg { width: 100%; height: 100%; }
.iv-art__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iv-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 4px; }
.iv-stat { display: flex; flex-direction: column; line-height: 1.1; }
.iv-stat b { font-size: 1.35rem; font-weight: 700; color: var(--sp-ink); }
.iv-stat i { font-style: normal; font-size: .7rem; color: var(--sp-muted); white-space: nowrap; }
.iv-go { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--sp-text); white-space: nowrap; }

/* Ikon bawaan */
.iv-art .ia-t { fill: color-mix(in srgb, var(--sp-primary) 12%, #fff); }
.iv-art .ia-m { fill: color-mix(in srgb, var(--sp-primary) 30%, #fff); }
.iv-art .ia-p { fill: var(--sp-primary); }
.iv-art .ia-d { fill: var(--sp-ink); }
.iv-art .ia-g { fill: #d6a84a; }
.iv-art .ia-w { fill: #fff; }
.iv-art .ia-s { stroke: var(--sp-ink); stroke-width: 2.5; stroke-linejoin: round; }
.iv-art .ia-s1 { stroke: var(--sp-ink); stroke-width: 1.5; stroke-linejoin: round; }
.iv-art .ia-ln { fill: none; stroke: var(--sp-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.iv-art .ia-lw { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Fokus: kartu yang ditunjuk maju, yang lain mundur ---------- */
@media (min-width: 992px) {
	/* Memudar hanya saat ada kartu yang benar-benar ditunjuk mouse / difokus keyboard
	   (bukan saat kursor di area kosong, dan bukan sisa fokus setelah klik). */
	.iv-fan:has(.iv-card:hover) .iv-card:not(:hover),
	.iv-fan:has(.iv-card:focus-visible) .iv-card:not(:focus-visible) { opacity: .78; filter: saturate(.75); }

	.iv-card:hover, .iv-card:focus-visible {
		z-index: 60; opacity: 1; filter: none;
		transform: translate(0, -20px) rotate(0deg) scale(1.07);
		box-shadow: 0 4px 8px rgb(10 21 17 / .08), 0 30px 60px rgb(10 21 17 / .22);
	}
	/* kartu setelahnya bergeser ke kanan, sebelumnya ke kiri, memberi ruang */
	.iv-card:hover ~ .iv-card, .iv-card:focus-visible ~ .iv-card { --tx: 30px; }
	.iv-card:has(~ .iv-card:hover), .iv-card:has(~ .iv-card:focus-visible) { --tx: -30px; }
}
@media (min-width: 992px) and (max-width: 1199px) { .mod-inovasi { --iv-w: 226px; --iv-ov: 58px; } }

.iv-hint { display: none; }

/* ---------- Halaman (pager) ---------- */
.iv-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: -18px; }
.iv-pager__state { font-size: .85rem; font-weight: 700; min-width: 3.4em; text-align: center; font-variant-numeric: tabular-nums; }
.iv-pg {
	width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; padding: 0; font-size: 1.2rem; line-height: 1;
	border: 1px solid var(--sp-line); border-radius: 50%; background: #fff; color: var(--sp-ink);
}
.iv-pg:hover:not(:disabled) { border-color: var(--sp-primary); background: var(--sp-tint); }
.iv-pg:disabled { opacity: .4; cursor: default; }

/* ---------- Tablet & HP: deretan kartu yang digeser ---------- */
@media (max-width: 991px) {
	.iv-fan {
		justify-content: flex-start; gap: 14px; padding: 22px 4px 26px; overflow-x: auto;
		scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
	}
	.iv-card { --r: 0deg; --y: 0px; --tx: 0px; flex: 0 0 min(80vw, 300px); width: min(80vw, 300px); scroll-snap-align: center; margin-left: 0 !important; }
	.mod-inovasi .iv-banner { font-size: 1.1rem; padding: 12px 16px; }
	.iv-filter { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -4px; padding: 2px 4px 6px; scrollbar-width: none; }
	.iv-filter::-webkit-scrollbar { display: none; }
	.iv-chip { flex: 0 0 auto; white-space: nowrap; }
	.iv-hint { display: block; margin: 0; text-align: center; font-size: .78rem; color: var(--sp-muted); }
}
@media (prefers-reduced-motion: reduce) {
	.iv-card, .iv-chip { transition: none; }
	.iv-card:hover ~ .iv-card, .iv-card:has(~ .iv-card:hover) { --tx: 0px; }
}
