/* =====================================
   1) RESET E FONT
===================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #f9f9f9;
  color: #333;
}
ul, li {
  list-style: none;
}

/* =====================================
   2) NAVBAR GLASSMORPHISM
===================================== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.6);
  z-index: 999;
}
.nav-left {
  display: flex;
  align-items: center;
}
.logo {
  height: 40px;
  margin-right: 10px;
}
.site-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #333;
}
.nav-right {
  display: flex;
  align-items: center;
}
.nav-right li {
  margin-left: 20px;
}
.nav-right li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-right li a:hover {
  color: #0ac877;
}
.btn-cta {
  padding: 0.5rem 1rem;
  background-color: #0ac877;
  color: #fff !important;
  border-radius: 5px;
  font-weight: 600;
  transition: background 0.3s, box-shadow 0.3s;
}
.btn-cta:hover {
  background-color: #06b067;
  box-shadow: 0 0 8px rgba(10, 200, 119, 0.8);
}
.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 20px;
}

/* =====================================
   3) HERO SECTION
===================================== */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
#heroVideo {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
#heroCanvas {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}
/* L'overlay copre tutto lo spazio hero */
.hero-overlay {
  position: absolute; 
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex; 
  align-items: center; 
  justify-content: center;
}

/* a) Striscia a tutta larghezza (hero-bar) */
.hero-bar {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero-bar .hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 10px;
}
.hero-bar .hero-title span {
  color: #0ac877 !important;
  text-shadow: 0 0 8px rgba(10, 200, 119, 0.7);
}
.hero-bar .hero-subtitle {
  font-size: 1rem;
  color: #eee;
  margin-bottom: 15px;
}
.hero-bar .btn-hero {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #0ac877;
  color: #fff;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.3s;
}
.hero-bar .btn-hero:hover {
  box-shadow: 0 0 15px rgba(10, 200, 119, 0.7);
  transform: translateY(-2px);
}

/* b) (Opzionale) Riquadro "hero-textbox" */
.hero-textbox {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: inline-block;
  text-align: center;
}
.hero-textbox .hero-title {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 10px;
}
.hero-textbox .hero-subtitle {
  font-size: 1rem;
  color: #eee;
  margin-bottom: 15px;
}
.hero-textbox .btn-hero {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
}

/* =====================================
   4) SEZIONE CORSI (Home Page)
===================================== */
.section-corsi {
  padding: 80px 20px;
  background: #fff;
  text-align: center;
  min-height: 60vh;
}
.section-corsi h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  color: #0ac877;
  margin-bottom: 10px;
}
.corsi-intro {
  font-size: 1rem;
  color: #555;
  margin-bottom: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.corsi-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch; /* assicura l'allineamento in altezza delle card */
}
.corso-card {
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;            /* colonna flessibile */
  flex-direction: column;
  height: 100%;             /* riempi la traccia della grid */
}
.corso-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

/* Immagini: niente tagli, proporzioni naturali */
.corso-card img {
  width: 100%;
  height: auto;             /* mantiene rapporto originale */
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

/* Titolo e testo */
.corso-card h3 {
  margin-bottom: 10px;
  color: #0ac877;
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
}
.corso-card p {
  color: #555;
  margin-bottom: 15px;
  font-size: 0.95rem;
  flex: 1 1 auto;           /* spinge il bottone in basso */
}

/* (Desktop) armonizza altezze testo per allineare i bottoni */
@media (min-width: 768px) {
  .corso-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;  /* mostra fino a 3 righe */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.btn-green {
  display: inline-block;
  background-color: #0ac877;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
  margin-top: auto;         /* ancora il bottone al fondo della card */
}
.btn-green:hover {
  background-color: #06b067;
  box-shadow: 0 0 10px rgba(10, 200, 119, 0.6);
}

/* =====================================
   5) SEZIONE CONTATTI / FOOTER
===================================== */
.section-contatti {
  padding: 80px 20px;
  text-align: center;
  background: #f9f9f9;
}
.section-contatti h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  color: #0ac877;
  margin-bottom: 20px;
}
.section-contatti p {
  max-width: 600px;
  margin: 0 auto 30px;
  color: #555;
}
.footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px 10px;
  font-size: 0.9rem;
}

/* =====================================
   6) RESPONSIVE DESIGN
===================================== */
@media (max-width: 768px) {
  .nav-right {
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 1rem;
    border-radius: 10px;
    display: none;
  }
  .nav-right li {
    margin: 10px 0;
  }
  .hamburger {
    display: block;
  }
  .nav-right.open {
    display: flex;
  }
  #hero {
    height: 80vh;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
}

