/* CSS Document */

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

:root {
  --orange: #D14C37;
  --orange-dark: #B03D2A;
  --orange-light: #E06B57;
  --blue: #0f172a;
  --blue-2: #1e293b;
  --blue-3: #334155;
  --text: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.15);
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* ============ HEADER ============ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
header.scrolled {
  background: rgba(15, 23, 42, 0.97);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(209, 76, 55, 0.45);
  transition: var(--transition);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-text span { color: var(--orange); }

/* Menu */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
  position: relative;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--orange); background: rgba(209, 76, 55, 0.08); }

/* Link area personale */
.nav-links a.login {
  margin-left: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  padding: 10px 20px;
  box-shadow: 0 6px 18px rgba(209, 76, 55, 0.35);
}
.nav-links a.login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(209, 76, 55, 0.5);
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
}

/* Hamburger */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  position: relative;
  transition: var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,0.08); }
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  position: absolute;
  left: 10px;
  transition: var(--transition);
}
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background:
    radial-gradient(1000px 500px at 80% 10%, rgba(209, 76, 55, 0.25), transparent 60%),
    radial-gradient(800px 500px at 10% 90%, rgba(30, 64, 175, 0.35), transparent 60%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
  color: var(--white);
  overflow: hidden;
  padding-top: 90px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 60px 0;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(209, 76, 55, 0.15);
  border: 1px solid rgba(209, 76, 55, 0.4);
  color: var(--orange-light);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero-badge::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(209, 76, 55, 0.25);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--orange), var(--orange-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  box-shadow: 0 10px 25px rgba(209, 76, 55, 0.4);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(209, 76, 55, 0.55);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  border-color: var(--orange);
}

/* Card hero */
.hero-visual {
  display: grid;
  gap: 16px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card:hover {
  border-color: rgba(209, 76, 55, 0.5);
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.08);
}
.stat-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(209, 76, 55, 0.2), rgba(209, 76, 55, 0.05));
  border: 1px solid rgba(209, 76, 55, 0.3);
  flex-shrink: 0;
}
.stat-card h4 { font-size: 1.5rem; color: var(--orange-light); font-weight: 800; }
.stat-card p { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin: 0; }

/* ============ SEZIONI ============ */
section { padding: 100px 0; position: relative; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}
.section-tag {
  display: inline-block;
  color: var(--orange-dark);
  background: rgba(209, 76, 55, 0.12);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--blue);
  margin-bottom: 16px;
}
.section-head h2 span { color: var(--orange); }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ CHI SIAMO ============ */
#chi-siamo { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text h3 {
  font-size: 1.6rem;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 1.02rem; }
.about-list { display: grid; gap: 14px; margin-top: 26px; }
.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  color: var(--blue-3);
}
.check {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 900;
  margin-top: 2px;
}
.about-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  padding: 50px 40px;
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.about-visual::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209,76,55,0.5), transparent 70%);
  filter: blur(20px);
}
.about-visual::after {
  content: "";
  position: absolute;
  bottom: -50px; left: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.35), transparent 70%);
  filter: blur(20px);
}
.about-visual > * { position: relative; z-index: 2; }
.about-visual h4 {
  font-size: 1.35rem;
  margin-bottom: 20px;
  color: var(--orange-light);
}
.pillars { display: grid; gap: 18px; }
.pillar {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: var(--transition);
}
.pillar:hover {
  background: rgba(209, 76, 55, 0.12);
  border-color: rgba(209, 76, 55, 0.4);
  transform: translateX(6px);
}
.pillar-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  background: rgba(209, 76, 55, 0.15);
  border-radius: 10px;
}
.pillar h5 { font-size: 1rem; margin-bottom: 2px; color: var(--white); }
.pillar p { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin: 0; }

/* ============ CORSI ============ */
#corsi {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(209, 76, 55, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg), #eef2f7);
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.course-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.course-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.course-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(209, 76, 55, 0.2);
}
.course-card:hover::before { transform: scaleX(1); }
.course-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(209, 76, 55, 0.15), rgba(209, 76, 55, 0.05));
  color: var(--orange-dark);
  margin-bottom: 22px;
  transition: var(--transition);
}
.course-card:hover .course-icon {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  transform: rotate(-6deg) scale(1.05);
}
.course-card h3 {
  font-size: 1.2rem;
  color: var(--blue);
  margin-bottom: 12px;
  font-weight: 700;
}
.course-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}
.course-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: var(--muted);
}
.course-meta span { display: flex; align-items: center; gap: 6px; }
.course-meta strong { color: var(--orange-dark); }

/* ============ CERTIFICAZIONI ============ */
#certificazioni {
  background:
    radial-gradient(700px 400px at 0% 100%, rgba(30, 64, 175, 0.08), transparent 60%),
    var(--white);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.cert-card {
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-2) 100%);
  border-radius: var(--radius);
  padding: 32px 26px;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.06);
}
.cert-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 50% 0%, rgba(209, 76, 55, 0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.cert-card:hover {
  transform: translateY(-8px);
  border-color: rgba(209, 76, 55, 0.5);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
}
.cert-card:hover::before { opacity: 1; }
.cert-card > * { position: relative; z-index: 2; }
.cert-badge {
  width: 70px; height: 70px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 10px 25px rgba(209, 76, 55, 0.4);
  transition: var(--transition);
}
.cert-card:hover .cert-badge { transform: scale(1.1) rotate(8deg); }
.cert-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--white);
}
.cert-card p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.cert-code {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(209, 76, 55, 0.15);
  color: var(--orange-light);
  border: 1px solid rgba(209, 76, 55, 0.3);
}

