/* ================================================================
   Template single-corsi.php — Pagina percorso formativo
================================================================ */

:root {
	--sc-navy:      #1e3a5f;
	--sc-navy-dk:   #152a44;
	--sc-navy-lt:   #2c5282;
	--sc-orange:    #e67e22;
	--sc-orange-dk: #cd5500;
	--sc-orange-lt: #fff4e6;
	--sc-green:     #27ae60;
	--sc-green-dk:  #1e8449;
	--sc-blue:      #3498db;
	--sc-muted:     #666;
	--sc-border:    #e5e5e5;
	--sc-text:      #333;
	--sc-locked:    #bbb;
	--sc-bg:        #fafafa;
}

/* ── Utility ───────────────────────────────────────────────────── */
.sc-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.sc-hero {
	background: linear-gradient(135deg, var(--sc-navy) 0%, var(--sc-navy-lt) 100%);
	color: #fff;
	padding: 40px 0 30px;
	position: relative;
	overflow: hidden;
}
.sc-hero::before {
	content: '';
	position: absolute;
	top: -50px; right: -50px;
	width: 300px; height: 300px;
	background: var(--sc-orange);
	opacity: .08;
	border-radius: 50%;
}
.sc-hero::after {
	content: '';
	position: absolute;
	bottom: -80px; left: 10%;
	width: 200px; height: 200px;
	background: #fff;
	opacity: .04;
	border-radius: 50%;
}

.sc-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	text-decoration: none;
	font-size: 12px;
	opacity: .85;
	margin-bottom: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .8px;
}
.sc-back:hover { opacity: 1; color: #fff; }

.sc-category-badge {
	display: inline-block;
	background: var(--sc-orange);
	color: #fff;
	padding: 5px 14px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	margin-bottom: 14px;
	border-radius: 2px;
}

.sc-title {
	font-size: 34px;
	font-weight: 400;
	line-height: 1.2;
	margin-bottom: 14px;
	max-width: 800px;
	color: #fff;
}

.sc-subtitle {
	font-size: 15px;
	opacity: .9;
	max-width: 700px;
	margin-bottom: 20px;
}

/* Stats bar nel hero */
.sc-stats-bar {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
	padding-top: 20px;
	border-top: 1px solid rgba(255,255,255,.15);
	margin-top: 10px;
}
.sc-stat {
	display: flex;
	align-items: center;
	gap: 10px;
}
.sc-stat-icon {
	width: 38px; height: 38px;
	background: rgba(255,255,255,.12);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
}
.sc-stat-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: .75;
}
.sc-stat-value {
	font-size: 17px;
	font-weight: 700;
}
.sc-stat--expired .sc-stat-icon {
	background: rgba(220, 53, 69, .25);
}
.sc-stat--expired .sc-stat-value {
	color: #ff6b7a;
}

/* Messaggio corso scaduto */
.sc-expired-notice {
	text-align: center;
	padding: 60px 30px;
	background: #fff8f8;
	border: 1.5px solid #f5c6cb;
	border-radius: 12px;
	margin: 20px 0;
}
.sc-expired-icon {
	font-size: 48px;
	margin-bottom: 16px;
}
.sc-expired-title {
	font-size: 22px;
	font-weight: 700;
	color: #b01c2e;
	margin: 0 0 12px;
}
.sc-expired-text {
	font-size: 15px;
	color: #555;
	line-height: 1.6;
	margin: 0 0 24px;
}
.sc-expired-btn {
	display: inline-block;
	padding: 10px 24px;
	background: #b01c2e;
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	font-size: 14px;
}
.sc-expired-btn:hover {
	background: #8e1525;
	color: #fff;
}

/* ── Progress strip ────────────────────────────────────────────── */
.sc-progress-strip {
	background: #fff;
	border-top: 4px solid var(--sc-orange);
	padding: 18px 0;
	box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.sc-ps-inner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 25px;
}
.sc-ps-label {
	font-size: 15px;
	color: var(--sc-navy);
	font-weight: 700;
	white-space: nowrap;
}
.sc-ps-bar {
	flex: 1;
	height: 10px;
	background: #eee;
	border-radius: 5px;
	overflow: hidden;
}
.sc-ps-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--sc-orange), var(--sc-orange-dk));
	transition: width .4s;
}
.sc-ps-count {
	font-size: 13px;
	color: var(--sc-muted);
	white-space: nowrap;
}
.sc-ps-count strong { color: var(--sc-navy); font-size: 15px; }

/* ── Main layout ───────────────────────────────────────────────── */
.sc-main {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 30px;
	margin: 30px auto;
}

/* ── Content area ──────────────────────────────────────────────── */
.sc-content {
	background: #fff;
	border: 1px solid var(--sc-border);
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
	min-width: 0;
}

