/* ================================================================
   CSV — Consorzio Servizi del Veneto
   Stylesheet principale
   ================================================================ */

/* ============================================
   DESIGN TOKENS — modificare qui per il branding
   ============================================ */
:root {
  /* Brand colors (Legacoop family feeling) */
  --brand-red: #D01C3E;
  --brand-red-dark: #A8132F;
  --brand-red-light: #E94560;
  --brand-dark: #0A2C3D;
  --brand-dark-soft: #143849;
  --brand-accent: #DB1F35;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #adb5bd;
  --gray-700: #495057;
  --gray-900: #212529;

  /* Typography */
  --font-sans: 'Roboto', system-ui, -apple-system, sans-serif;
  --font-display: 'Roboto Slab', Georgia, serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1200px;
  --radius: 4px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(10, 44, 61, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 44, 61, 0.12);
  --shadow-lg: 0 16px 48px rgba(10, 44, 61, 0.18);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-dark);
}
h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); margin-bottom: var(--space-6); }
h3 { font-size: 1.375rem; margin-bottom: var(--space-3); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

section { padding: var(--space-24) 0; position: relative; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--gray-200);
}
.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.navbar-logo img {
  height: 64px;
  width: auto;
  display: block;
  transition: height 0.3s var(--ease);
}
.navbar.scrolled .navbar-logo img {
  height: 48px;
}
.navbar-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}
.navbar-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brand-dark);
  position: relative;
  transition: color 0.2s var(--ease);
}
.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--brand-red);
  transition: width 0.3s var(--ease);
}
.navbar-links a:hover { color: var(--brand-red); }
.navbar-links a:hover::after { width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--brand-red);
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  box-shadow: 0 4px 12px rgba(208, 28, 62, 0.25);
}
.btn:hover {
  background: var(--brand-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(208, 28, 62, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--brand-dark);
  border: 2px solid var(--brand-dark);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--brand-dark);
  color: var(--white);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}
.navbar-toggle span {
  width: 24px; height: 2px;
  background: var(--brand-dark);
  transition: all 0.3s var(--ease);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 var(--space-16);
  background:
    radial-gradient(circle at 20% 80%, rgba(208, 28, 62, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(10, 44, 61, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: -10%;
  width: 60%; height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(208, 28, 62, 0.04) 100%);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-12);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(208, 28, 62, 0.1);
  color: var(--brand-red);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
}
.hero h1 {
  margin-bottom: var(--space-6);
}
.hero h1 .accent { color: var(--brand-red); }
.hero-lead {
  font-size: 1.25rem;
  color: var(--gray-700);
  margin-bottom: var(--space-6);
  max-width: 580px;
}
.hero-claim {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand-red);
  margin-bottom: var(--space-8);
  max-width: 580px;
}
.hero-cta { display: flex; gap: var(--space-4); flex-wrap: wrap; }

.hero-visual {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  justify-self: end;
}
.hero-shape {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 12s ease-in-out infinite;
  opacity: 0.15;
}
.hero-shape::after {
  content: '';
  position: absolute;
  inset: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  border-radius: inherit;
}
@keyframes morph {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  33% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
  66% { border-radius: 50% 50% 30% 70% / 50% 30% 70% 50%; }
}
.hero-stats {
  position: absolute;
  bottom: -30px; left: -30px;
  background: var(--white);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  gap: var(--space-6);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-red);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--gray-700);
  margin-top: var(--space-1);
}

/* ============================================
   ABOUT
   ============================================ */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-16);
  align-items: center;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: var(--space-4);
}
.about-content p {
  color: var(--gray-700);
  margin-bottom: var(--space-4);
  font-size: 1.05rem;
}
.about-values {
  list-style: none;
  margin-top: var(--space-6);
}
.about-values li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-200);
}
.about-values li::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--brand-red);
  border-radius: 50%;
  margin-top: 9px;
  flex-shrink: 0;
}
.about-visual {
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-dark-soft) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-visual::before {
  content: '';
  position: absolute;
  top: -20%; right: -20%;
  width: 60%; height: 60%;
  background: var(--brand-red);
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(40px);
}
.about-visual-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
/* Variante con immagine (es. mappa delle associate): solo l'immagine, senza riquadro */
.about-visual--image {
  background: none;
  box-shadow: none;
  border-radius: 0;
  aspect-ratio: auto;
}
.about-visual--image::before { display: none; }
.about-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* ============================================
   SERVIZI
   ============================================ */
