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

:root {
  --accent:   #f37262;
  --primary:  #0366d6;
  --dark:     #14171c;
  --light-bg: #ededed;
  --text:     #393939;
  --white:    #ffffff;
  --font:     Arial, Helvetica, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(28px, 5vw, 42px); }
h2 { font-size: clamp(22px, 3.5vw, 32px); margin-bottom: .6em; }
h3 { font-size: 20px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───────────── HEADER / NAV ───────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 1px 1px 5px #88888855;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #006db6;
  text-decoration: none;
}

.site-header .logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-weight: 600;
  font-size: .95em;
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}

.nav-links a:hover { color: var(--primary); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .3s;
}

/* ───────────── HERO / COVER ───────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-bottom: 80px;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 30, 30, .45);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 10%;
  width: 100%;
}

.hero-label {
  display: block;
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: .1em;
  font-style: normal;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.hero-typed {
  display: block;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  color: var(--white);
  min-height: 1.3em;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  margin-bottom: .7em;
}

.hero-typed .cursor {
  display: inline-block;
  width: 3px;
  background: var(--white);
  animation: blink .75s step-start infinite;
  vertical-align: text-bottom;
  height: 1.1em;
  margin-left: 3px;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-deadline {
  font-weight: 700;
  color: var(--white);
  background: rgba(0,0,0,.3);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: .95em;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  text-decoration: none;
  border: none;
}

.btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }

.btn-light {
  background: var(--light-bg);
  color: var(--text);
}

.btn-coral {
  background: var(--accent);
  color: var(--white);
}

/* ───────────── SECTION: INFO ───────────── */
.section-info {
  padding: 72px 0 48px;
}

/* ───────────── STATS COUNTERS ───────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 36px 0;
}

.stat-card {
  text-align: center;
  padding: 20px 12px;
  border-radius: 6px;
  background: #fafafa;
  border-bottom: 4px solid var(--accent);
  transition: box-shadow .2s;
}

.stat-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); }

.stat-icon {
  font-size: 30px;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.stat-value {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

/* ───────────── PARTNER LOGOS ───────────── */
.partners {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  padding: 32px 0;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  margin: 32px 0;
}

.partners a { display: flex; align-items: center; }

.partners img {
  height: 60px;
  width: auto;
  filter: grayscale(20%);
  transition: filter .2s;
}

.partners img:hover { filter: grayscale(0%); }

/* ───────────── TARGET & SKILLS ───────────── */
.section-target { padding: 16px 0 40px; }

.section-target ul {
  list-style: none;
  margin-top: 12px;
}

.section-target ul li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  font-size: .97em;
}

.section-target ul li::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ───────────── SECTION: PROGRAMMA ───────────── */
.section-programma {
  position: relative;
  min-height: 60vh;
  padding: 80px 0;
  background:
    linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)),
    url(TIAGo-Pro-front-1-scaled.png) top right / cover no-repeat;
  color: var(--white);
}

.section-programma h2,
.section-programma p { color: var(--white); }

.section-programma h2 { margin-bottom: .4em; }
.section-programma > .container > p { margin-bottom: 32px; opacity: .9; }

/* ───────────── ACCORDION ───────────── */
.accordion { list-style: none; margin: 0; }

.accordion-item { margin-bottom: 6px; }

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--white);
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  user-select: none;
  font-weight: 600;
  font-size: .97em;
  transition: background .2s;
}

.accordion-header:hover { background: #d95f50; }
.accordion-header .acc-icon { font-size: 13px; flex-shrink: 0; margin-left: 12px; }

.accordion-body {
  display: none;
  padding: 18px 20px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 4px 4px;
  font-size: .94em;
  line-height: 1.7;
}

.accordion-body.open { display: block; }


/* ───────────── SEZIONE CALENDARIO ───────────── */
.section-calendario {
  padding: 72px 0 56px;
  background: #fafafa;
}
 
/* ── Timeline ── */
.cal-timeline-wrap {
  width: 100%;
}
 
.cal-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
 
.cal-tl-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
 
.cal-tl-label {
  width: 130px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
 
.cal-tl-track {
  flex: 1;
  position: relative;
  height: 28px;
  background: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}
 
.cal-tl-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .2s;
}
.cal-tl-bar:hover { opacity: .85; }
 
.cal-tl-bar span { overflow: hidden; text-overflow: ellipsis; }
 
.cal-blue   { background: #a8c8f0; color: #0a3d6b; }
.cal-coral  { background: var(--accent); color: #fff; }
.cal-orange { background: #f5b97e; color: #7a3a00; }
.cal-green  { background: #7dc87a; color: #1a4d18; }
 
/* mese labels sotto la track */
.cal-months {
  display: flex;
  justify-content: space-between;
  padding: 6px 0 0 142px;
  font-size: 11px;
  color: #888;
  letter-spacing: .03em;
}
 
/* ── Fasi verticali ── */
.cal-phases {
  list-style: none;
  position: relative;
  padding-left: 0;
}
 
/* linea verticale continua */
.cal-phases::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, #a8c8f0, var(--accent), #f5b97e, #7dc87a);
  border-radius: 2px;
}
 
.cal-phase {
  display: flex;
  gap: 20px;
  padding: 0 0 28px 0;
  position: relative;
}
 
.cal-phase:last-child { padding-bottom: 0; }
 
.cal-phase-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  z-index: 1;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px currentColor;
}
 
.cal-phase--blue  .cal-phase-dot { background: #a8c8f0; color: #a8c8f0; }
.cal-phase--coral .cal-phase-dot { background: var(--accent); color: var(--accent); }
.cal-phase--orange .cal-phase-dot { background: #f5b97e; color: #f5b97e; }
.cal-phase--green .cal-phase-dot { background: #7dc87a; color: #7dc87a; }
 
.cal-phase-content {
  flex: 1;
  padding: 14px 18px;
  background: var(--white);
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  font-size: .94em;
}
 
.cal-phase-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
 
.cal-phase-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
}
 
.cal-phase-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f0f0f0;
  color: #555;
  white-space: nowrap;
}
 
.cal-phase-badge--green {
  background: #d4f0d3;
  color: #1a5c18;
}
 
/* ── Responsive ── */
@media (max-width: 600px) {
  .cal-tl-label { width: 90px; font-size: 11px; }
  .cal-months   { padding-left: 102px; }
  .cal-tl-bar   { font-size: 10px; padding: 0 4px; }
  .cal-phase-header { flex-direction: column; align-items: flex-start; }
}

/* ───────────── SECTION: ISCRIZIONI ───────────── */

.contact-box {
  margin-top: 32px;
  padding: 20px 24px;
  background: #fff8f7;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  font-size: .95em;
  color: var(--dark); 
}

/* ───────────── FOOTER BAND ───────────── */
.footer-band {
  background: var(--accent);
  height: 80px;
}

.site-footer {
  background: #000;
  color: #aaa;
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

.site-footer a { color: #ccc; }

/* ───────────── SCROLL TO TOP ───────────── */
#scroll-top {
  position: fixed;
  right: 24px; bottom: 28px;
  width: 42px; height: 42px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 999;
  transition: opacity .3s;
}

#scroll-top.visible { display: flex; }
#scroll-top:hover { background: #d95f50; }

/* ───────────── HELPERS ───────────── */
.mark-coral { color: var(--accent); }

.section-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 0;
}

/* ───────────── RESPONSIVE ───────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    padding: 16px 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero-content { padding: 0 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .partners { gap: 32px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-bottom: 40px; }
}