/* ── Intro ─────────────────────────────────────────────────────── */
.sc-intro {
	padding: 35px 40px;
}
.sc-eyebrow {
	font-size: 11px;
	color: var(--sc-orange);
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-weight: 700;
	margin-bottom: 8px;
}
.sc-course-content { color: var(--sc-text); line-height: 1.7; }
.sc-course-content h2 {
	font-size: 26px;
	color: var(--sc-navy);
	font-weight: 400;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--sc-navy);
	position: relative;
}
.sc-course-content h2::after {
	content: '';
	position: absolute;
	bottom: -2px; left: 0;
	width: 60px; height: 2px;
	background: var(--sc-orange);
}
.sc-course-content p { margin-bottom: 14px; }
.sc-course-content ul { margin: 16px 0; padding-left: 0; list-style: none; }
.sc-course-content ul li {
	padding: 8px 0 8px 28px;
	position: relative;
}
.sc-course-content ul li::before {
	content: '✓';
	position: absolute;
	left: 0; top: 7px;
	width: 20px; height: 20px;
	background: var(--sc-orange);
	color: #fff;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Sezione lezioni ───────────────────────────────────────────── */
.sc-lessons-section {
	padding: 10px 40px 40px;
}

.sc-section-heading {
	font-size: 22px;
	color: var(--sc-navy);
	font-weight: 400;
	margin: 25px 0 6px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--sc-navy);
	position: relative;
}
.sc-section-heading::after {
	content: '';
	position: absolute;
	bottom: -2px; left: 0;
	width: 60px; height: 2px;
	background: var(--sc-orange);
}
.sc-section-sub {
	color: var(--sc-muted);
	font-size: 13px;
	margin-bottom: 20px;
}
.sc-empty {
	padding: 20px;
	color: var(--sc-muted);
	font-style: italic;
}

