/* ══════════════════════════════════════════════════════
   Hero generale — ali/hero-page block
   Reusable hero for pages (chi-siamo, etc.)
   ══════════════════════════════════════════════════════ */

/* ── Animations ────────────────────────────────────── */
@keyframes csFadeUp  { from { opacity:0; transform:translateY(44px); } to { opacity:1; transform:translateY(0); } }
@keyframes csBounce  { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-6px); } }

/* ── Hero section ──────────────────────────────────── */
.cs-hero {
	position: relative;
	min-height: 70vh;
	display: flex;
	align-items: flex-end;
	padding: 80px 40px 90px;
	overflow: hidden;
}

/* Background image (replaces CSS background-image for better perf) */
.cs-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.cs-hero-bg--mobile  { display: none; }
@media (max-width: 900px) {
	.cs-hero-bg--desktop { display: none; }
	.cs-hero-bg--mobile  { display: block; }
}

/* Gradient overlay */
.cs-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(170deg, rgba(0,192,198,.10) 0%, transparent 40%),
		linear-gradient(to top, rgba(122,77,121,.92) 0%, rgba(122,77,121,.5) 35%, rgba(122,77,121,.12) 65%, transparent 100%);
}

/* Content */
.cs-hero-content {
	position: relative;
	z-index: 2;
	max-width: 1140px;
	width: 100%;
	margin: 0 auto;
	animation: csFadeUp .9s cubic-bezier(.22,1,.36,1) both;
}

.cs-hero h1 {
	font-family: 'Lora', Georgia, serif;
	font-weight: 400;
	font-size: clamp(2.8rem, 6vw, 4.5rem);
	color: #fff;
	margin: 0 0 16px;
	max-width: 600px;
	line-height: 1.08;
	text-shadow: 0 2px 40px rgba(0,0,0,.3);
}
.cs-hero h1 em {
	font-style: italic;
	color: var(--block-accent-pale, #7DDDE0);
	text-shadow: 0 2px 40px rgba(0,192,198,.3);
}

.cs-hero-sub {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	color: rgba(255,255,255,.85);
	max-width: 520px;
	margin: 0;
	line-height: 1.6;
	text-shadow: 0 1px 20px rgba(0,0,0,.4);
	animation: csFadeUp .9s cubic-bezier(.22,1,.36,1) .15s both;
}

/* ── Overtitle ─────────────────────────────────────── */
.cs-hero-overtitle {
	font-family: 'Nunito', system-ui, sans-serif;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .18em;
	color: var(--block-accent, var(--ali-teal));
	margin: 0 0 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.cs-hero-overtitle::before {
	content: '';
	width: 24px;
	height: 2px;
	background: var(--block-accent, var(--ali-teal));
	border-radius: 1px;
	flex-shrink: 0;
}
.cs-hero-overtitle-img {
	max-height: 48px;
	width: auto;
	margin: 0 0 18px;
	filter: brightness(0) invert(1);
}
.cs-hero-overtitle-img--small  { max-height: 30px; }
.cs-hero-overtitle-img--large  { max-height: 72px; }
.cs-hero-overtitle-img--xlarge { max-height: 110px; }

/* ── Title sizes ──────────────────────────────────── */
.cs-hero h1.cs-hero-title--small { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 700px; }
.cs-hero h1.cs-hero-title--large { font-size: clamp(3.2rem, 7.5vw, 5.5rem); max-width: 800px; }

/* CTA group */
.cs-hero-ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
	animation: csFadeUp .9s cubic-bezier(.22,1,.36,1) .3s both;
}
.cs-hero-ctas .cs-hero-cta {
	margin-top: 0;
	animation: none;
}

/* CTA button */
.cs-hero-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 28px;
	padding: 14px 32px;
	border: 2px solid transparent;
	background: #fff;
	color: var(--block-accent, var(--ali-teal)) !important;
	font-family: 'Nunito', system-ui, sans-serif;
	font-size: .88rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	border-radius: var(--ali-btn-radius, 50px);
	text-decoration: none !important;
	transition: all .3s cubic-bezier(.22,1,.36,1);
	animation: csFadeUp .9s cubic-bezier(.22,1,.36,1) .3s both;
	box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.cs-hero-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.cs-hero-cta svg {
	transition: transform .3s ease;
}
.cs-hero-cta:hover svg {
	transform: translateY(3px);
}

/* CTA outline variant (second button) */
.cs-hero-cta--outline {
	background: transparent;
	color: #fff !important;
	border-color: rgba(255,255,255,.5);
	box-shadow: none;
}
.cs-hero-cta--outline:hover {
	border-color: #fff;
	box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.cs-hero-cta--outline svg {
	transform: none;
}
.cs-hero-cta--outline:hover svg {
	transform: translateX(3px);
}

/* Scroll indicator */
.cs-hero-scroll {
	position: absolute;
	bottom: 32px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	color: rgba(255,255,255,.5);
	font-size: .75rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-align: center;
	animation: csBounce 2.5s ease infinite;
}
.cs-hero-scroll::after {
	content: '';
	display: block;
	width: 1px;
	height: 36px;
	background: rgba(255,255,255,.3);
	margin: 8px auto 0;
}

/* ── Gradient variant (no image, navy bg + teal circles) ── */
.cs-hero--gradient {
	background: var(--ali-navy, #7A4D79);
	min-height: 38vh;
	padding: 80px 40px 56px;
}
.cs-hero--gradient::before {
	content: '';
	position: absolute;
	top: -120px;
	right: -120px;
	width: 400px;
	height: 400px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0,192,198,.1) 0%, transparent 70%);
	pointer-events: none;
	z-index: 0;
}
.cs-hero--gradient::after {
	content: '';
	position: absolute;
	bottom: -100px;
	left: -80px;
	width: 300px;
	height: 300px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0,192,198,.06) 0%, transparent 70%);
	pointer-events: none;
}
.cs-hero--gradient h1 {
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	text-shadow: none;
}
.cs-hero--gradient h1.cs-hero-title--small { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.cs-hero--gradient h1.cs-hero-title--large { font-size: clamp(2.8rem, 6.5vw, 4.5rem); }
.cs-hero--gradient h1 em {
	color: var(--block-accent, var(--ali-teal, #00C0C6));
}
.cs-hero--gradient .cs-hero-sub {
	color: rgba(255,255,255,.6);
	text-shadow: none;
}

/* ── Height variants ───────────────────────────────── */
.cs-hero--h-auto { min-height: auto !important; }
.cs-hero--h-50   { min-height: 50vh !important; }
.cs-hero--h-100  { min-height: 100vh !important; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
	.cs-hero {
		min-height: 60vh;
		padding: 60px 24px 70px;
	}
	.cs-hero h1 {
		font-size: clamp(2.2rem, 8vw, 3rem);
	}
	.cs-hero h1.cs-hero-title--small { font-size: clamp(1.6rem, 5vw, 2rem); }
	.cs-hero h1.cs-hero-title--large { font-size: clamp(2.6rem, 9vw, 3.6rem); }
	.cs-hero-scroll {
		display: none;
	}
	.cs-hero--gradient {
		min-height: 28vh;
		padding: 60px 24px 40px;
	}
	.cs-hero-ctas {
		flex-direction: column;
		align-items: flex-start;
	}
}
@media (max-width: 520px) {
	.cs-hero--gradient {
		min-height: 24vh;
	}
}