/* =====================================
   7) STILI SPECIFICI PER KNX BASIC
===================================== */
.section {
  padding: 80px 20px;
}
.section.alt {
  background: #f0f2f5;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Check-list classica */
.check-list {
  text-align: left;
  margin-top: 20px;
  list-style: none;
  line-height: 1.5;
}
.check-list li {
  padding-left: 25px;
  position: relative;
}
.check-list li::before {
  content: '✅';
  position: absolute;
  left: 0;
}

/* Informazioni prezzo e posti */
.course-info {
  margin-top: 20px;
  text-align: center;
}
.course-info .price {
  font-weight: 600;
  margin-bottom: 5px;
}
.course-info .price span {
  color: #e64c3c;
}
.course-info .seats {
  color: #e64c3c;
  font-weight: bold;
}

/* Box generico */
.box {
  background: #ffffff;
  padding: 20px 25px;
  margin: 20px 0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

/* Program-day (riquadro) */
.program-day {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  padding: 20px;
  margin-bottom: 20px;
}
.program-day h3 {
  margin-bottom: 15px;
  color: #0ac877;
}
.session {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-left: 4px solid #0ac877;
  background: #f9f9f9;
  border-radius: 4px;
}

/* Certificati (img) */
.certificati {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  justify-content: center;
}
.certificati img {
  max-height: 80px;
  object-fit: contain;
}

/* FAQ (accordion) */
.faq-item {
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
}
.faq-question {
  cursor: pointer;
  font-weight: 600;
  background: #f2f2f2;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 5px;
}
.faq-answer {
  display: none;
  background: #ffffff;
  margin-top: 5px;
  border-left: 4px solid #0ac877;
  padding: 10px;
  border-radius: 5px;
}
.faq-item.open .faq-answer {
  display: block;
}

/* Sezione signup */
#signup .container {
  background: rgba(255,255,255,0.95);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#signup h2 {
  color: #4CAF50;
}
#signup form {
  max-width: 500px;
  margin: 20px auto 0;
  text-align: left;
}
#signup .form-group {
  margin-bottom: 15px;
}
#signup label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
#signup input, 
#signup textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
#signup button {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 5px;
  background: #4CAF50;
  color: #fff;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s;
}
#signup button:hover {
  background: #43a047;
}
.small-note {
  font-size: 0.9em;
  margin-top: 10px;
  opacity: 0.8;
}

/* =====================================
   8) DATE CORSO SECTION (opzionale)
===================================== */
.date-corso-section {
  background: #ffffff;
  padding-top: 60px;
  padding-bottom: 60px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.date-corso-box {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.date-corso-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  color: #0ac877;
  margin-bottom: 30px;
}
.date-corso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 20px;
}
.date-corso-item {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}
.date-corso-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.08);
}
.date-corso-item h3 {
  color: #0ac877;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.date-corso-dates {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.date-corso-dates small {
  font-weight: normal;
  font-size: 0.9rem;
  opacity: 0.7;
}
.date-corso-item p {
  color: #555;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .date-corso-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================
   9) DETTAGLI CORSO - 2 COLONNE
===================================== */
.dettagli-corso-box {
  background: #fff;
  padding: 40px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-align: left;
  margin-bottom: 40px;
}
.dettagli-title {
  text-align: center;
  color: #0ac877;
  margin-bottom: 20px;
  font-size: 1.8rem;
}
.dettagli-intro {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}
.dettagli-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  align-items: flex-start;
}
.dettagli-col {}

/* Riquadro Prezzo */
.dettagli-price-box {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  align-self: flex-start;
}
.price-label {
  font-weight: 600;
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.price-value {
  font-size: 1.8rem;
  color: #e64c3c;
  font-weight: 700;
  margin-bottom: 10px;
}
.seats {
  color: #e64c3c;
  font-weight: bold;
  margin-top: 10px;
  font-size: 1.1rem;
}
.seats del {
  color: #999;
  margin-right: 5px;
}

/* Modern List */
.modern-list {
  margin-top: 15px;
}
.modern-item {
  background: #f9f9f9;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  border-left: 4px solid #0ac877;
  transition: background 0.3s;
}
.modern-item:hover {
  background: #eefcf4;
}

/* Responsive dettagli */
@media (max-width: 768px) {
  .dettagli-grid {
    grid-template-columns: 1fr;
  }
  .dettagli-price-box {
    margin-top: 20px;
  }
}

/* =====================================
   10) TABS INTERATTIVI PER PROGRAMMA
===================================== */
.days-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
  justify-content: center;
}
.day-tab {
  background: #f9f9f9;
  color: #333;
  border: 2px solid #0ac877;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
.day-tab:hover {
  background: #0ac877;
  color: #fff;
}
.day-tab.active {
  background: #0ac877;
  color: #fff;
}
.days-content {
  display: none;
  margin-top: 20px;
}
.days-content.active {
  display: block;
}
.days-content .session {
  background: #fff;
  border-left: 4px solid #0ac877;
  border-radius: 4px;
  padding: 10px 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.days-content .session p {
  margin-bottom: 5px;
  font-weight: 600;
}
.days-content .session ul {
  margin-left: 20px;
  list-style: disc;
  margin-bottom: 5px;
}

/* =====================================
   11) MARGINE SPECIFICO H4
===================================== */
.spazi-h4 {
  margin: 20px 0;
}
/* =====================================
   EGE HIGHLIGHT (centrato)
===================================== */
.ege-highlight {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #007a33;
  margin: 15px 0;
}
.ege-highlight .ege-sub {
  color: #000;
  font-weight: 600;
}
/* =====================================
   12) SIGNUP: centratura contenuti
===================================== */
.center { text-align: center; }

#signup .container { text-align: center; }

/* Rende il bottone non a tutta larghezza e lo centra */
#signup .btn-cta {
  width: auto;                 /* override del 100% */
  display: inline-block;       /* per centrarlo col text-align */
  padding: 12px 24px;          /* dimensione pulita */
  margin: 10px auto 0;         /* centrato */
}

/* Mobile: su schermi piccoli torna full-width per usabilità */
@media (max-width: 480px) {
  #signup .btn-cta {
    width: 100%;
    display: block;
  }
}