/* ============ CONTATTI ============ */
#contatti {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
#contatti::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 76, 55, 0.18), transparent 70%);
  pointer-events: none;
}
#contatti .section-head h2 { color: var(--white); }
#contatti .section-head p { color: rgba(255,255,255,0.7); }
#contatti .section-tag {
  color: var(--orange-light);
  background: rgba(209, 76, 55, 0.15);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  position: relative;
  z-index: 2;
}
.contact-info { display: grid; gap: 20px; align-content: start; }
.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: var(--transition);
}
.info-item:hover {
  background: rgba(209, 76, 55, 0.08);
  border-color: rgba(209, 76, 55, 0.35);
  transform: translateX(6px);
}
.info-icon {
  width: 46px; height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 8px 18px rgba(209, 76, 55, 0.3);
}
.info-item h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange-light);
  margin-bottom: 4px;
}
.info-item p { color: rgba(255,255,255,0.85); font-size: 0.98rem; margin: 0; }

/* Form */
.contact-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(10px);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.4); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(209, 76, 55, 0.15);
}
.form-group select option { background: var(--blue-2); color: var(--white); }
.contact-form .btn { width: 100%; justify-content: center; }

/* ============ FOOTER ============ */
footer {
  background: #0a1120;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

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

.footer-brand .logo { margin-bottom: 18px; }
.footer-brand p { font-size: 0.92rem; line-height: 1.7; max-width: 320px; }

.footer h5 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 10px;
}
.footer h5::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.footer ul {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer ul a {
  position: relative;
  display: inline-block;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 0 4px 18px;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

/* Riga verticale corallo a sinistra (nascosta di default) */
.footer ul a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  transform-origin: center;
  width: 3px;
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Sottolineatura animata da sinistra */
.footer ul a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18px;
  width: 0;
  height: 1px;
  background: var(--orange);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer ul a:hover {
  color: var(--orange);
  padding-left: 24px;
}
.footer ul a:hover::before {
  transform: translateY(-50%) scaleY(1);
}
.footer ul a:hover::after {
  width: calc(100% - 18px);
}

/* Link crediti nel footer-bottom */
.footer-bottom a {
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  transition: color 0.3s ease;
  display: inline-block;
}
.footer-bottom a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-bottom a:hover { color: var(--orange); }
.footer-bottom a:hover::after { transform: scaleX(1); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.footer-bottom .socials { display: flex; gap: 10px; }
.footer-bottom .socials a {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  transition: var(--transition);
  font-size: 0.9rem;
}
.footer-bottom .socials a:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-3px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 480px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    position: fixed;
    top: 72px;
    right: 0;
    width: min(320px, 85%);
    height: calc(100vh - 72px);
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-left: 1px solid rgba(255,255,255,0.08);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 14px 18px; font-size: 1rem; }
  .nav-links a.login { margin-left: 0; margin-top: 12px; text-align: center; justify-content: center; }

  section { padding: 70px 0; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 26px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--blue); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--orange), var(--orange-dark));
  border-radius: 10px;
}

/* ============================================================
   HERO CON PARALLAX
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  background-image: url('https://www.eurekapolicoro.eu/new-site/images/hero-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  z-index: -2;
  transform: translate3d(0, 0, 0);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 37, 64, 0.90) 0%,
    rgba(10, 37, 64, 0.65) 55%,
    rgba(10, 37, 64, 0.40) 100%
  );
  z-index: -1;
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero h1 { color: #ffffff; }
.hero h1 .accent { color: #4da3ff; }
.hero p  { color: rgba(255, 255, 255, 0.88); }

.hero-badge {
  background: rgba(77, 163, 255, 0.15);
  color: #4da3ff;
  border: 1px solid rgba(77, 163, 255, 0.35);
}

.hero .btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
}
.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.hero .stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.hero .stat-card h4 { color: #ffffff; }
.hero .stat-card p  { color: rgba(255, 255, 255, 0.75); }

@media (max-width: 768px) {
  .hero-bg {
    transform: none !important;
    top: 0;
    height: 100%;
  }
  .hero { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none !important; }
}

/* ============================================================
   LISTA CORSI INTERNA ALLE CARD
   ============================================================ */
.course-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  border-top: 1px solid #e8edf3;
  padding-top: 14px;
}

.course-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #3a4a5c;
}

.course-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0;
  color: #4da3ff;
  font-weight: 700;
  font-size: 13px;
}

.course-list li:last-child {
  margin-bottom: 0;
}

/* ============================================================
   PAGINE LEGALI (privacy-policy.php, termini-condizioni.php)
   ============================================================ */
.legal-page {
  padding: 140px 0 80px;
  background: var(--bg);
}
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  padding: 50px 45px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.05);
}
.legal-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--blue);
  margin-bottom: 10px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.legal-content .legal-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}
.legal-content h2 {
  font-size: 1.25rem;
  color: var(--blue);
  margin: 32px 0 14px;
  font-weight: 700;
  padding-left: 14px;
  border-left: 3px solid var(--orange);
}
.legal-content p {
  color: var(--blue-3);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 14px;
}
.legal-content ul {
  margin: 10px 0 20px 22px;
  list-style: disc;
}
.legal-content ul li {
  color: var(--blue-3);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 8px;
}
.legal-content a {
  color: var(--orange);
  text-decoration: underline;
}
.legal-content strong { color: var(--blue); }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.95rem;
}
.legal-content table th,
.legal-content table td {
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  text-align: left;
  color: var(--blue-3);
}
.legal-content table th {
  background: #f8fafc;
  color: var(--blue);
  font-weight: 600;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition);
}
.legal-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(209, 76, 55, 0.4);
}

@media (max-width: 768px) {
  .legal-page { padding: 110px 0 60px; }
  .legal-content { padding: 30px 22px; }
  .legal-content table { font-size: 0.85rem; }
}