/* ── Modulo ────────────────────────────────────────────────────── */
.sc-module {
	margin-top: 25px;
	border: 1px solid var(--sc-border);
	background: #fff;
}
.sc-module-header {
	background: #f5f7fa;
	border-left: 4px solid var(--sc-navy);
	padding: 14px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.sc-module-title {
	font-size: 17px;
	color: var(--sc-navy);
	font-weight: 700;
	margin: 0;
}
.sc-module-meta { font-size: 12px; color: var(--sc-muted); }

/* ── Riga lezione ──────────────────────────────────────────────── */
.sc-lesson {
	display: grid;
	grid-template-columns: 46px 1fr auto;
	gap: 16px;
	align-items: center;
	padding: 18px 20px;
	border-bottom: 1px solid var(--sc-border);
	transition: background .2s;
}
.sc-lesson:last-child { border-bottom: none; }
.sc-lesson:hover { background: #fafbfc; }

.sc-lesson--active {
	background: linear-gradient(90deg, rgba(230,126,34,.05), transparent);
	border-left: 3px solid var(--sc-orange);
	padding-left: 17px;
}
.sc-lesson--locked { opacity: .55; }

/* Icona cerchio */
.sc-lesson-icon {
	width: 46px; height: 46px;
	border-radius: 50%;
	background: var(--sc-orange);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all .2s;
}
.sc-lesson--completed .sc-lesson-icon { background: var(--sc-green); }
.sc-lesson--locked    .sc-lesson-icon { background: var(--sc-locked); }
/* Play triangle per lezioni nuove/attive */
.sc-lesson--new    .sc-lesson-icon::before,
.sc-lesson--active .sc-lesson-icon::before {
	content: '';
	width: 0; height: 0;
	border-left: 12px solid #fff;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	margin-left: 3px;
}

/* Testo lezione */
.sc-lesson-num {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	color: var(--sc-muted);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 2px;
	font-weight: 600;
}
.sc-lesson-title {
	font-size: 17px;
	color: var(--sc-orange-dk);
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 4px;
}
.sc-lesson-title a { color: inherit; text-decoration: none; }
.sc-lesson-title a:hover { color: var(--sc-navy); }
.sc-lesson--completed .sc-lesson-title,
.sc-lesson--completed .sc-lesson-title a { color: var(--sc-navy); }
.sc-lesson-title--locked { color: var(--sc-muted); }
.sc-lesson-desc { font-size: 12px; color: var(--sc-muted); }

/* Mini progress (inside body) */
.sc-lesson-mini { margin-top: 8px; max-width: 200px; }
.sc-lm-lbl {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--sc-muted);
	margin-bottom: 4px;
	font-weight: 600;
}
.sc-lm-lbl strong { color: var(--sc-orange-dk); }
.sc-lesson--completed .sc-lm-lbl strong { color: var(--sc-green); }
.sc-lm-bar {
	height: 5px;
	background: #eee;
	border-radius: 3px;
	overflow: hidden;
}
.sc-lm-fill {
	height: 100%;
	background: var(--sc-orange);
	border-radius: 3px;
}
.sc-lesson--completed .sc-lm-fill { background: var(--sc-green); }

/* Actions column: badge + CTA */
.sc-lesson-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
/* Badge stato */
.sc-lesson-status { text-align: center; }
.sc-badge {
	display: inline-block;
	padding: 2px 6px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .8px;
	border-radius: 3px;
	color: #fff;
}
.sc-badge--done     { background: var(--sc-green); }
.sc-badge--progress { background: var(--sc-orange-dk); }
.sc-badge--new      { background: var(--sc-blue); }
.sc-badge--locked   { background: #eee; color: var(--sc-muted); }

/* CTA lezione */
.sc-cta {
	display: inline-block;
	padding: 10px 16px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	border-radius: 3px;
	text-decoration: none;
	white-space: nowrap;
	transition: background .2s, color .2s;
}
.sc-cta--primary  { background: var(--sc-orange); color: #fff; }
.sc-cta--primary:hover { background: var(--sc-navy); color: #fff; }
.sc-cta--secondary { background: var(--sc-navy); color: #fff; }
.sc-cta--secondary:hover { background: var(--sc-orange); color: #fff; }
.sc-cta--disabled {
	background: #ddd;
	color: #aaa;
	cursor: default;
	pointer-events: none;
}

/* ── Box test finale ───────────────────────────────────────────── */
.sc-final-test {
	margin-top: 30px;
	padding: 28px;
	background: linear-gradient(135deg, #fff 0%, #f5f7fa 100%);
	border: 2px dashed var(--sc-navy);
	text-align: center;
}
.sc-ft--open   { border-color: var(--sc-orange); }
.sc-ft--done   { border-color: var(--sc-green); background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); }
.sc-ft--locked { opacity: .7; }

.sc-ft-icon { font-size: 42px; margin-bottom: 10px; }
.sc-ft-title {
	font-size: 22px;
	color: var(--sc-navy);
	font-weight: 400;
	margin-bottom: 8px;
}
.sc-ft-desc { color: var(--sc-muted); margin-bottom: 16px; font-size: 13px; }
.sc-ft-desc strong { color: var(--sc-text); }

.sc-ft-btn {
	display: inline-block;
	background: var(--sc-navy);
	color: #fff;
	padding: 12px 28px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	border-radius: 3px;
	transition: all .2s;
}
.sc-ft-btn:hover { background: var(--sc-orange); color: #fff; }
.sc-ft--open .sc-ft-btn { background: var(--sc-orange); }
.sc-ft--open .sc-ft-btn:hover { background: var(--sc-navy); }
.sc-ft-btn--done { background: var(--sc-green); }
.sc-ft-btn--done:hover { background: var(--sc-green-dk); }
.sc-ft-btn--disabled {
	background: #bbb;
	color: #fff;
	cursor: default;
	pointer-events: none;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sc-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: sticky;
	top: 20px;
	align-self: start;
}

.sc-widget {
	background: #fff;
	border: 1px solid var(--sc-border);
}
.sc-widget-title {
	font-size: 14px;
	color: #fff;
	background: var(--sc-orange);
	padding: 12px 16px;
	font-weight: 700;
	border-left: 4px solid var(--sc-navy);
	text-transform: uppercase;
	letter-spacing: .5px;
}
.sc-widget-body { padding: 0; }

/* Progress inline sidebar */
.sc-sw-progress {
	padding: 14px 16px;
	background: #fafafa;
	border-bottom: 1px solid var(--sc-border);
}
.sc-sw-lbl {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--sc-muted);
	margin-bottom: 6px;
	font-weight: 600;
}
.sc-sw-lbl strong { color: var(--sc-orange-dk); }
.sc-sw-bar {
	height: 6px;
	background: #eee;
	border-radius: 3px;
	overflow: hidden;
}
.sc-sw-fill {
	height: 100%;
	background: var(--sc-orange);
	transition: width .4s;
}

/* Lista lezioni sidebar */
.sc-sw-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.sc-swl-module {
	background: var(--sc-navy);
	color: #fff;
	padding: 6px 16px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
}
.sc-swl-item {
	border-bottom: 1px solid var(--sc-border);
}
.sc-swl-item:last-child { border-bottom: none; }
.sc-swl-item a,
.sc-swl-item > span {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	text-decoration: none;
	color: var(--sc-navy);
	font-size: 13px;
	transition: background .2s;
	line-height: 1.35;
}
.sc-swl-item a:hover { background: var(--sc-orange-lt); }
.sc-swl--done > a    { color: var(--sc-navy); font-weight: 600; }
.sc-swl--locked > span { color: var(--sc-muted); }
.sc-swl--quiz > a,
.sc-swl--quiz > span  { background: #fafafa; font-style: italic; }

.sc-swl-icon {
	width: 22px; height: 22px;
	border-radius: 50%;
	background: var(--sc-orange);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	flex-shrink: 0;
	margin-top: 1px;
}
.sc-swl--done  .sc-swl-icon { background: var(--sc-green); }
.sc-swl--locked .sc-swl-icon { background: var(--sc-locked); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 960px) {
	.sc-main { grid-template-columns: 1fr; }
	.sc-sidebar { position: static; }
	.sc-intro,
	.sc-lessons-section { padding: 25px 20px; }
	.sc-title { font-size: 26px; }
	.sc-stats-bar { gap: 15px; }
}
@media (max-width: 640px) {
	.sc-lesson { grid-template-columns: 46px 1fr; }
	.sc-lesson-actions { display: none; }
}
