/* ============ RESET E BASE ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: #1a1a2e;
  background: #ffffff;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* Offset per l'header sticky */
[id] {
  scroll-margin-top: 90px;
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  background: #0d1b3e;
  color: #ffffff;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #c9a227;
}

.nav a {
  margin-left: 28px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover { color: #c9a227; }

/* ============ HERO ============ */
.hero {
  background-color: #0d1b3e;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 120px 0 140px;
  text-align: center;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 40px;
}

.btn {
  display: inline-block;
  background: #c9a227;
  color: #0d1b3e;
  padding: 16px 36px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201,162,39,0.4);
}

/* ============ SEZIONI ============ */
.section { padding: 70px 0; }
.section-gray { background: #f5f6fa; }

.section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #0d1b3e;
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: #c9a227;
  margin-top: 12px;
  border-radius: 2px;
}

.section p {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 18px;
  max-width: 800px;
}

.section h3 {
  font-size: 1.2rem;
  color: #0d1b3e;
  margin-top: 32px;
  margin-bottom: 12px;
  font-weight: 600;
}

.section ul {
  margin-left: 24px;
  margin-bottom: 18px;
}

.section ul li {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 6px;
}

.section p a {
  color: #1e3a8a;
  font-weight: 500;
}

.section p a:hover {
  color: #c9a227;
}

/* ============ CHI SONO ============ */
.chi-sono-grid {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 40px;
  margin-top: 20px;
}

.chi-sono-foto {
  flex-shrink: 0;
  width: 300px;
}

.chi-sono-foto img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(13,27,62,0.15);
  display: block;
}

.chi-sono-testo {
  flex: 1;
}

.chi-sono-testo p {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 16px;
  max-width: 100%;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ============ COME LAVORO ============ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.step {
  background: #ffffff;
  padding: 32px 24px;
  border-radius: 10px;
  border-top: 4px solid #c9a227;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13,27,62,0.08);
}

.step-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0d1b3e;
  color: #c9a227;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.1rem;
  color: #0d1b3e;
  margin-bottom: 10px;
}

.step p {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

/* ============ PERCHÉ SCEGLIERMI ============ */
.perche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.perche-item {
  text-align: center;
  padding: 20px;
}

.perche-icona {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.perche-item h3 {
  font-size: 1.1rem;
  color: #0d1b3e;
  margin-bottom: 12px;
}

.perche-item p {
  font-size: 0.95rem;
  color: #555;
  margin: 0 auto;
}

/* ============ ASSOCIAZIONI SEGUITE ============ */
.associazioni-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
  color: #555;
}

.associazioni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  align-items: center;
  margin-top: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.assoc-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #f5f6fa;
  border-radius: 10px;
  height: 120px;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, filter 0.25s, opacity 0.25s;
  filter: grayscale(100%);
  opacity: 0.75;
}

.assoc-logo:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13,27,62,0.08);
  background: #ffffff;
  filter: grayscale(0%);
  opacity: 1;
}

.assoc-logo img {
  width: auto;
  height: 70px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

a.assoc-logo { cursor: pointer; }

/* ============ SERVIZI ============ */
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: #ffffff;
  padding: 32px 28px;
  border-radius: 10px;
  border: 1px solid #e8eaf0;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13,27,62,0.08);
  border-color: #c9a227;
}

.card h3 {
  font-size: 1.15rem;
  color: #0d1b3e;
  margin-bottom: 12px;
}

.card p {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

.servizi-sottotitolo {
  font-size: 1.3rem;
  color: #0d1b3e;
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 600;
}

.servizi-sottotitolo:first-of-type { margin-top: 10px; }

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card-link .card-cta {
  display: inline-block;
  margin-top: 16px;
  color: #c9a227;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.card-link:hover .card-cta {
  transform: translateX(4px);
}

/* ============ FAQ ============ */
.faq-lista {
  max-width: 800px;
  margin-top: 20px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 0;
  transition: border-color 0.2s;
}

.faq-item[open] { border-color: #c9a227; }

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: #0d1b3e;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: #c9a227;
  font-weight: 400;
}

.faq-item[open] summary::after { content: '−'; }

.faq-item p {
  padding: 0 22px 20px;
  font-size: 0.95rem;
  color: #555;
  margin: 0;
  line-height: 1.7;
}

/* ============ CONTATTI ============ */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}

