/* ============================================
   ScuolaDigitale Academy - Template CSS
   Ispirato a scuoladigitaleacademy.it
   Colori: #2795DE (blu primario), #25ADDA (azzurro), #1F313F (testo), #54606E (slate)
   Font: Nunito (headings), Nunito Sans (body), Roboto (nav)
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
	font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 16px;
	line-height: 1.7;
	color: #1F313F;
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Nunito', 'Nunito Sans', sans-serif;
	font-weight: 700;
	line-height: 1.25;
	color: #1F313F;
}

a { color: #2795DE; text-decoration: none; transition: color 0.3s; }
a:hover { color: #4577C0; }

img { max-width: 100%; height: auto; }

.sd-container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
}

/* --- HEADER --- */
.sd-header {
	background: #fff;
	padding: 15px 0;
	position: relative;
	z-index: 100;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
	transition: transform 0.3s;
}
.sd-header.hidden { /* keep visible, sticky takes over visually */ }

.sd-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.sd-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}
.sd-logo-icon svg { width: 44px; height: 44px; }
.sd-logo-sm .sd-logo-icon svg { width: 36px; height: 36px; }
.sd-logo-title {
	font-family: 'Nunito', sans-serif;
	font-weight: 800;
	font-size: 20px;
	color: #1F313F;
	display: block;
	line-height: 1.1;
}
.sd-logo-subtitle {
	font-family: 'Nunito Sans', sans-serif;
	font-weight: 300;
	font-size: 13px;
	color: #2795DE;
	display: block;
	letter-spacing: 2px;
	text-transform: uppercase;
}

/* Nav */
.sd-nav ul {
	list-style: none;
	display: flex;
	gap: 8px;
}
.sd-nav ul li a,
.sd-nav a {
	font-family: 'Roboto', sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: #1F313F;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 8px 14px;
	border-radius: 5px;
	transition: all 0.3s;
	text-decoration: none;
	display: inline-block;
}
.sd-nav ul li a:hover,
.sd-nav a:hover {
	color: #2795DE;
	background: rgba(39, 149, 222, 0.06);
}
.sd-nav ul li.active > a,
.sd-nav .active a {
	color: #2795DE;
}

/* Header button */
.sd-btn-header {
	font-family: 'Nunito Sans', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #fff !important;
	background: #25ADDA;
	padding: 10px 22px;
	border-radius: 5px;
	transition: all 0.3s;
	text-decoration: none;
	white-space: nowrap;
}
.sd-btn-header:hover {
	background: #2098D1;
	transform: scale(1.03);
	color: #fff !important;
}

/* Hamburger */
.sd-hamburger {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	flex-direction: column;
	gap: 5px;
}
.sd-hamburger span {
	display: block;
	width: 24px;
	height: 2px;
	background: #1F313F;
	border-radius: 2px;
	transition: all 0.3s;
}
.sd-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.sd-hamburger.active span:nth-child(2) { opacity: 0; }
.sd-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Sticky header */
.sd-sticky-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: #fff;
	padding: 10px 0;
	box-shadow: 0 2px 15px rgba(0,0,0,0.1);
	z-index: 10301;
	transform: translateY(-100%);
	transition: transform 0.35s ease;
}
.sd-sticky-header.visible { transform: translateY(0); }

/* --- BUTTONS --- */
.sd-btn {
	display: inline-block;
	font-family: 'Nunito Sans', sans-serif;
	font-weight: 600;
	font-size: 15px;
	padding: 12px 28px;
	border-radius: 5px;
	transition: all 0.3s;
	cursor: pointer;
	text-decoration: none;
	border: 2px solid transparent;
}
.sd-btn-lg { padding: 15px 36px; font-size: 16px; }

.sd-btn-primary {
	background: #2795DE;
	color: #fff !important;
	border-color: #2795DE;
}
.sd-btn-primary:hover {
	background: #4577C0;
	border-color: #4577C0;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(39, 149, 222, 0.35);
	color: #fff !important;
}