.servizi { background: var(--brand-dark); color: var(--white); overflow: hidden; }
.servizi h2 { color: var(--white); }
.servizi .section-eyebrow { color: var(--brand-red-light); }
.servizi .section-header p { color: rgba(255,255,255,0.7); }
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-16);
}
.section-header p { color: var(--gray-700); font-size: 1.1rem; }
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}
.servizio-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-dark-soft);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.servizio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.servizio-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-dark) 100%);
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  transition: opacity 0.4s var(--ease);
}
.servizio-card:nth-child(2n) .servizio-card-bg:not(.has-image) {
  background: linear-gradient(135deg, var(--brand-dark-soft) 0%, var(--brand-red-dark) 100%);
}
.servizio-card:nth-child(3n) .servizio-card-bg:not(.has-image) {
  background: linear-gradient(135deg, var(--brand-red-light) 0%, var(--brand-dark) 100%);
}
.servizio-card:hover .servizio-card-bg { opacity: 0.6; }
/* Foto reale: sempre "cover" e leggermente oscurata (sul fondo scuro della card) */
.servizio-card-bg.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.8;
}
.servizio-card:hover .servizio-card-bg.has-image { opacity: 0.92; }
.servizio-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  background: linear-gradient(180deg, transparent 40%, rgba(10, 44, 61, 0.95) 100%);
  color: var(--white);
}
.servizio-icon {
  width: 48px; height: 48px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  color: var(--white);
}
.servizio-card-content h3 { color: var(--white); margin-bottom: var(--space-2); }
.servizio-card-content p { font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); }

/* ============================================
   CERTIFICAZIONI E QUALITÀ
   ============================================ */
.certificazioni {
  background: var(--white);
}
.certificazioni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}
.cert-card {
  background: var(--white);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: all 0.4s var(--ease-out);
}
.cert-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.cert-logo {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.cert-logo img {
  max-height: 96px;
  max-width: 100%;
  object-fit: contain;
}
.cert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4) var(--space-6);
  border: 2px solid var(--brand-red);
  border-radius: var(--radius);
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}
.cert-card h3 { font-size: 1.1rem; margin-bottom: var(--space-2); }
.cert-card p { color: var(--gray-700); font-size: 0.95rem; }

.cert-values {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-16);
}
.cert-value {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 360px;
}
.cert-value-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(208, 28, 62, 0.1) 0%, rgba(208, 28, 62, 0.05) 100%);
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-value strong { display: block; margin-bottom: var(--space-1); }
.cert-value p { color: var(--gray-700); font-size: 0.95rem; }

/* ============================================
   GALLERY (carousel a scorrimento)
   ============================================ */
.gallery { background: var(--brand-dark); color: var(--white); overflow: hidden; }
.gallery h2 { color: var(--white); }
.gallery .section-eyebrow { color: var(--brand-red-light); }
.gallery .section-header p { color: rgba(255,255,255,0.7); }

.carousel {
  position: relative;
  margin: 0 calc(-1 * var(--space-6));
}
.carousel-track-wrapper {
  overflow: hidden;
  padding: var(--space-4) var(--space-6);
}
.carousel-track {
  display: flex;
  gap: var(--space-6);
  transition: transform 0.6s var(--ease-out);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 calc((100% - var(--space-6) * 2) / 3);
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--brand-dark-soft);
  box-shadow: var(--shadow-md);
}
.carousel-slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  background: linear-gradient(180deg, transparent 40%, rgba(10, 44, 61, 0.95) 100%);
  color: var(--white);
}
.carousel-slide-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-dark) 100%);
  opacity: 0.4;
  transition: opacity 0.4s var(--ease);
}
.carousel-slide:nth-child(2n) .carousel-slide-bg:not(.has-image) {
  background: linear-gradient(135deg, var(--brand-dark-soft) 0%, var(--brand-red-dark) 100%);
}
.carousel-slide:nth-child(3n) .carousel-slide-bg:not(.has-image) {
  background: linear-gradient(135deg, var(--brand-red-light) 0%, var(--brand-dark) 100%);
}
.carousel-slide:hover .carousel-slide-bg { opacity: 0.6; }
/* Foto reale: sempre "cover" e leggermente oscurata */
.carousel-slide-bg.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.8;
}
.carousel-slide:hover .carousel-slide-bg.has-image { opacity: 0.92; }
.carousel-slide h3 { color: var(--white); margin-bottom: var(--space-2); }
.carousel-slide p { font-size: 0.9rem; color: rgba(255,255,255,0.85); }

