/* ===== RESET & BASE ===== */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,700;1,400&family=Arimo:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #1a6b72;
  --teal-light: #2a8a94;
  --teal-pale: #e8f4f5;
  --teal-mid: #d0eaed;
  --gold: #c9a84c;
  --text-dark: #1c1917;
  --text-mid: #4a5568;
  --text-light: #718096;
  --white: #ffffff;
  --bg-page: #f0ebe3;
  --text-primary: #1c1917;
  --bg: #f0ebe3;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(26,107,114,0.08);
  --shadow-md: 0 8px 32px rgba(26,107,114,0.14);
  --shadow-lg: 0 20px 60px rgba(26,107,114,0.18);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Arimo', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 5%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-logo {
  font-family: 'Merriweather', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--gold); }

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  text-decoration: none; color: var(--text-mid);
  font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.3px;
  transition: var(--transition);
}

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

.nav-cta {
  background: var(--teal); color: var(--white) !important;
  padding: 0.55rem 1.4rem; border-radius: 50px;
  transition: var(--transition) !important;
}

.nav-cta:hover { background: var(--teal-light) !important; box-shadow: var(--shadow-sm); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--teal); margin: 5px 0; transition: var(--transition); border-radius: 2px; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 7rem 5% 5rem;
  background: linear-gradient(135deg, #f0ebe3 0%, var(--teal-pale) 60%, var(--teal-mid) 100%);
  position: relative; overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: -30%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26,107,114,0.12) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute; bottom: -20%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

.hero-content {
  max-width: 680px;
  position: relative; z-index: 1;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--teal-pale);
  border: 1px solid var(--teal-mid);
  color: var(--teal); font-size: 0.8rem; font-weight: 600;
  padding: 0.4rem 1rem; border-radius: 50px;
  letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-badge::before { content: '✦'; font-size: 0.65rem; }

.hero h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700; line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero h1 em {
  font-style: italic; color: var(--teal);
  font-family: 'Merriweather', serif;
}

.hero p {
  font-size: 1.1rem; color: var(--text-mid);
  max-width: 520px; margin-bottom: 2.5rem;
  font-weight: 400; line-height: 1.8;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: var(--white); text-decoration: none;
  padding: 1rem 2.2rem; border-radius: 50px;
  font-size: 1rem; font-weight: 600;
  box-shadow: 0 4px 20px rgba(26,107,114,0.35);
  transition: var(--transition); border: none; cursor: pointer;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(26,107,114,0.45); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--teal); text-decoration: none;
  padding: 1rem 2rem; border-radius: 50px;
  font-size: 1rem; font-weight: 600;
  border: 2px solid var(--teal);
  transition: var(--transition); background: transparent; cursor: pointer;
}

.btn-secondary:hover { background: var(--teal); color: var(--white); }

.hero-stats {
  display: flex; gap: 2.5rem; margin-top: 3.5rem;
  padding-top: 2rem; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat-item { text-align: left; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--teal); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-light); font-weight: 500; margin-top: 0.2rem; letter-spacing: 0.3px; }

/* ===== SECTIONS ===== */
section { padding: 6rem 5%; }

.section-label {
  display: inline-block; color: var(--teal);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.25;
  color: var(--text-dark); letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem; color: var(--text-mid);
  max-width: 560px; line-height: 1.8;
}

.section-header { margin-bottom: 3.5rem; }

/* ===== CORSI ===== */
.corsi { background: var(--white); }

.corsi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.corso-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  transition: var(--transition);
  position: relative; overflow: hidden;
  cursor: pointer;
}

.corso-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: var(--transition);
}

.corso-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--teal-mid); }
.corso-card:hover::before { transform: scaleX(1); }

.corso-icon {
  width: 60px; height: 60px;
  background: var(--teal-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 1.5rem;
}

.corso-tag {
  display: inline-block;
  background: var(--teal-pale); color: var(--teal);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 50px;
  margin-bottom: 1rem;
}

.corso-card h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 0.8rem;
  line-height: 1.3;
}

.corso-card p { font-size: 0.92rem; color: var(--text-mid); line-height: 1.7; margin-bottom: 1.5rem; }

.corso-meta {
  display: flex; gap: 1.2rem;
  font-size: 0.8rem; color: var(--text-light);
  font-weight: 500; flex-wrap: wrap;
}

.corso-meta span { display: flex; align-items: center; gap: 0.3rem; }

.corso-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--teal); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; margin-top: 1.5rem;
  transition: var(--transition);
}

.corso-link:hover { gap: 0.8rem; }