.sd-btn-outline {
	background: transparent;
	color: #fff !important;
	border-color: rgba(255,255,255,0.6);
}
.sd-btn-outline:hover {
	background: #fff;
	color: #2795DE !important;
	border-color: #fff;
	transform: translateY(-2px);
}

.sd-btn-outline-light {
	background: transparent;
	color: #fff !important;
	border-color: rgba(255,255,255,0.5);
}
.sd-btn-outline-light:hover {
	background: rgba(255,255,255,0.1);
	border-color: #fff;
	color: #fff !important;
	transform: translateY(-2px);
}

/* --- HERO --- */
.sd-hero {
	position: relative;
	background: linear-gradient(135deg, #0C0C0D 0%, #1a2a3a 30%, #1F313F 60%, #2a4a5a 100%);
	min-height: 92vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	padding: 120px 20px 80px;
}
.sd-hero-overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at 20% 50%, rgba(39, 149, 222, 0.15) 0%, transparent 60%),
		radial-gradient(ellipse at 80% 20%, rgba(37, 173, 218, 0.1) 0%, transparent 50%),
		radial-gradient(ellipse at 50% 80%, rgba(39, 149, 222, 0.08) 0%, transparent 40%);
	z-index: 1;
}
.sd-hero-particles {
	position: absolute;
	inset: 0;
	z-index: 2;
	overflow: hidden;
}
.sd-particle {
	position: absolute;
	background: rgba(37, 173, 218, 0.4);
	border-radius: 50%;
	animation: float-particle linear infinite;
}
@keyframes float-particle {
	0% { transform: translateY(0) scale(1); opacity: 0; }
	10% { opacity: 1; }
	90% { opacity: 1; }
	100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

.sd-hero-content {
	position: relative;
	z-index: 3;
}

.sd-hero-badge {
	display: inline-block;
	font-family: 'Roboto', sans-serif;
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 3px;
	color: #25ADDA;
	background: rgba(37, 173, 218, 0.1);
	border: 1px solid rgba(37, 173, 218, 0.3);
	padding: 8px 24px;
	border-radius: 50px;
	margin-bottom: 30px;
}

.sd-hero h1 {
	font-size: 52px;
	font-weight: 800;
	color: #fff;
	margin-bottom: 24px;
	line-height: 1.15;
}
.sd-hero h1 span {
	color: #25ADDA;
}

.sd-hero-desc {
	font-size: 18px;
	color: rgba(255,255,255,0.8);
	max-width: 700px;
	margin: 0 auto 40px;
	line-height: 1.8;
}
.sd-hero-desc strong { color: #fff; }

.sd-hero-buttons {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 60px;
}

/* Stats */
.sd-hero-stats {
	display: flex;
	justify-content: center;
	gap: 50px;
	flex-wrap: wrap;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.8s ease;
}
.sd-hero-stats.sd-visible { opacity: 1; transform: translateY(0); }

.sd-stat {
	text-align: center;
}
.sd-stat-num {
	font-family: 'Nunito', sans-serif;
	font-size: 42px;
	font-weight: 800;
	color: #25ADDA;
	display: block;
	line-height: 1;
}
.sd-stat-plus {
	font-family: 'Nunito', sans-serif;
	font-size: 28px;
	font-weight: 700;
	color: #25ADDA;
}
.sd-stat-label {
	font-size: 13px;
	color: rgba(255,255,255,0.6);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-top: 4px;
	display: block;
}

/* --- SECTIONS --- */
.sd-section {
	padding: 90px 0;
}
.sd-section-white { background: #fff; }
.sd-section-light { background: #F7F7F7; }
.sd-section-dark { background: #1F313F; }
.sd-section-slate { background: #54606E; }

.sd-section-header {
	text-align: center;
	max-width: 680px;
	margin: 0 auto 60px;
}
.sd-section-header h2 {
	font-size: 36px;
	margin-bottom: 16px;
}
.sd-section-header p {
	font-size: 17px;
	color: #54606E;
	line-height: 1.7;
}
.sd-header-light h2 { color: #fff; }
.sd-header-light p { color: rgba(255,255,255,0.7); }

.sd-section-tag {
	display: inline-block;
	font-family: 'Roboto', sans-serif;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 3px;
	color: #2795DE;
	margin-bottom: 12px;
}
.sd-tag-light { color: #25ADDA; }

/* --- CARDS (Servizi) --- */
.sd-cards-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.sd-card {
	background: #fff;
	border-radius: 10px;
	padding: 36px 30px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	transition: all 0.4s ease;
	border: 1px solid rgba(0,0,0,0.04);
	opacity: 0;
	transform: translateY(30px);
}
.sd-card.sd-visible {
	opacity: 1;
	transform: translateY(0);
}
.sd-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 40px rgba(39, 149, 222, 0.12);
	border-color: rgba(39, 149, 222, 0.15);
}

.sd-card-icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}
.sd-card-icon svg { width: 28px; height: 28px; }
.sd-card-icon-blue   { background: #EBF5FB; color: #2795DE; }
.sd-card-icon-green  { background: #EAFAF1; color: #27AE60; }
.sd-card-icon-purple { background: #F4ECF7; color: #8E44AD; }
.sd-card-icon-orange { background: #FEF5E7; color: #E67E22; }
.sd-card-icon-red    { background: #FDEDEC; color: #E74C3C; }
.sd-card-icon-teal   { background: #E8F8F5; color: #1ABC9C; }
.sd-card-icon-rose   { background: #FDEEF4; color: #E84393; }

.sd-card h3 {
	font-size: 20px;
	margin-bottom: 12px;
}
.sd-card p {
	font-size: 15px;
	color: #54606E;
	line-height: 1.7;
	margin-bottom: 16px;
}

.sd-card-link {
	font-family: 'Nunito Sans', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #2795DE;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.3s;
}
.sd-card-link:hover { gap: 10px; color: #00559E; }
.sd-card-link span { transition: transform 0.3s; }

/* --- SOFIA SECTION --- */
.sd-section-sofia {
	background: linear-gradient(160deg, #FFF8FC 0%, #F5EEFF 40%, #EFF6FF 100%);
	padding: 90px 0;
	position: relative;
	overflow: hidden;
}
.sd-section-sofia::before {
	content: '';
	position: absolute;
	top: -100px; right: -100px;
	width: 400px; height: 400px;
	background: radial-gradient(circle, rgba(155,142,196,0.08) 0%, transparent 70%);
	border-radius: 50%;
}
.sd-section-sofia::after {
	content: '';
	position: absolute;
	bottom: -100px; left: -100px;
	width: 350px; height: 350px;
	background: radial-gradient(circle, rgba(240,163,179,0.08) 0%, transparent 70%);
	border-radius: 50%;
}

.sd-sofia-grid {
	display: flex;
	flex-direction: column;
	gap: 36px;
	margin-bottom: 40px;
}

.sd-sofia-card {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 40px;
	align-items: start;
	background: #fff;
	border-radius: 24px;
	padding: 40px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.05);
	border: 2px solid rgba(155,142,196,0.1);
	transition: all 0.4s ease;
	position: relative;
	z-index: 1;
}
.sd-sofia-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(155,142,196,0.15);
}
.sd-sofia-parla:hover { border-color: rgba(155,142,196,0.3); }
.sd-sofia-disegna:hover { border-color: rgba(240,163,179,0.3); }

/* Visual / Avatar */
.sd-sofia-visual {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.sd-sofia-avatar {
	width: 180px;
	height: 180px;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(0,0,0,0.1);
	animation: sofia-float 4s ease-in-out infinite;
}
.sd-sofia-avatar svg { width: 100%; height: 100%; }
@keyframes sofia-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}
.sd-sofia-sparkles {
	position: absolute;
	inset: -20px;
}
.sparkle {
	position: absolute;
	width: 8px;
	height: 8px;
	background: #FFD93D;
	border-radius: 50%;
	animation: sparkle-twinkle 2s ease-in-out infinite;
}
.s1 { top: 10%; left: 10%; animation-delay: 0s; }
.s2 { top: 5%; right: 15%; animation-delay: 0.6s; }
.s3 { bottom: 15%; right: 10%; animation-delay: 1.2s; }
@keyframes sparkle-twinkle {
	0%, 100% { opacity: 0; transform: scale(0.5); }
	50% { opacity: 1; transform: scale(1.2); }
}

/* Content */
.sd-sofia-badge {
	display: inline-block;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 14px;
	border-radius: 20px;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
}
.sd-sofia-content h3 {
	font-size: 28px;
	font-weight: 900;
	margin-bottom: 6px;
	color: #1F313F;
}
.sd-sofia-subtitle {
	font-size: 16px;
	color: #54606E;
	font-weight: 600;
	font-style: italic;
	margin-bottom: 14px;
}
.sd-sofia-content > p {
	font-size: 15px;
	color: #54606E;
	line-height: 1.7;
	margin-bottom: 18px;
}

.sd-sofia-features {
	list-style: none;
	margin-bottom: 24px;
}
.sd-sofia-features li {
	font-size: 14px;
	color: #3D3D5C;
	line-height: 1.6;
	padding: 8px 0 8px 28px;
	position: relative;
	border-bottom: 1px solid rgba(0,0,0,0.04);
}
.sd-sofia-features li:last-child { border-bottom: none; }
.sd-sofia-features li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 14px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid currentColor;
}
.sd-sofia-parla .sd-sofia-features li::before { border-color: #9B8EC4; background: rgba(155,142,196,0.1); }
.sd-sofia-disegna .sd-sofia-features li::before { border-color: #F0A3B3; background: rgba(240,163,179,0.1); }
.sd-sofia-anna .sd-sofia-features li::before { border-color: #4CAF50; background: rgba(76,175,80,0.1); }
.sd-sofia-anna:hover { border-color: rgba(76,175,80,0.3); }
.sd-sofia-avatarstudio .sd-sofia-features li::before { border-color: #6C5CE7; background: rgba(108,92,231,0.1); }
.sd-sofia-avatarstudio:hover { border-color: rgba(108,92,231,0.3); }

.sd-sofia-features li strong { color: #1F313F; }
.sd-sofia-features li em { color: #9B8EC4; font-style: italic; }

.sd-btn-sofia {
	display: inline-block;
	font-family: 'Nunito', sans-serif;
	font-weight: 800;
	font-size: 16px;
	color: #fff !important;
	padding: 14px 32px;
	border-radius: 14px;
	text-decoration: none;
	transition: all 0.3s;
	box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.sd-btn-sofia:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.2);
	filter: brightness(1.1);
	color: #fff !important;
}

/* Pedagogy note */
.sd-sofia-pedagogy {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: #fff;
	border-radius: 16px;
	padding: 24px 28px;
	border-left: 4px solid #2795DE;
	box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.sd-pedagogy-icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
}
.sd-pedagogy-icon svg { width: 32px; height: 32px; }
.sd-pedagogy-text h4 {
	font-size: 16px;
	font-weight: 800;
	color: #1F313F;
	margin-bottom: 6px;
}
.sd-pedagogy-text p {
	font-size: 14px;
	color: #54606E;
	line-height: 1.7;
}

@media (max-width: 900px) {
	.sd-sofia-card {
		grid-template-columns: 1fr;
		text-align: center;
		padding: 28px 20px;
	}
	.sd-sofia-visual { justify-content: center; }
	.sd-sofia-avatar { width: 140px; height: 140px; }
	.sd-sofia-features li { text-align: left; }
	.sd-sofia-pedagogy { flex-direction: column; text-align: center; align-items: center; }
}

/* --- SPLIT (Laboratorio AI) --- */
.sd-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
}
.sd-section-dark .sd-split-text h2 { color: #fff; font-size: 36px; margin-bottom: 20px; }
.sd-section-dark .sd-split-text p { color: rgba(255,255,255,0.75); font-size: 17px; margin-bottom: 30px; }
.sd-section-dark .sd-split-text .sd-section-tag { margin-bottom: 12px; display: block; }

.sd-check-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.sd-check-list li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}
.sd-check-list li svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.sd-check-list li div { color: rgba(255,255,255,0.8); font-size: 15px; line-height: 1.6; }
.sd-check-list li strong { color: #fff; }

.sd-split-text, .sd-split-visual {
	opacity: 0;
	transform: translateX(-30px);
	transition: all 0.8s ease;
}
.sd-split-visual { transform: translateX(30px); }
.sd-split-text.sd-visible { opacity: 1; transform: translateX(0); }
.sd-split-visual.sd-visible { opacity: 1; transform: translateX(0); }

/* AI Visual animation */
.sd-ai-visual {
	position: relative;
	width: 340px;
	height: 340px;
	margin: 0 auto;
}
.sd-ai-ring {
	position: absolute;
	border-radius: 50%;
	border: 1px solid rgba(37, 173, 218, 0.2);
}
.sd-ring-1 { inset: 0; animation: pulse-ring 4s ease-in-out infinite; }
.sd-ring-2 { inset: 40px; animation: pulse-ring 4s ease-in-out infinite 0.5s; border-color: rgba(39, 149, 222, 0.25); }
.sd-ring-3 { inset: 80px; animation: pulse-ring 4s ease-in-out infinite 1s; border-color: rgba(39, 149, 222, 0.3); }
@keyframes pulse-ring {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.05); opacity: 0.6; }
}

.sd-ai-center {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
}
.sd-ai-center svg { width: 80px; height: 80px; }

.sd-ai-node {
	position: absolute;
	font-family: 'Roboto', sans-serif;
	font-size: 11px;
	font-weight: 500;
	color: #25ADDA;
	background: rgba(37, 173, 218, 0.1);
	border: 1px solid rgba(37, 173, 218, 0.3);
	padding: 6px 14px;
	border-radius: 20px;
	white-space: nowrap;
	animation: node-float 6s ease-in-out infinite;
}
.sd-node-1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.sd-node-2 { top: 18%; right: 0; animation-delay: 1s; }
.sd-node-3 { bottom: 18%; right: 0; animation-delay: 2s; }
.sd-node-4 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 3s; }
.sd-node-5 { bottom: 18%; left: 0; animation-delay: 4s; }
.sd-node-6 { top: 18%; left: 0; animation-delay: 5s; }
@keyframes node-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}
.sd-node-1, .sd-node-4 {
	animation-name: node-float-x;
}
@keyframes node-float-x {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50% { transform: translateX(-50%) translateY(-6px); }
}

/* --- ROLES (Per Chi) --- */
.sd-roles-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	align-items: stretch;
}

.sd-role-card {
	background: #fff;
	border-radius: 10px;
	padding: 40px 30px 36px;
	text-align: center;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
	transition: all 0.4s ease;
	border: 2px solid transparent;
	position: relative;
	opacity: 0;
	transform: translateY(30px);
}
.sd-role-card.sd-visible { opacity: 1; transform: translateY(0); }
.sd-role-card:hover { transform: translateY(-6px); box-shadow: 0 10px 35px rgba(0,0,0,0.08); }

.sd-role-featured {
	border-color: #2795DE;
	box-shadow: 0 4px 20px rgba(39, 149, 222, 0.15);
}
.sd-role-badge {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	background: #2795DE;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 4px 16px;
	border-radius: 20px;
}

.sd-role-icon { margin-bottom: 20px; }
.sd-role-icon svg { width: 72px; height: 72px; }

.sd-role-card h3 { font-size: 22px; margin-bottom: 14px; color: #1F313F; }
.sd-role-card p { font-size: 15px; color: #54606E; margin-bottom: 20px; line-height: 1.7; }

.sd-role-card ul {
	list-style: none;
	text-align: left;
}
.sd-role-card ul li {
	font-size: 14px;
	color: #1F313F;
	padding: 6px 0;
	padding-left: 22px;
	position: relative;
}
.sd-role-card ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 8px;
	height: 8px;
	background: #2795DE;
	border-radius: 50%;
}

/* --- STEPS --- */
.sd-steps {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}

.sd-step {
	flex: 1;
	min-width: 200px;
	max-width: 240px;
	text-align: center;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.5s ease;
}
.sd-step.sd-visible { opacity: 1; transform: translateY(0); }

.sd-step-num {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #2795DE;
	color: #fff;
	font-family: 'Nunito', sans-serif;
	font-size: 24px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}
.sd-step h3 { font-size: 17px; margin-bottom: 10px; }
.sd-step p { font-size: 14px; color: #54606E; line-height: 1.6; }

.sd-step-arrow {
	display: flex;
	align-items: center;
	padding-top: 14px;
}
.sd-step-arrow svg { width: 24px; height: 24px; }

/* --- FEATURES (Perche sceglierci) --- */
.sd-features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px;
}

.sd-feature {
	text-align: center;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.5s ease;
}
.sd-feature.sd-visible { opacity: 1; transform: translateY(0); }

.sd-feature-icon {
	width: 60px;
	height: 60px;
	margin: 0 auto 16px;
	color: #25ADDA;
}
.sd-feature-icon svg { width: 36px; height: 36px; }

.sd-feature h4 { font-size: 18px; color: #fff; margin-bottom: 10px; }
.sd-feature p { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.6; }

/* --- CTA --- */
.sd-section-cta {
	background: linear-gradient(135deg, #2795DE, #25ADDA, #4577C0);
	text-align: center;
	padding: 80px 0;
}
.sd-cta-content h2 { color: #fff; font-size: 36px; margin-bottom: 16px; }
.sd-cta-content p { color: rgba(255,255,255,0.9); font-size: 18px; margin-bottom: 36px; }

/* --- FOOTER --- */
.sd-footer {
	background: #0C0C0D;
	color: rgba(255,255,255,0.6);
	padding: 60px 0 0;
}

.sd-footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.5fr;
	gap: 40px;
	margin-bottom: 40px;
}

.sd-logo-footer .sd-logo-title { color: #fff; }
.sd-logo-footer .sd-logo-subtitle { color: #25ADDA; }
.sd-footer-brand p {
	margin-top: 16px;
	font-size: 14px;
	line-height: 1.7;
}

.sd-footer-links h4,
.sd-footer-contact h4 {
	color: #fff;
	font-size: 16px;
	margin-bottom: 16px;
}
.sd-footer-links ul { list-style: none; }
.sd-footer-links ul li { margin-bottom: 8px; }
.sd-footer-links ul li a {
	color: rgba(255,255,255,0.6);
	font-size: 14px;
	transition: color 0.3s;
}
.sd-footer-links ul li a:hover { color: #25ADDA; }

.sd-footer-contact p {
	font-size: 14px;
	margin-bottom: 4px;
}

.sd-social {
	display: flex;
	gap: 12px;
	margin-top: 16px;
}
.sd-social a {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255,255,255,0.08);
	color: rgba(255,255,255,0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s;
}
.sd-social a:hover { background: #2795DE; color: #fff; }
.sd-social a svg { width: 18px; height: 18px; }

.sd-footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.08);
	padding: 20px 0;
	text-align: center;
	font-size: 13px;
}
.sd-footer-bottom a { color: rgba(255,255,255,0.5); }
.sd-footer-bottom a:hover { color: #25ADDA; }

/* --- PAGE CONTENT (pagine interne) --- */
.sd-page-content {
	min-height: 60vh;
	padding: 120px 0 60px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1139px) {
	.sd-hero h1 { font-size: 42px; }
	.sd-cards-grid, .sd-roles-grid, .sd-features-grid { grid-template-columns: repeat(2, 1fr); }
	.sd-footer-grid { grid-template-columns: 1fr 1fr; }
	.sd-split { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
	.sd-nav { display: none; }
	.sd-nav.open {
		display: flex;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		padding: 20px;
		box-shadow: 0 10px 30px rgba(0,0,0,0.1);
		z-index: 100;
	}
	.sd-nav.open ul { flex-direction: column; }
	.sd-hamburger { display: flex; }

	.sd-hero { min-height: 80vh; padding: 100px 16px 60px; }
	.sd-hero h1 { font-size: 30px; }
	.sd-hero-desc { font-size: 16px; }
	.sd-hero-stats { gap: 24px; }
	.sd-stat-num { font-size: 32px; }

	.sd-section { padding: 60px 0; }
	.sd-section-header h2 { font-size: 28px; }

	.sd-cards-grid, .sd-roles-grid, .sd-features-grid { grid-template-columns: 1fr; }
	.sd-footer-grid { grid-template-columns: 1fr; }
	.sd-steps { flex-direction: column; align-items: center; }
	.sd-step-arrow { display: none; }
	.sd-step { max-width: 100%; }

	.sd-ai-visual { width: 260px; height: 260px; }
}

@media (max-width: 480px) {
	.sd-hero h1 { font-size: 26px; }
	.sd-hero-buttons { flex-direction: column; align-items: center; }
	.sd-btn-lg { width: 100%; text-align: center; }
	.sd-logo-title { font-size: 16px; }
	.sd-logo-subtitle { font-size: 11px; }
}

/* Joomla default overrides */
.com-content-article,
.com-content-category,
.blog-items { max-width: 100%; }
#system-message-container { margin-bottom: 20px; }

/* ═══════════════════════════════════════
   O-CMS compatibility overrides
   ═══════════════════════════════════════ */

:root {
    --primary: #2795DE;
    --primary-dark: #1d7bc0;
    --primary-light: #25ADDA;
    --secondary: #25ADDA;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: rgba(0,0,0,0.08);
    --radius: 12px;
}

/* Inner page shell (for page.php, article.php, blog.php, search.php) */
.site-main { min-height: 60vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-content { padding: 120px 0 80px; }
.page-content h1 { font-family: 'Nunito', sans-serif; font-size: 2.4rem; font-weight: 800; color: #1e293b; margin-bottom: 24px; }
.page-content .content { font-family: 'Roboto', sans-serif; font-size: 1.05rem; line-height: 1.8; color: #334155; }
.page-content .content p { margin-bottom: 18px; }
.page-content .content h2 { font-family: 'Nunito', sans-serif; font-size: 1.6rem; margin: 32px 0 16px; color: #2795DE; }
.page-content .content h3 { font-family: 'Nunito', sans-serif; font-size: 1.25rem; margin: 24px 0 12px; }
.page-content .content a { color: #2795DE; text-decoration: none; border-bottom: 1px solid rgba(39,149,222,0.3); }
.page-content .content a:hover { color: #1d7bc0; border-bottom-color: #2795DE; }

/* Blog / articles grid used by blog.php + featured section */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin: 32px 0; }
.article-card { background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 14px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(39,149,222,0.12); }
.article-cover { width: 100%; height: 180px; background-size: cover; background-position: center; }
.article-body { padding: 20px; }
.article-cat { display: inline-block; font-size: 0.72rem; font-weight: 700; color: #2795DE; text-transform: uppercase; letter-spacing: 0.5px; background: rgba(39,149,222,0.1); padding: 3px 10px; border-radius: 6px; margin-bottom: 10px; }
.article-card h2 { font-family: 'Nunito', sans-serif; font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.article-card h2 a { color: #1e293b; text-decoration: none; }
.article-card h2 a:hover { color: #2795DE; }
.article-card p { font-size: 0.9rem; color: #64748b; margin-bottom: 14px; line-height: 1.6; }
.article-meta { font-size: 0.8rem; color: #94a3b8; }

/* Hero for inner pages */
.hero { padding: 120px 0 40px; background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%); }
.hero h1 { font-family: 'Nunito', sans-serif; font-size: 2.6rem; font-weight: 800; color: #1e293b; }

/* Primary button shim */
.btn-primary { display: inline-block; padding: 12px 28px; background: linear-gradient(135deg, #2795DE, #25ADDA); color: #fff; text-decoration: none; border-radius: 8px; font-weight: 700; border: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(39,149,222,0.35); color: #fff; }

/* Search page */
.search-page { padding: 120px 0 80px; }
.search-form-big input { width:100%; padding:18px 20px 18px 52px; background:#fff; border:1px solid rgba(0,0,0,0.1); border-radius:14px; color:#1e293b; font-size:1.15rem; font-family:inherit; outline:none; }
.search-form-big input:focus { border-color:#2795DE; box-shadow:0 0 0 3px rgba(39,149,222,0.15); }
.search-form-big { position:relative; margin-bottom:40px; }
.search-form-big .icon { position:absolute; left:18px; top:50%; transform:translateY(-50%); opacity:0.4; font-size:1.2rem; }
.search-stats { color:#64748b; margin-bottom:24px; font-size:0.95rem; }
.search-result { display:block; padding:24px; background:#fff; border:1px solid rgba(0,0,0,0.08); border-radius:14px; margin-bottom:14px; text-decoration:none; color:#1e293b; transition:border-color 0.2s, transform 0.15s, box-shadow 0.15s; }
.search-result:hover { border-color:rgba(39,149,222,0.4); transform:translateY(-2px); box-shadow:0 8px 24px rgba(39,149,222,0.12); color:#1e293b; }
.search-result .type-badge { display:inline-block; padding:3px 10px; border-radius:6px; font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; background:rgba(39,149,222,0.1); color:#2795DE; margin-bottom:10px; }
.search-result h2 { font-size:1.15rem; font-weight:700; margin-bottom:8px; line-height:1.4; }
.search-result h2 mark, .search-result .snippet mark { background:rgba(39,149,222,0.2); color:#2795DE; border-radius:3px; padding:1px 3px; }
.search-result .snippet { font-size:0.9rem; color:#64748b; line-height:1.6; }
.search-result .date { font-size:0.8rem; color:#94a3b8; margin-top:10px; }
.search-empty { text-align:center; padding:80px 0; }
.search-empty .icon { font-size:3rem; opacity:0.15; margin-bottom:16px; }

/* Admin link in header (2026-04-15) */
.sd-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    margin-right: 8px;
    transition: all 0.15s;
}
.sd-btn-ghost:hover {
    color: #2795DE;
    border-color: #2795DE;
    background: #f0f9ff;
}

/* Dropdown "Libri" (2026-04-15) */
.sd-menu .sd-has-children {
    position: relative;
}
.sd-menu .sd-has-children > a {
    cursor: default;
}
.sd-submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    list-style: none;
    padding: 8px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s ease;
    z-index: 1000;
}
.sd-menu .sd-has-children:hover > .sd-submenu,
.sd-menu .sd-has-children:focus-within > .sd-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.sd-submenu li {
    list-style: none;
}
.sd-submenu a {
    display: block;
    padding: 10px 14px;
    border-radius: 6px;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.12s;
}
.sd-submenu a:hover {
    background: #f0f9ff;
    color: #2795DE;
}