.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-8);
  padding: 0 var(--space-6);
}
.carousel-dots {
  display: flex;
  gap: var(--space-2);
}
.carousel-dot {
  width: 32px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}
.carousel-dot.active { background: var(--brand-red); }
.carousel-buttons { display: flex; gap: var(--space-3); }
.carousel-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
}
.carousel-btn:hover {
  background: var(--brand-red);
  transform: scale(1.1);
}
.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.carousel-btn:disabled:hover {
  background: rgba(255,255,255,0.1);
  transform: none;
}

/* ============================================
   AFFILIATE
   ============================================ */
.affiliate { background: var(--white); }
.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.affiliate-card {
  background: var(--gray-50);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s var(--ease);
  border: 1px solid transparent;
}
.affiliate-card:hover {
  background: var(--white);
  border-color: var(--brand-red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.affiliate-logo {
  width: 80px; height: 80px;
  background: var(--white);
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-red);
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.affiliate-card h3 { font-size: 1.1rem; margin-bottom: var(--space-2); }
.affiliate-card p { font-size: 0.9rem; color: var(--gray-700); }
.affiliate-logo img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 50%;
}

/* ---- Marquee associate (scorrimento automatico) ---- */
.affiliate-marquee {
  margin-top: var(--space-8);
  padding: var(--space-4) 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.affiliate-track {
  display: flex;
  gap: var(--space-6);
  width: max-content;
  animation: affiliateScroll 90s linear infinite;
}
.affiliate-marquee:hover .affiliate-track { animation-play-state: paused; }
@keyframes affiliateScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .affiliate-track { animation: none; flex-wrap: wrap; justify-content: center; }
}
.affiliate-item {
  flex: 0 0 auto;
  width: 200px;
  background: var(--gray-50);
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
  color: inherit;
}
.affiliate-item.is-link { cursor: pointer; }
.affiliate-item.is-link:hover {
  background: var(--white);
  border-color: var(--brand-red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.affiliate-item .affiliate-logo { margin-bottom: var(--space-3); }
.affiliate-item h3 { font-size: 1rem; margin-bottom: var(--space-1); }
.affiliate-item p { font-size: 0.85rem; color: var(--gray-700); }

.affiliate-actions {
  margin-top: var(--space-8);
  display: flex;
  justify-content: center;
}

/* ---- Modal elenco associate ---- */
.associate-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.associate-modal[hidden] { display: none; }
.associate-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 44, 61, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.associate-modal-box {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 540px;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cookieSlideUp 0.35s var(--ease-out);
}
.associate-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
}
.associate-modal-head h3 { font-size: 1.25rem; margin: 0; }
.associate-modal-close {
  font-size: 1.25rem;
  color: var(--gray-700);
  line-height: 1;
  padding: var(--space-2);
  transition: color 0.2s var(--ease);
}
.associate-modal-close:hover { color: var(--brand-red); }
.associate-modal-list {
  list-style: none;
  overflow-y: auto;
  padding: var(--space-2) 0;
}
.associate-modal-list li { border-bottom: 1px solid var(--gray-100); }
.associate-modal-list li:last-child { border-bottom: none; }
.associate-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  color: inherit;
  transition: background 0.2s var(--ease);
}
a.associate-modal-row:hover { background: var(--gray-50); }
.associate-modal-row .am-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}
.associate-modal-row .am-logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--brand-red);
  overflow: hidden;
}
.associate-modal-row .am-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 50%;
}
.associate-modal-row .am-name { font-weight: 500; color: var(--brand-dark); }
.associate-modal-row .am-place { font-size: 0.85rem; color: var(--gray-500); }
.associate-modal-row .am-link { color: var(--brand-red); display: flex; align-items: center; }

