/**
 * INTERconNETtiamoci — pagina Storia
 * Estende homepage.css e applica l'identità visiva Lions International.
 */

.ic-history {
	background: var(--ic-white);
	color: var(--ic-navy);
}

.ic-history [id] {
	scroll-margin-top: 112px;
}

/* Hero */
.ic-history-hero {
	background:
		radial-gradient(circle at 89% 16%, rgba(122, 37, 130, 0.42), transparent 29rem),
		radial-gradient(circle at 8% 92%, rgba(64, 124, 202, 0.26), transparent 30rem),
		var(--ic-gradient);
	color: var(--ic-white);
	overflow: hidden;
	padding-bottom: clamp(72px, 9vw, 112px);
	padding-top: clamp(68px, 9vw, 112px);
}

.ic-history-hero::before {
	background: var(--ic-hatch-light);
	content: "";
	inset: 0;
	position: absolute;
}

.ic-history-hero__grid {
	align-items: center;
	display: grid;
	gap: clamp(46px, 8vw, 100px);
	grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
	position: relative;
}

.ic-history-hero .ic-eyebrow,
.ic-history-final-cta .ic-eyebrow {
	color: var(--ic-yellow);
}

.ic-history-hero__title {
	font-size: clamp(2.7rem, 5.8vw, 5rem);
	font-weight: 700;
	letter-spacing: -0.055em;
	line-height: 0.98;
	margin: 0 0 28px;
	max-width: 17ch;
}

.ic-history-hero__lead {
	color: rgba(255, 255, 255, 0.87);
	font-family: var(--ic-serif);
	font-size: clamp(1.08rem, 1.7vw, 1.24rem);
	line-height: 1.62;
	margin: 0;
	max-width: 65ch;
}

.ic-history-hero__lead strong {
	color: var(--ic-yellow);
	font-family: var(--ic-sans);
	font-weight: 800;
}

.ic-history-origin {
	background: var(--ic-white);
	border-radius: var(--ic-radius);
	box-shadow: 0 36px 76px -42px rgba(0, 0, 0, 0.82);
	color: var(--ic-navy);
	overflow: hidden;
	padding: clamp(28px, 4vw, 44px);
	position: relative;
	transform: rotate(1.4deg);
}

