/* Slider cinematografico della home ([ig_hero]) */
.ig-hero {
	--ig-accent: #ff2851;
	--ig-bg: #0a0a0a;
	--ig-dur: 6000ms;
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;          /* la striscia di miniature non deve allargare la pagina */
	overflow: hidden;
	margin: 0 0 40px;
	background: var(--ig-bg);
	color: #fff;
	outline: none;
	font-family: Roboto, Arial, sans-serif;
}
.ig-hero:focus-visible { box-shadow: 0 0 0 3px var(--ig-accent); }

/* ---------- palco ---------- */
.ig-hero__stage {
	position: relative;
	height: clamp(360px, 62vh, 640px);
	overflow: hidden;
	background: #111;
}
.ig-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s ease, visibility 0s linear .8s;
}
.ig-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity .8s ease, visibility 0s;
	z-index: 1;
}
.ig-hero .ig-hero__link,
.ig-hero .ig-hero__link:hover,
.ig-hero .ig-hero__link:focus {
	position: absolute;
	inset: 0;
	display: block;
	color: #fff;
	text-decoration: none;
}
.ig-hero .ig-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transform: scale(1.02);
	transform-origin: 60% 40%;
}
.ig-hero__slide.is-active .ig-hero__img {
	animation: ig-hero-zoom calc(var(--ig-dur) + 1200ms) ease-out forwards;
}
@keyframes ig-hero-zoom {
	to { transform: scale(1.1); }
}
.ig-hero__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(10,10,10,.96) 0%, rgba(10,10,10,.7) 32%, rgba(10,10,10,.1) 68%, rgba(10,10,10,0) 100%),
		linear-gradient(to right, rgba(10,10,10,.55) 0%, rgba(10,10,10,0) 60%);
}

/* ---------- testo ---------- */
.ig-hero__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	max-width: 860px;
	padding: 0 48px 40px;
}
.ig-hero__slide.is-active .ig-hero__content > * {
	animation: ig-hero-in .7s cubic-bezier(.2,.7,.2,1) both;
}
.ig-hero__slide.is-active .ig-hero__content > :nth-child(2) { animation-delay: .08s; }
.ig-hero__slide.is-active .ig-hero__content > :nth-child(3) { animation-delay: .16s; }
.ig-hero__slide.is-active .ig-hero__content > :nth-child(4) { animation-delay: .24s; }
@keyframes ig-hero-in {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}
/* forma inclinata solo sullo sfondo: la scritta resta dritta (l'animazione d'ingresso usa transform sul contenitore) */
.ig-hero__badge {
	position: relative;
	isolation: isolate;
	display: inline-block;
	padding: 6px 16px;
	font: 800 13px/1 Dosis, sans-serif;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.ig-hero__badge::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--ig-c, var(--ig-accent));
	transform: skewX(-14deg);
}
.ig-hero .ig-hero__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font: 800 clamp(26px, 3.4vw, 50px)/1.05 Dosis, sans-serif;
	text-transform: uppercase;
	letter-spacing: .01em;
	text-shadow: 0 2px 24px rgba(0,0,0,.45);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ig-hero__excerpt {
	max-width: 640px;
	color: rgba(255,255,255,.82);
	font-size: 16px;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ig-hero__meta {
	display: flex;
	align-items: center;
	gap: 18px;
	font: 700 13px/1 Dosis, sans-serif;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(255,255,255,.65);
}
.ig-hero__cta {
	color: var(--ig-accent);
	transition: letter-spacing .25s ease;
}
.ig-hero__link:hover .ig-hero__cta,
.ig-hero__link:focus-visible .ig-hero__cta { letter-spacing: .16em; }

/* ---------- miniature ---------- */
.ig-hero__rail {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 2px;
	background: #181818;
}
.ig-hero .ig-hero__thumb {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-sizing: border-box;
	height: auto;         /* il tema fissa i pulsanti a 36px */
	min-height: 0;
	min-width: 0;
	line-height: normal;
	white-space: normal;  /* il tema mette nowrap: un titolo lungo allargava tutta la pagina su mobile */
	margin: 0;
	padding: 12px 10px 14px;
	border: 0;
	border-radius: 0;
	background: #181818;
	color: #fff;
	text-align: left;
	cursor: pointer;
	opacity: .5;
	transition: opacity .25s ease, background .25s ease;
}
.ig-hero .ig-hero__thumb:hover,
.ig-hero .ig-hero__thumb:focus-visible { opacity: .85; background: #202020; outline: none; }
.ig-hero .ig-hero__thumb.is-active { opacity: 1; background: #252525; }
.ig-hero .ig-hero__thumb-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	margin: 0;
	object-fit: cover;
}
.ig-hero .ig-hero__thumb .ig-hero__thumb-title {
	white-space: normal;
	overflow-wrap: anywhere;
	color: #fff;
	font: 700 13px/1.25 Dosis, sans-serif;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ig-hero__bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: rgba(255,255,255,.1);
	overflow: hidden;
}
.ig-hero__bar > i {
	display: block;
	height: 100%;
	background: var(--ig-c, var(--ig-accent));
	transform: scaleX(0);
	transform-origin: left;
}
.ig-hero__thumb.is-active .ig-hero__bar > i {
	animation: ig-hero-bar var(--ig-dur) linear forwards;
}
.ig-hero.is-paused .ig-hero__bar > i,
.ig-hero.is-paused .ig-hero__slide.is-active .ig-hero__img { animation-play-state: paused; }
@keyframes ig-hero-bar {
	to { transform: scaleX(1); }
}

/* ---------- tablet e mobile ---------- */
@media (max-width: 1100px) {
	.ig-hero__content { padding: 0 32px 32px; }
	/* 8 miniature affiancate sarebbero troppo strette: striscia scorrevole */
	.ig-hero__rail {
		display: flex;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}
	.ig-hero__rail::-webkit-scrollbar { display: none; }
	.ig-hero .ig-hero__thumb { flex: 0 0 24%; scroll-snap-align: start; }
}
@media (max-width: 767px) {
	.ig-hero__stage { height: clamp(300px, 58vh, 460px); }
	.ig-hero__content { gap: 10px; padding: 0 18px 22px; }
	.ig-hero__excerpt { display: none; }
	.ig-hero__meta { gap: 12px; font-size: 12px; }
	.ig-hero .ig-hero__thumb { flex: 0 0 44%; }
}

/* ---------- chi preferisce meno animazioni ---------- */
@media (prefers-reduced-motion: reduce) {
	.ig-hero__slide,
	.ig-hero__slide.is-active { transition: none; }
	.ig-hero__slide.is-active .ig-hero__img,
	.ig-hero__slide.is-active .ig-hero__content > * { animation: none; }
	.ig-hero__bar { display: none; }
}