/* ============================================
   FAQ (bottone + modale)
   ============================================ */
.faq-cta {
  background: var(--gray-50);
  padding: var(--space-12) 0;
  text-align: center;
}
.faq-cta .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.faq-cta-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-dark);
}
.faq-modal .associate-modal-box { max-width: 640px; }
.faq-modal-body {
  overflow-y: auto;
  padding: var(--space-4) var(--space-6) var(--space-6);
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease);
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-6);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--brand-red);
  transition: transform 0.3s var(--ease);
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 var(--space-6) var(--space-6); }
.faq-answer p { color: var(--gray-700); }

/* ============================================
   CONTATTI
   ============================================ */
.contatti {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-dark-soft) 100%);
  color: var(--white);
}
.contatti h2 { color: var(--white); }
.contatti .section-eyebrow { color: var(--brand-red-light); }
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
}
.contatti-info { font-size: 1.05rem; }
.contatti-info > p { color: rgba(255,255,255,0.8); margin-bottom: var(--space-8); }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.contact-icon {
  width: 44px; height: 44px;
  background: rgba(208, 28, 62, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-red-light);
  flex-shrink: 0;
}
.contact-item strong { display: block; margin-bottom: var(--space-1); }
.contact-item p, .contact-item a { color: rgba(255,255,255,0.8); font-size: 0.95rem; }
.contact-item a:hover { color: var(--white); }

.contact-form {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.1);
}
.form-group { margin-bottom: var(--space-4); }
.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
  color: rgba(255,255,255,0.9);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.25s var(--ease);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  background: rgba(255,255,255,0.08);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.4); }
.contact-form .btn { width: 100%; justify-content: center; margin-top: var(--space-4); }
.form-privacy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-4);
  text-align: center;
}
.form-privacy a { color: var(--brand-red-light); text-decoration: underline; }
.form-status {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.9rem;
  display: none;
}
.form-status.success { display: block; background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.form-status.error { display: block; background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,0.7);
  padding: var(--space-12) 0 var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font-sans);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; }
.footer-col li { padding: var(--space-1) 0; font-size: 0.9rem; }
.footer-col a:hover { color: var(--brand-red-light); }
.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.footer-logo {
  height: 36px;
  width: auto;
  display: block;
}
.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.85rem;
}
.footer-bottom a { text-decoration: underline; }
.footer-bottom a:hover { color: var(--brand-red-light); }

/* ============================================
   COOKIE BANNER (GDPR)
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 20px; left: 20px; right: 20px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  z-index: 1000;
  border: 1px solid var(--gray-200);
  display: none;
  animation: cookieSlideUp 0.5s var(--ease-out);
}
.cookie-banner.show { display: block; }
@keyframes cookieSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-banner h4 {
  font-size: 1.1rem;
  margin-bottom: var(--space-3);
  color: var(--brand-dark);
}
.cookie-banner p {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: var(--space-4);
}
.cookie-banner p a {
  color: var(--brand-red);
  text-decoration: underline;
}
.cookie-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.cookie-buttons .btn {
  flex: 1;
  justify-content: center;
  min-width: 120px;
}
.cookie-banner .btn-outline {
  background: transparent;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  box-shadow: none;
}
.cookie-banner .btn-outline:hover {
  background: var(--gray-100);
  color: var(--brand-dark);
  border-color: var(--gray-500);
}

/* ============================================
   PRIVACY / COOKIE POLICY PAGES
   ============================================ */