.ic-history-origin::before {
	background: linear-gradient(90deg, var(--ic-yellow) 0 48%, var(--ic-blue-light) 48% 76%, var(--ic-purple) 76% 100%);
	content: "";
	height: 7px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.ic-history-origin__label,
.ic-history-timeline__date {
	color: var(--ic-purple);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	margin: 0;
	text-transform: uppercase;
}

.ic-history-origin__year {
	color: var(--ic-blue);
	display: block;
	font-size: clamp(4.4rem, 8vw, 6.6rem);
	font-weight: 700;
	letter-spacing: -0.07em;
	line-height: 0.88;
	margin: 30px 0 20px;
}

.ic-history-origin > p:nth-of-type(2) {
	font-family: var(--ic-serif);
	font-size: 1.02rem;
	line-height: 1.52;
	margin: 0;
}

.ic-history-origin__figures {
	border-top: 1px solid rgba(13, 34, 64, 0.16);
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 28px;
	padding-top: 24px;
}

.ic-history-origin__figures > div + div {
	border-left: 1px solid rgba(13, 34, 64, 0.16);
	padding-left: 22px;
}

.ic-history-origin__figures strong,
.ic-history-origin__figures span {
	display: block;
}

.ic-history-origin__figures strong {
	font-size: clamp(1.7rem, 3vw, 2.25rem);
	letter-spacing: -0.04em;
	line-height: 1;
}

.ic-history-origin__figures span {
	font-family: var(--ic-serif);
	font-size: 0.88rem;
	line-height: 1.35;
	margin-top: 7px;
}

/* Introduzione */
.ic-history-intro {
	background:
		radial-gradient(circle at 91% 12%, rgba(64, 124, 202, 0.13), transparent 28rem),
		linear-gradient(180deg, var(--ic-white) 0%, var(--ic-sky) 100%);
}

.ic-history-intro .ic-eyebrow,
.ic-history-timeline-section .ic-eyebrow,
.ic-history-impact .ic-eyebrow {
	color: var(--ic-blue);
}

.ic-history-intro__grid,
.ic-history-timeline__heading,
.ic-history-impact__heading {
	align-items: end;
	display: grid;
	gap: clamp(36px, 7vw, 84px);
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.ic-history-intro__text {
	border-left: 5px solid var(--ic-yellow);
	padding: 7px 0 7px clamp(24px, 3vw, 38px);
}

.ic-history-intro__text p {
	font-family: var(--ic-serif);
	font-size: clamp(1.08rem, 1.9vw, 1.3rem);
	line-height: 1.58;
	margin: 0;
}

.ic-history-intro__text p + p {
	margin-top: 18px;
}

.ic-history-intro__text strong {
	color: var(--ic-blue);
	font-family: var(--ic-sans);
	font-weight: 800;
}

/* Cronologia */
.ic-history-timeline-section {
	background:
		radial-gradient(circle at 7% 80%, rgba(235, 183, 0, 0.14), transparent 28rem),
		linear-gradient(135deg, var(--ic-sand) 0%, var(--ic-lilac) 100%);
}

.ic-history-timeline-section::before {
	background: var(--ic-hatch-dark);
	content: "";
	inset: 0;
	position: absolute;
}

.ic-history-timeline-section .ic-shell {
	position: relative;
}

.ic-history-timeline__heading > p,
.ic-history-impact__heading > p {
	font-family: var(--ic-serif);
	font-size: 1.08rem;
	line-height: 1.6;
	margin: 0 0 24px;
}

.ic-history-timeline {
	list-style: none;
	margin: clamp(50px, 7vw, 78px) 0 0;
	padding: 0;
	position: relative;
}

.ic-history-timeline::before {
	background: linear-gradient(180deg, var(--ic-yellow), var(--ic-blue), var(--ic-purple));
	bottom: 30px;
	content: "";
	left: 50%;
	position: absolute;
	top: 30px;
	transform: translateX(-50%);
	width: 4px;
}

.ic-history-timeline__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
	margin: 0;
	position: relative;
}

.ic-history-timeline__item + .ic-history-timeline__item {
	margin-top: -12px;
}

.ic-history-timeline__item article {
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid rgba(13, 34, 64, 0.13);
	border-top: 5px solid var(--ic-blue-light);
	border-radius: var(--ic-radius);
	box-shadow: 0 28px 54px -45px rgba(13, 34, 64, 0.84);
	grid-column: 1;
	padding: clamp(26px, 3.5vw, 38px);
	position: relative;
}

.ic-history-timeline__item:nth-child(even) article {
	grid-column: 3;
}

.ic-history-timeline__item article::after {
	border-bottom: 12px solid transparent;
	border-left: 14px solid rgba(255, 255, 255, 0.94);
	border-top: 12px solid transparent;
	content: "";
	position: absolute;
	right: -14px;
	top: 32px;
}

.ic-history-timeline__item:nth-child(even) article::after {
	border-left: 0;
	border-right: 14px solid rgba(255, 255, 255, 0.94);
	left: -14px;
	right: auto;
}

.ic-history-timeline__marker {
	align-self: start;
	background: var(--ic-yellow);
	border: 7px solid var(--ic-white);
	border-radius: 50%;
	box-shadow: 0 0 0 2px rgba(0, 51, 141, 0.25);
	grid-column: 2;
	height: 28px;
	justify-self: center;
	margin-top: 30px;
	position: relative;
	width: 28px;
	z-index: 2;
}

.ic-history-timeline__item--milestone .ic-history-timeline__marker {
	background: var(--ic-purple);
	box-shadow: 0 0 0 5px rgba(122, 37, 130, 0.14);
}

.ic-history-timeline__item--milestone article {
	border-top: 6px solid var(--ic-yellow);
}

.ic-history-timeline__date {
	background: rgba(64, 124, 202, 0.11);
	border-radius: 999px;
	color: var(--ic-blue);
	display: inline-block;
	padding: 7px 11px 6px;
}

.ic-history-timeline__item h3 {
	font-size: clamp(1.4rem, 2.5vw, 1.85rem);
	letter-spacing: -0.03em;
	line-height: 1.12;
	margin: 12px 0 14px;
}

.ic-history-timeline__item article > p:last-child {
	font-family: var(--ic-serif);
	font-size: 1.02rem;
	line-height: 1.6;
	margin: 0;
}

.ic-history-timeline__item article > p:last-child strong {
	color: var(--ic-blue);
	font-family: var(--ic-sans);
	font-weight: 800;
}

/* Evoluzione */
.ic-history-evolution {
	background:
		radial-gradient(circle at 88% 12%, rgba(122, 37, 130, 0.4), transparent 27rem),
		linear-gradient(135deg, #0d2240 0%, #00338d 70%, #173461 100%);
	color: var(--ic-white);
}

.ic-history-evolution__panel {
	position: relative;
}

.ic-history-evolution .ic-eyebrow {
	color: var(--ic-yellow);
}

.ic-history-evolution__heading {
	max-width: 830px;
}

.ic-history-evolution__heading h2 {
	font-size: clamp(2.25rem, 4.6vw, 3.8rem);
	letter-spacing: -0.05em;
	line-height: 1.02;
	margin: 0;
	max-width: 20ch;
}

.ic-history-evolution__heading > p:last-child {
	color: rgba(255, 255, 255, 0.84);
	font-family: var(--ic-serif);
	font-size: 1.08rem;
	line-height: 1.6;
	margin: 24px 0 0;
	max-width: 70ch;
}

.ic-history-evolution__grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: clamp(42px, 6vw, 64px);
}

.ic-history-evolution__grid article {
	background: rgba(255, 255, 255, 0.09);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: var(--ic-radius);
	padding: clamp(26px, 3.4vw, 38px);
}

.ic-history-evolution__grid span {
	color: var(--ic-yellow);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
}

.ic-history-evolution__grid h3 {
	font-size: 1.4rem;
	letter-spacing: -0.025em;
	margin: 34px 0 11px;
}

.ic-history-evolution__grid p {
	color: rgba(255, 255, 255, 0.82);
	font-family: var(--ic-serif);
	font-size: 0.97rem;
	line-height: 1.52;
	margin: 0;
}

/* Impatto */
.ic-history-impact {
	background:
		radial-gradient(circle at 92% 10%, rgba(64, 124, 202, 0.13), transparent 26rem),
		linear-gradient(180deg, var(--ic-white) 0%, var(--ic-sky) 100%);
	padding-top: clamp(62px, 7vw, 92px);
	position: relative;
}

.ic-history-impact__figures {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 0;
	position: relative;
	z-index: 2;
}

.ic-history-impact__figures > div {
	background: var(--ic-white);
	border: 1px solid rgba(13, 34, 64, 0.13);
	border-radius: var(--ic-radius);
	box-shadow: 0 26px 52px -44px rgba(13, 34, 64, 0.75);
	min-height: 190px;
	padding: clamp(26px, 3.1vw, 36px);
}

.ic-history-impact__figures > div:nth-child(1) {
	border-top: 6px solid var(--ic-yellow);
}

.ic-history-impact__figures > div:nth-child(2) {
	border-top: 6px solid var(--ic-blue-light);
}

.ic-history-impact__figures > div:nth-child(3) {
	border-top: 6px solid var(--ic-blue);
}

.ic-history-impact__figures > div:nth-child(4) {
	border-top: 6px solid var(--ic-purple);
}

.ic-history-impact__figures strong,
.ic-history-impact__figures span {
	display: block;
}

.ic-history-impact__figures strong {
	color: var(--ic-blue);
	font-size: clamp(2.05rem, 4vw, 3.25rem);
	letter-spacing: -0.055em;
	line-height: 1;
}

.ic-history-impact__figures strong small {
	color: var(--ic-purple);
	display: block;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1;
	margin-bottom: 8px;
	text-transform: uppercase;
}

.ic-history-impact__figures span {
	font-family: var(--ic-sans);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.38;
	margin-top: 32px;
}

.ic-history-impact__heading {
	margin-top: clamp(42px, 6vw, 68px);
}

/* Chiusura */
.ic-history-final-cta {
	background:
		radial-gradient(circle at 12% 84%, rgba(64, 124, 202, 0.3), transparent 25rem),
		var(--ic-gradient-alt);
	color: var(--ic-white);
}

.ic-history-final-cta__grid {
	align-items: center;
	display: grid;
	gap: clamp(36px, 7vw, 86px);
	grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
}

.ic-history-final-cta__grid > div:first-child > p:last-child {
	color: rgba(255, 255, 255, 0.86);
	font-family: var(--ic-serif);
	font-size: 1.08rem;
	line-height: 1.6;
	margin: 0;
	max-width: 62ch;
}

.ic-history-final-cta .ic-actions {
	justify-content: flex-end;
	margin-top: 0;
}

.ic-history-notes {
	background: var(--ic-paper);
	padding-block: clamp(38px, 5vw, 58px);
}

.ic-history-notes h2 {
	font-size: 0.88rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.ic-history-notes p {
	color: var(--ic-gray);
	font-family: var(--ic-serif);
	font-size: 0.94rem;
	line-height: 1.58;
	margin: 0;
	max-width: 94ch;
}

.ic-history-notes a {
	color: var(--ic-blue);
	font-family: var(--ic-sans);
	font-weight: 800;
	white-space: nowrap;
}

.ic-history-notes a:hover,
.ic-history-notes a:focus-visible {
	color: var(--ic-purple);
}

/* Movimento discreto: senza JavaScript i contenuti restano visibili. */
.ic-history-motion-ready .ic-history-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 620ms ease var(--ic-history-delay, 0ms), transform 620ms ease var(--ic-history-delay, 0ms);
}

.ic-history-motion-ready .ic-history-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Contrasto sopra le regole globali di GeneratePress. */
.ic-home a.ic-btn--ghost {
	color: var(--ic-white);
}

.ic-home a.ic-btn--yellow {
	color: var(--ic-navy);
}

/* Tablet e smartphone */
@media (max-width: 1040px) {
	.ic-history-impact__figures {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.ic-history-hero__grid,
	.ic-history-intro__grid,
	.ic-history-timeline__heading,
	.ic-history-impact__heading,
	.ic-history-final-cta__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ic-history-origin {
		max-width: 610px;
		transform: none;
	}

	.ic-history-evolution__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ic-history-evolution__grid h3 {
		margin-top: 24px;
	}

	.ic-history-final-cta .ic-actions {
		justify-content: flex-start;
	}
}

@media (max-width: 760px) {
	.ic-history-timeline::before {
		left: 13px;
		transform: none;
	}

	.ic-history-timeline__item,
	.ic-history-timeline__item:nth-child(even) {
		grid-template-columns: 42px minmax(0, 1fr);
	}

	.ic-history-timeline__item + .ic-history-timeline__item {
		margin-top: 24px;
	}

	.ic-history-timeline__item article,
	.ic-history-timeline__item:nth-child(even) article {
		grid-column: 2;
	}

	.ic-history-timeline__marker {
		grid-column: 1;
		justify-self: start;
	}

	.ic-history-timeline__item article::after,
	.ic-history-timeline__item:nth-child(even) article::after {
		border-bottom: 12px solid transparent;
		border-left: 0;
		border-right: 14px solid rgba(255, 255, 255, 0.94);
		border-top: 12px solid transparent;
		left: -14px;
		right: auto;
	}
}

@media (max-width: 620px) {
	.ic-history [id] {
		scroll-margin-top: 84px;
	}

	.ic-history-hero {
		padding-bottom: 68px;
		padding-top: 58px;
	}

	.ic-history-hero__title {
		font-size: clamp(2.35rem, 12vw, 3.45rem);
	}

	.ic-history-origin__figures,
	.ic-history-impact__figures {
		grid-template-columns: minmax(0, 1fr);
	}

	.ic-history-origin__figures > div + div {
		border-left: 0;
		border-top: 1px solid rgba(13, 34, 64, 0.16);
		padding-left: 0;
		padding-top: 18px;
	}

	.ic-history-impact__figures > div {
		min-height: 0;
	}

	.ic-history-impact__figures span {
		margin-top: 24px;
	}

	.ic-history-timeline__item article {
		padding: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ic-history *,
	.ic-history *::before,
	.ic-history *::after {
		animation: none !important;
		opacity: 1 !important;
		scroll-behavior: auto !important;
		transform: none !important;
		transition-duration: 0.01ms !important;
	}
}
