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

:root {
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --text: #1A1A18;
  --muted: #6B6B65;
  --accent: #7B2FBE;
  --accent-light: #E6F0E9;
  --accent-mid: #2D7A42;
  --border: rgba(26,26,24,0.12);
  --radius: 4px;
  --radius-lg: 10px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background:rgba(230, 230, 230, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* LOGO EIP — gradiente viola → giallo sul testo */
.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, #7B2FBE 0%, #F5C518 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* rimuove lo span separato — EIP è tutto un gradiente */
.nav-logo span {
  -webkit-text-fill-color: inherit;
}

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

/* Stile base pulsanti nav */
.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid #c0c0bb;
  background: white;
  transition: background 0.2s, color 0.2s;
}

/* Colori progressivi viola → giallo — uno per voce (nth-child sul li) */
.nav-links li:nth-child(1) a { color: #7B2FBE; }
.nav-links li:nth-child(2) a { color: #A0308A; }
.nav-links li:nth-child(3) a { color: #C43B3B; }
.nav-links li:nth-child(4) a { color: #D4682A; }
.nav-links li:nth-child(5) a { color: #E09020; }

/* Hover: sfondo si riempie, testo diventa bianco */
.nav-links li:nth-child(1) a:hover { background: #7B2FBE; color: #fff; }
.nav-links li:nth-child(2) a:hover { background: #A0308A; color: #fff; }
.nav-links li:nth-child(3) a:hover { background: #C43B3B; color: #fff; }
.nav-links li:nth-child(4) a:hover { background: #D4682A; color: #fff; }
.nav-links li:nth-child(5) a:hover { background: #E09020; color: #fff; }

/* CONTATTACI — sfondo giallo fisso, testo bianco, niente bordo grigio */
.nav-links a.nav-cta {
  background: #F5C518;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-links a.nav-cta:hover { background: #D4A800; color: #fff; }

/* HERO PAGINA INTERNA */
.page-hero {
  padding: 5rem 6vw 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.page-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 17px;
  color: var(--muted);
  max-width: 55ch;
  line-height: 1.7;
}

/* CONTENT PLACEHOLDER */
.placeholder-section {
  padding: 4rem 6vw;
  max-width: 1200px;
  margin: 0 auto;
}

.placeholder-box {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.placeholder-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

/* FOOTER */
footer {
  background: #E6E6E6;
  color: rgba(19, 17, 17, 0.5);
  padding: 2.5rem 6vw;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: rgba(19, 17, 17, 0.5);
}

.footer-info {
  font-size: 13px;
  text-align: right;
}

.footer-info a {
  color: rgba(19, 17, 17, 0.5);
  text-decoration: none;
}

.footer-info a:hover { color:#7B2FBE; }

/* HAMBURGER — visibile solo su mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 6vw 1.5rem;
    gap: 0.6rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  .nav-links.open {
    max-height: 70vh;
    opacity: 1;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    text-align: center;
  }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-info { text-align: center; }
}


/* ============================================================
   NUOVE SEZIONI — aggiunte per il lancio
   ============================================================ */

/* SEZIONE GENERICA */
.section {
  padding: 2rem 6vw 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
  margin-top: 3.5rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* HOME — INTRO SECTION */
.intro-section {
  padding-bottom: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.intro-text {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
}

.intro-text p + p {
  margin-top: 1.25rem;
}

.intro-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.intro-image img {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .intro-image {
    order: -1;
  }
}

/* HOME — FEATURES GRID */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* CTA SECTION */
.cta-section {
  background: var(--accent);
  margin: 0 6vw 5rem;
  border-radius: var(--radius-lg);
  padding: 4rem;
  text-align: center;
  color: #fff;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.cta-section p {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-light {
  background: #fff;
  color: var(--accent);
}

.btn-light:hover {
  background: var(--accent-light);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.45);
}

.btn-outline-light:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* SERVIZI */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  transition: border-color 0.2s;
}

.service-card:hover {
  border-color: var(--accent);
}

.service-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.service-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* SERVIZI — layout a righe */
.services-rows {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.service-row:first-child {
  padding-top: 0;
}

.service-row:last-child {
  border-bottom: none;
}

.service-row-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.service-row-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.service-row-left h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.service-row-right ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 2rem;
}

.service-row-right li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 1.1rem;
  position: relative;
}

.service-row-right li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 768px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .service-row-right ul {
    grid-template-columns: 1fr;
  }
}

/* AMBITI */
.ambiti-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.ambito-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s;
}

.ambito-card:hover {
  border-color: var(--accent);
}

.ambito-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.ambito-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.ambito-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* CHI SIAMO */
.chi-siamo-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.chi-siamo-lead {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.02em;
}

.chi-siamo-body {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
}

.chi-siamo-body p + p {
  margin-top: 1rem;
}

.valori-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.valore {
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.valore h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.valore p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}

/* TEAM COMING SOON */
.team-coming {
  padding: 2rem 6vw 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-coming-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 5rem 3rem;
  text-align: center;
}

.team-coming-inner h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.team-coming-inner p {
  color: var(--muted);
  font-size: 15px;
  max-width: 48ch;
  margin: 0 auto;
  line-height: 1.7;
}

/* CERTIFICAZIONI — card flip */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.cert-card {
  height: 220px;
  perspective: 1000px;
  cursor: pointer;
}

.cert-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.cert-card:hover .cert-inner {
  transform: rotateY(180deg);
}

.cert-front,
.cert-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.cert-front {
  background: var(--surface);
  border: 1px solid var(--border);
}

.cert-front:hover {
  border-color: var(--accent);
}

.cert-logo {
  max-width: 100px;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.cert-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.cert-name span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}

.cert-back {
  transform: rotateY(180deg);
}

.cert-card:nth-child(1) .cert-back { background: #7B2FBE; }
.cert-card:nth-child(2) .cert-back { background: #93339A; }
.cert-card:nth-child(3) .cert-back { background: #A0308A; }
.cert-card:nth-child(4) .cert-back { background: #B83A6B; }
.cert-card:nth-child(5) .cert-back { background: #C43B3B; }
.cert-card:nth-child(6) .cert-back { background: #D4682A; }
.cert-card:nth-child(7) .cert-back { background: #F5C518; }

.cert-back p {
  font-size: 13px;
  color: #fff;
  line-height: 1.65;
}

@media (max-width: 768px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* CONTATTI */
.contatti-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contatti-info h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.contatto-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.5rem;
}

.contatto-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.contatto-value {
  font-size: 15px;
  color: var(--text);
}

.contatto-value a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.contatto-value a:hover {
  color: var(--accent);
}

.contatti-note {
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}

.contatti-note h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.contatti-note p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.75;
}

.contatti-note p + p {
  margin-top: 1rem;
}

/* HERO CON IMMAGINE DI SFONDO (solo Home) */
.hero-wrapper {
  position: relative;
  background-image: url('/assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(141, 10, 10, 0.256);
}

.hero-wrapper-chisiamo {
  background-image: url('/assets/img/chi-siamo-hero.jpg');
}

.hero-wrapper-servizi {
  background-image: url('/assets/img/servizi-hero.jpg');
}

.hero-wrapper-ambiti {
  background-image: url('/assets/img/dove-operiamo-hero.jpg');
}

.hero-wrapper-team {
  background-image: url('/assets/img/team-hero.png');
}

.hero-wrapper .page-hero {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-wrapper .page-hero h1 {
  color: #fff;
}

.hero-wrapper .page-hero p {
  color: rgba(255, 255, 255, 0.82);
   font-weight: 1000 !important;
}

.hero-wrapper .page-eyebrow {
  color: #fff;
  background: rgba(240, 19, 19, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-wrapper .page-eyebrow::before {
  background: #fff;
}

/* RESPONSIVE — nuove classi */
@media (max-width: 768px) {
  .features-grid,
  .services-grid,
  .ambiti-grid,
  .valori-grid,
  .chi-siamo-intro,
  .contatti-layout {
    grid-template-columns: 1fr;
  }

  .cta-section {
    margin: 0 4vw 4rem;
    padding: 2.5rem 1.5rem;
  }

  .team-coming-inner {
    padding: 3rem 1.5rem;
  }

  .hero-wrapper {
    min-height: 50vh;
  }
}

.cert-download {
  display: inline-block;
  margin-top: 1rem;
  padding: 8px 16px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}

.cert-download:hover { background: rgba(255,255,255,0.85); }