.legal-page {
  padding-top: 140px;
  padding-bottom: var(--space-16);
  max-width: 820px;
  margin: 0 auto;
}
.legal-page h1 { font-size: 2.5rem; margin-bottom: var(--space-4); color: var(--brand-dark); }
.legal-page .legal-date { color: var(--gray-500); font-size: 0.9rem; margin-bottom: var(--space-8); }
.legal-page h2 { font-size: 1.5rem; margin-top: var(--space-8); margin-bottom: var(--space-4); color: var(--brand-dark); }
.legal-page h3 { font-size: 1.15rem; margin-top: var(--space-6); margin-bottom: var(--space-3); color: var(--brand-dark); }
.legal-page p, .legal-page li { color: var(--gray-700); margin-bottom: var(--space-3); line-height: 1.7; }
.legal-page ul, .legal-page ol { padding-left: var(--space-6); margin-bottom: var(--space-4); }
.legal-page a { color: var(--brand-red); text-decoration: underline; }
.legal-page table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; font-size: 0.9rem; }
.legal-page th, .legal-page td { text-align: left; padding: var(--space-3); border-bottom: 1px solid var(--gray-200); }
.legal-page th { background: var(--gray-50); font-weight: 600; color: var(--brand-dark); }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
/* I contenuti sono visibili di default: senza JS (o se il JS non parte)
   la pagina resta leggibile. L'animazione si attiva solo quando il JS
   aggiunge la classe "js" all'<html>. */
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.js .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================
   RESPONSIVE — TABLET (≤900px)
   ============================================ */
@media (max-width: 900px) {
  .navbar-links, .navbar .btn { display: none; }
  .navbar-toggle { display: flex; }

  .about-grid, .contatti-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  section { padding: var(--space-16) 0; }

  .hero { min-height: auto; padding: 100px 0 var(--space-16); }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }

  /* Il decoro resta anche su mobile, come sfondo molto leggero DIETRO al testo.
     !important serve a battere le regole dell'animazione .reveal (opacity/transform). */
  .hero-content { position: relative; z-index: 2; }
  .hero-visual {
    display: block !important;
    position: absolute;
    top: 50%;
    right: -35%;
    transform: translateY(-50%) !important;
    width: 80%;
    max-width: 420px;
    aspect-ratio: 1;
    margin: 0;
    opacity: 0.06 !important;
    z-index: 0;
    pointer-events: none;
  }
  /* nel decoro di sfondo non mostriamo il box statistiche */
  .hero-visual .hero-stats { display: none; }

  .about-visual { display: none; }
  /* la mappa (variante immagine) resta visibile anche su mobile, SOTTO al testo */
  .about-content { order: 1; }
  .about-visual--image { display: block; order: 2; max-width: 420px; margin: var(--space-8) auto 0; }
  .carousel-slide { flex: 0 0 calc((100% - var(--space-6)) / 2); }
}

/* ============================================
   RESPONSIVE — MOBILE (≤600px)
   ============================================ */
@media (max-width: 600px) {
  .navbar-logo img { height: 48px; }
  .navbar-inner { padding: var(--space-3) var(--space-4); }

  .hero { padding: 88px 0 var(--space-12); }
  .hero h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .hero-lead { font-size: 1.05rem; }
  .hero-eyebrow { font-size: 0.75rem; }

  .hero-cta { flex-direction: column; gap: var(--space-3); }
  .hero-cta .btn { width: 100%; justify-content: center; }

  .hero-stats {
    width: 100%;
    justify-content: space-around;
    padding: var(--space-4);
    gap: 0;
  }
  .stat-num { font-size: 1.75rem; }
  .stat-label { font-size: 0.75rem; }

  .servizi-grid { grid-template-columns: 1fr; }
  .carousel-slide { flex: 0 0 100%; }
  .affiliate-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  section { padding: var(--space-12) 0; }
  .container { padding: 0 var(--space-4); }

  .cookie-banner {
    left: 12px; right: 12px; bottom: 12px;
    padding: var(--space-4);
  }
  .cookie-buttons { flex-direction: column; }
}

/* ============================================
   MOBILE MENU DRAWER
   ============================================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 999;
  flex-direction: column;
  padding: var(--space-6);
  padding-top: 80px;
}
.mobile-menu.open { display: flex; }
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-menu ul a {
  display: block;
  padding: var(--space-4) var(--space-4);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--brand-dark);
  border-bottom: 1px solid var(--gray-200);
  transition: color 0.2s;
}
.mobile-menu ul a:hover { color: var(--brand-red); }
.mobile-menu .btn {
  margin-top: var(--space-6);
  width: 100%;
  justify-content: center;
  font-size: 1.1rem;
  padding: var(--space-4);
}
.mobile-menu-close {
  position: absolute;
  top: var(--space-4); right: var(--space-4);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--brand-dark);
  cursor: pointer;
}