/* ===== CHI SONO ===== */
.chi-sono { background: linear-gradient(135deg, var(--teal-pale) 0%, #fff 60%); }

.chi-sono-grid {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  grid-template-columns: none !important;
}

.chi-sono-text {
  max-width: 850px !important;
  margin: 0 auto !important;
  text-align: center !important;
  flex: 1;
}

.chi-sono-text .section-label,
.chi-sono-text .section-title,
.chi-sono-text .section-subtitle,
.chi-sono-text p {
  text-align: center !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.chi-sono-text .values-list {
  display: inline-block !important;
  text-align: left !important;
  max-width: 580px;
  margin-top: 0;
}

.chi-sono-text .certifications {
  justify-content: center !important;
}

.chi-sono-text > div[style] {
  display: flex !important;
  justify-content: center !important;
}

.values-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }

.values-list li {
  display: flex; align-items: flex-start; gap: 1rem;
  font-size: 0.95rem; color: var(--text-mid);
}

.value-check {
  width: 22px; height: 22px; min-width: 22px;
  background: var(--teal); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.7rem; margin-top: 2px;
}

.certifications {
  display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem;
}

.cert-chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px; padding: 0.5rem 1.1rem;
  font-size: 0.78rem; font-weight: 600; color: var(--text-mid);
  display: flex; align-items: center; gap: 0.4rem;
}

/* ===== FORM ===== */
.contatti { background: var(--white); }

.pdf-section {
  background: linear-gradient(160deg, var(--teal-pale) 0%, var(--bg-page) 60%);
}

.form-wrapper {
  max-width: 620px; margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px; padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-intro {
  text-align: center; margin-bottom: 2.5rem;
}

.form-intro .pdf-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: white; padding: 0.6rem 1.4rem; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.2rem;
}

.form-intro h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.9rem; color: var(--text-dark); margin-bottom: 0.8rem;
}

.form-intro p { font-size: 0.95rem; color: var(--text-mid); }

.form-group { margin-bottom: 1.4rem; }

.form-group label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-dark); margin-bottom: 0.5rem; letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Arimo', sans-serif;
  font-size: 0.95rem; color: var(--text-dark);
  background: var(--white);
  transition: var(--transition); outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,107,114,0.12);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.privacy-note {
  font-size: 0.78rem; color: var(--text-light); text-align: center; margin-top: 1.2rem;
}

.privacy-note a { color: var(--teal); text-decoration: none; }

/* ===== GDPR CHECKBOX ===== */
.gdpr-check {
  margin: 1.4rem 0 0.6rem;
}

.gdpr-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-mid);
  cursor: pointer;
  line-height: 1.6;
}

.gdpr-label input[type="checkbox"] {
  width: 18px; height: 18px; min-width: 18px;
  accent-color: var(--teal);
  margin-top: 2px;
  cursor: pointer;
}

.gdpr-label a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gdpr-label a:hover { opacity: 0.8; }

.btn-submit {
  width: 100%; padding: 1.1rem;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: var(--white); border: none; border-radius: 50px;
  font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 20px rgba(26,107,114,0.3);
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin-top: 0.5rem;
}

.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(26,107,114,0.45); }

/* ===== FOOTER ===== */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.6);
  text-align: center; padding: 2.5rem 5%;
  font-size: 0.85rem; line-height: 2;
}

footer strong { color: var(--white); }
footer a { color: var(--teal-light); text-decoration: none; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  nav { padding: 1rem 5%; }
  .nav-links { display: none; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 1rem 0; }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.7rem 5%; }
  .hamburger { display: block; }

  .hero { padding: 6rem 5% 4rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }

  .chi-sono-grid { max-width: 100%; }
  .avatar-wrapper { width: 100%; height: 260px; border-radius: 24px; }
  .avatar-placeholder { font-size: 5rem; }

  .form-row { grid-template-columns: 1fr; }
  .form-wrapper { padding: 2rem 1.5rem; }

  section { padding: 4rem 5%; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: fadeUp 0.7s ease both;
}
.hero-badge { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.2s; }
.hero p { animation-delay: 0.35s; }
.hero-actions { animation-delay: 0.5s; }
.hero-stats { animation-delay: 0.65s; }

/* ===== DARK MODE ===== */
body.dark {
  --bg-page: #0c0a09;
  --bg: #1a1714;
  --white: #1f1c1a;
  --text-primary: #f5f5f4;
  --text-dark: #f5f5f4;
  --text-mid: #d4cfc9;
  --text-light: #a39e99;
  --border: #2d2926;
  --teal-pale: #1a2e30;
  --teal-mid: #1d3538;
}

body.dark nav {
  background: rgba(12,10,9,0.92);
}

body.dark .hero {
  background: linear-gradient(135deg, #0c0a09 0%, #12201f 60%, #142325 100%);
}

body.dark .chi-sono {
  background: linear-gradient(135deg, #12201f 0%, #0c0a09 60%);
}

body.dark .corsi,
body.dark .contatti {
  background: var(--bg-page);
}

body.dark footer {
  background: #050403;
}

/* ===== NOISE GRAIN ===== */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 9999;
}

/* ===== DARK TOGGLE ===== */
.dark-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 38px; height: 38px;
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.dark-toggle:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
  transform: rotate(20deg);
}