.contatti-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contatti-lista li {
  font-size: 1.05rem;
  padding: 16px 0;
  border-bottom: 1px solid #e8eaf0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contatti-lista li:first-child { padding-top: 0; }

.contatti-lista a {
  color: #1e3a8a;
  font-weight: 500;
  transition: color 0.2s;
  word-break: break-word;
}

.contatti-lista a:hover { color: #c9a227; }

.contact-form {
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid #e8eaf0;
  box-shadow: 0 4px 20px rgba(13,27,62,0.04);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 600;
  color: #0d1b3e;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e8eaf0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  color: #1a1a2e;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c9a227;
  box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}

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

.contact-form .btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-outline {
  background: transparent;
  color: #0d1b3e;
  border: 2px solid #0d1b3e;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-block;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-outline:hover {
  background: #0d1b3e;
  color: #c9a227;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13,27,62,0.15);
}

/* ============ FOOTER ============ */
.footer {
  background: #0d1b3e;
  color: #b8bfd1;
  text-align: center;
  padding: 40px 0;
  font-size: 0.9rem;
}

.footer p { margin: 6px 0; }

.footer a {
  color: #c9a227;
  transition: opacity 0.2s;
}

.footer a:hover { opacity: 0.8; }

/* ============ BOTTONE WHATSAPP FISSO ============ */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s, box-shadow 0.25s;
  z-index: 1000;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* ============ BANNER COOKIE ============ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d1b3e;
  color: #ffffff;
  padding: 20px 24px;
  z-index: 2000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.cookie-banner.hidden { transform: translateY(100%); }

.cookie-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-content p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  min-width: 250px;
  color: #e8eaf0;
}

.cookie-content a {
  color: #c9a227;
  text-decoration: underline;
}

.cookie-btn {
  background: #c9a227;
  color: #0d1b3e;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.cookie-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(201,162,39,0.4);
}

/* ============ PAGINE SERVIZI - HERO CON IMMAGINE ============ */
.page-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 120px 0 140px;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto 40px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 12px;
  }

  .nav a {
    margin: 0 12px;
    font-size: 0.95rem;
  }

  .hero { padding: 70px 0 80px; }
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 1.05rem; }

  .section { padding: 60px 0; }
  .section h2 { font-size: 1.6rem; }

  .chi-sono-grid {
    flex-direction: column;
    gap: 24px;
  }

  .chi-sono-foto {
    margin: 0 auto;
  }

  .contatti-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-btn { width: 100%; }

  .page-hero {
    padding: 80px 0 90px;
  }

  .page-hero h1 { font-size: 2rem; }
  .page-hero p { font-size: 1.05rem; }
}

/* ============ ANIMAZIONI ============ */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Effetto cascata per le card */
.fade-in-up.delay-1 { transition-delay: 0.1s; }
.fade-in-up.delay-2 { transition-delay: 0.2s; }
.fade-in-up.delay-3 { transition-delay: 0.3s; }
.fade-in-up.delay-4 { transition-delay: 0.4s; }
.fade-in-up.delay-5 { transition-delay: 0.5s; }
.fade-in-up.delay-6 { transition-delay: 0.6s; }

/* Fade-in hero al caricamento */
.hero h1,
.page-hero h1 {
  animation: heroFadeIn 0.8s ease-out;
}

.hero p,
.page-hero p {
  animation: heroFadeIn 0.8s ease-out 0.2s both;
}

.hero .btn,
.page-hero .btn {
  animation: heroFadeIn 0.8s ease-out 0.4s both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Rispetto delle preferenze di accessibilità */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up,
  .hero h1,
  .hero p,
  .hero .btn,
  .page-hero h1,
  .page-hero p,
  .page-hero .btn {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}