/* =========================================
   IMPORTS & VARIABLES
   ========================================= */
@import url('./font-faces.css');
@import url('./keyframes.css');

:root {
  /* Colors */
  --primary: #245da2;
  --primary-dark: #1b4679;
  --secondary: #4a8bb5;
  --secondary-dark: #236183;
  --accent: #f5f006;
  --dark: #1f222a;
  --gray: #52646f;
  --light: #f4f7f9;
  --white: #ffffff;
  --border: #e0e4e8;
  --footer-text: #ccc;
  --footer-copyright: #888;

  /* Typography */
  --font-main: 'Poppins', system-ui, -apple-system, sans-serif;

  /* Dimensions & Spacing */
  --header-offset: 76px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-round: 50%;

  /* Shadows & Transitions */
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Hierarchy */
  --z-below: -1;
  --z-base: 0;
  --z-low: 1;
  --z-above: 2;
  --z-ui: 3;
  --z-overlay: 10;
  --z-floating: 99;
  --z-header: 100;
  --z-modal: 9999;
}

/* =========================================
   BASE & RESETS
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* per redirect preciso alla section ad altezza inizio section */
  scroll-padding-top: 50px;
}

body {
  padding-top: var(--header-offset);
  overflow-x: hidden;
  background: var(--light);
  color: var(--dark);
  font-family: var(--font-main);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}



/* =========================================
   GLOBAL ELEMENTS & HEROICONS
   ========================================= */
svg.w-5.h-5,
svg.w-6.h-6,
svg.size-5,
svg.size-6 {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  transition: var(--transition);
}

svg.w-5.h-5:hover,
svg.w-6.h-6:hover,
svg.size-5:hover,
svg.size-6:hover {
  color: var(--secondary);
  transform: scale(1.15);
}

/* Disabilita l'effetto per icone nei bottoni */
.action-buttons .btn svg:hover {
  color: inherit;
  transform: none;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

#backToTop {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: var(--z-floating);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding-bottom: 3px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-round);
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

#backToTop.show {
  opacity: 1;
  transform: translateY(0);
}

#backToTop:hover {
  background: var(--primary-dark);
}

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.section {
  padding: 1rem 0;
}

.section-white {
  background-color: var(--white);
}

.section-gray {
  background-color: var(--light);
}

.section-title {
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-title h2 {
  margin-bottom: 0.6rem;
  color: var(--primary);
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.section-title p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--gray);
}

.subsection-title {
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--primary-dark);
  text-align: left;
}

.subsection-title h3 {
  margin-bottom: 0.3rem;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 600;
}

.subsection-title p {
  max-width: 600px;
  margin: 0;
  color: var(--gray);
  font-size: 0.95rem;
}

/* Snippet per griglie generiche (Products / Solutions) a 6 elementi */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 3x2 su Desktop */
  gap: 1.8rem;
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    /* 2x3 su Tablet/iPad */
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
    /* 1x6 su Mobile */
  }
}

@media (max-width: 900px) {
  .section {
    padding: 2rem 0;
  }
}

@media (max-width: 768px) {
  .subsection-title h3 {
    font-size: 1.2rem;
  }

  .subsection-title p {
    font-size: 0.9rem;
  }
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-header);
  background: var(--white);
  box-shadow: var(--shadow);
}

header .container {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;

  /* --- FIX PER IL WRAP DEL TESTO E IL RIDIMENSIONAMENTO --- */
  white-space: nowrap;
  /* Impedisce categoricamente al testo di andare a capo */
  flex-shrink: 0;
  /* Impedisce al nav (flex container) di schiacciare il logo */
  min-width: max-content;
  /* Forza la larghezza minima a coincidere con l'ingombro del testo */

  /* Regole anti-selezione (se non le avevi già mantenute) */
  user-select: none;
  -webkit-user-select: none;
}

.logo-img {
  width: auto;
  height: 34px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
}

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

.nav-links a.btn.btn-primary:hover {
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.menu-close {
  display: none;
}

/* @media (max-width: 900px) { */
@media (max-width: 1100px) {
  :root {
    --header-offset: 68px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo-img {
    height: 32px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    flex-direction: column;
    gap: 1.5rem;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    padding: 5rem 2rem 2rem;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .menu-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    display: block;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
  }

  .menu-close:hover {
    color: var(--primary-dark);
    transform: scale(1.1);
  }
}

/* =========================================
   COMPONENTS
   ========================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

a.btn.btn-primary {
  width: 100%;
  background: var(--primary);
}

a.btn.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.nav-links a.btn.btn-primary {
  width: auto;
  font-weight: 600;
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
}

.btn-accent:hover {
  background: #e0db05;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.action-buttons .btn {
  width: auto !important;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .action-buttons {
    width: 100%;
  }

  .action-buttons .btn {
    flex: 1 1 auto !important;
    width: auto !important;
    justify-content: center;
    white-space: nowrap;
  }
}

/* --- Base Cards --- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.8rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.card p {
  flex: 1;
  margin-bottom: 1rem;
  color: var(--gray);
  font-size: 0.95rem;
}

.card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-dark);
  font-weight: 600;
}

.card a:hover,
.card a.btn:hover {
  color: var(--primary);
  text-decoration: none;
}

/* --- Card Icon (Hover Expansion) --- */
.card-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: all 0.4s ease-in-out;
}

.card-icon img {
  width: auto;
  max-width: 100%;
  height: 80px;
  object-fit: contain;
}

.card:hover .card-icon {
  max-height: 200px;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--light);
  opacity: 1;
}

/* --- Brand Cards --- */
/* Snippet per Brands Grid */
.brands-grid {
  display: grid;
  /* Su Desktop: forziamo 4 colonne esatte */
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
}

/* Su iPad orizzontale/verticale (tablet): forziamo un 2x2 preciso */
@media (max-width: 1024px) {
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Su Mobile: 1 colonna */
@media (max-width: 600px) {
  .brands-grid {
    grid-template-columns: 1fr;
  }
}

.card.brand-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1.5rem;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  order: -1;
  flex-shrink: 0;
  width: 100%;
  height: 110px;
  padding: 6px;
  background: var(--light);
  border-radius: 10px;
  transition: var(--transition);
}

.brand-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.brand-icon img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  transition: var(--transition);
}

.card.brand-card:hover .brand-icon {
  background: var(--primary);
}

.card.brand-card:hover .brand-icon img {
  transform: scale(1.12);
}

.brand-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
}

.brand-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.brand-content p {
  margin-bottom: 0;
  color: var(--gray);
  font-size: 0.95rem;
}

.brand-content a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--primary-dark);
  font-weight: 600;
}

@media (max-width: 768px) {
  .card.brand-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 1.2rem;
  }

  .brand-icon {
    order: 0;
    width: 80px;
    height: 80px;
  }

  .brand-content {
    text-align: left;
  }

  .brand-content a {
    margin-top: 0.5rem;
    padding-top: 0;
  }
}

/* =========================================
   CONTACT MODAL & FORMS
   ========================================= */
.contact-open-btn {
  align-self: center;
  width: max-content;
  margin-top: auto;
  padding: 0.8rem 1.4rem;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm) !important;
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.contact-open-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.contact-modal.active {
  display: flex;
}

.contact-modal-box {
  position: relative;
  width: 100%;
  max-width: 650px;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  animation: modalShow 0.25s ease;
}

.contact-modal-box h2 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.contact-modal-box p {
  margin-bottom: 1.5rem;
  color: var(--gray);
}

.contact-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: 0;
  font-size: 2rem;
  cursor: pointer;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form .btn {
  align-self: center;
  width: max-content;
  padding: 0.8rem 1.4rem;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.contact-form .btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

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

.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.25rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.contact-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.2rem;
  accent-color: var(--primary);
}

.contact-consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

.contact-consent a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.contact-consent a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  font-family: inherit;
  font-size: 0.9rem;
  /* Uniforma la dimensione del testo e del placeholder */
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
}

F .contact-form textarea[name="messaggio"] {
  min-height: 140px;
  max-height: 300px;
  resize: vertical;
}

.contact-captcha {
  display: flex;
  align-items: center;
  gap: 1rem;
  appearance: textfield;
  -moz-appearance: textfield;
}

.contact-captcha ::-webkit-outer-spin-button,
.contact-captcha ::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

#captchaQuestion {
  flex-shrink: 0;
  padding: 0.7rem 1rem;
  background: var(--light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  white-space: nowrap;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
}

.contact-success {
  color: green;
}

.contact-error {
  color: red;
}



@media (max-width: 600px) {
  .contact-form-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   PAGE SECTIONS
   ========================================= */

/* --- Hero --- */
.hero {
  position: relative;
  padding: 4rem clamp(1.5rem, 5vw, 5rem) 3rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-size: 250% 250%;
  color: var(--white);
  text-align: center;
  animation: stripeGradient 5s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--z-low);
  pointer-events: none;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%);
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.hero .container {
  position: relative;
  z-index: var(--z-above);
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.hero-logo {
  flex-shrink: 0;
  width: 140px;
  height: auto;
}

.hero-header h1 {
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.hero h1 {
  position: relative;
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.15;
}

.hero p {
  position: relative;
  max-width: 760px;
  margin: 0 auto 2rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.92;
}

.hero-btns {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero .wave {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  pointer-events: none;
  background: transparent;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
}

.hero .wave span {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 250vh;
  height: 250vh;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.15);
  transform: translate(-40%, 30%);
}

.hero .wave span:nth-child(1) {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 45%;
  animation: waveAnimate 30s linear infinite;
}

.hero .wave span:nth-child(2) {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 40%;
  animation: waveAnimate 35s linear infinite;
}

.hero .wave span:nth-child(3) {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 42.5%;
  animation: waveAnimate 40s linear infinite;
}

@media (max-width: 1380px) {
  .hero-header h1 {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 2.5rem 1.5rem 2rem;
  }
}

@media (max-width: 768px) {
  .hero-header {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-header h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 90px;
  }
}

/* --- About & Mission --- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  align-items: stretch;
  gap: 40px;
}

.about-text-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.about-text-col h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary);
  line-height: 1;
}

.intro-text {
  color: #333;
  font-size: 1.1rem;
  line-height: 1.6;
}

.mission-block h3 {
  margin-bottom: 15px;
  color: #245da2;
}

.mission-block p {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

.mission-block p:last-child {
  margin-bottom: 0;
}

.about-image-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.about-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.about-image-col .diagram-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.about-image-col .main-title {
  margin: 0;
  color: #d1a315;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
}

.about-image-col .venn-wrapper {
  position: relative;
  width: 680px;
  height: 450px;
  margin: -110px 0;
  transform: scale(0.45);
  transform-origin: center center;
}

.about-image-col .circle {
  position: absolute;
  top: 0;
  width: 450px;
  height: 450px;
  border-radius: var(--radius-round);
  mix-blend-mode: multiply;
  opacity: 0.95;
}

.about-image-col .hw-circle {
  left: 0;
  background-color: #458383;
}

.about-image-col .sw-circle {
  right: 0;
  background-color: #216185;
}

.about-image-col .text {
  position: absolute;
  z-index: var(--z-overlay);
  color: var(--white);
  font-size: 25px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.about-image-col .title {
  color: #ffdf00;
  font-size: 34px;
  font-weight: bold;
}

.about-image-col .hw-title {
  top: 40px;
  left: 195px;
}

.about-image-col .sw-title {
  top: 40px;
  left: 470px;
}

.about-image-col .item-sensors {
  top: 120px;
  left: 150px;
}

.about-image-col .item-plc {
  top: 200px;
  left: 100px;
}

.about-image-col .item-auto-l {
  top: 280px;
  left: 160px;
}

.about-image-col .item-fpga {
  top: 350px;
  left: 140px;
}

.about-image-col .item-ind {
  top: 120px;
  left: 340px;
}

.about-image-col .item-auto-m {
  top: 210px;
  left: 340px;
}

.about-image-col .item-eng {
  top: 290px;
  left: 340px;
}

.about-image-col .item-db {
  top: 110px;
  left: 580px;
}

.about-image-col .item-soft {
  top: 190px;
  left: 550px;
}

.about-image-col .item-ui {
  top: 330px;
  left: 590px;
}

.about-image-col .item-vis {
  top: 260px;
  left: 480px;
  text-align: left;
  line-height: 1.1;
  transform: none;
}

.about-image-col .footer {
  margin: 0;
  color: #2b2b2b;
  font-size: 1.1rem;
  line-height: 1;
  text-align: center;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about-image-col {
    max-height: none;
  }

  .about-image-col .diagram-container {
    height: auto;
    margin-top: 40px;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .about-image-col .diagram-container {
    margin-bottom: 0 !important;
    transform: none !important;
  }

  .about-image-col .venn-wrapper {
    margin: -130px 0;
    transform: scale(0.38);
  }
}

/* --- Team --- */
/* Container Team */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* Questo centra gli elementi orfani nell'ultima riga */
  gap: 2rem;
}

/* Base (Desktop - Schermi larghi): Forziamo la soluzione originale a 5 card */
.team-card {
  /* Magia del calc: 100% dello spazio MENO la somma dei 4 gap (4 x 2rem = 8rem), diviso 5.
     Risultato: 5 card precise su una riga, niente a capo, niente stretching. */
  width: calc((100% - 8rem) / 5);

  /* Regole estetiche originali invariate */
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

/* Tablet (es. iPad orizzontale o schermi medi): 3 card per riga */
@media (max-width: 1100px) {
  .team-card {
    /* 3 card sopra, le restanti 2 si allineano perfettamente centrate sotto 
       e mantengono l'identica larghezza di quelle superiori */
    width: calc((100% - 4rem) / 3);
  }
}

/* Mobile orizzontale (o tablet piccoli): 2 card per riga */
@media (max-width: 768px) {
  .team-card {
    /* 2 card sopra, 2 in mezzo, 1 centrata sotto */
    width: calc((100% - 2rem) / 2);
  }
}

/* Mobile verticale (Smartphone): 1 card per riga */
@media (max-width: 500px) {
  .team-card {
    width: 100%;
    /* Occupa tutto lo spazio per non sbordare (fix per l'iPhone) */
    max-width: 340px;
    /* Limita l'estensione per mantenere un bell'aspetto */
  }
}

.team-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.team-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  color: var(--white);
  font-size: 2rem;
  font-weight: 700;
  transition: var(--transition);
}

.team-avatar img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  line-height: 100px;
  filter: grayscale(100%);
  transform: scale(1);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.team-card:hover .team-avatar {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.team-card:hover .team-avatar img {
  filter: grayscale(0%);
  transform: scale(1.06);
}

.team-card h3 {
  color: var(--primary);
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.team-card p {
  color: var(--gray);
  font-size: 0.9rem;
}

/* --- Team Member Page (Single) --- */
.team-member-page {
  padding: 4rem 0 3rem;
}

/* Layout a due colonne per desktop */
.member-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  /* La colonna testo è leggermente più larga */
  gap: 3rem;
  align-items: start;
}

/* Riduzione dei margini verticali per le sezioni interne alla griglia */
.member-grid .member-section {
  margin-bottom: 1.5rem;
  /* Ridotto rispetto al 2.5rem originale */
}

.member-grid .member-section h2 {
  font-size: 1.5rem;
  /* Intestazioni leggermente più proporzionate */
  margin-bottom: 0.8rem;
  padding-bottom: 0.3rem;
}

.member-grid p {
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

/* Ottimizzazione della lista per farla "respirare" meno in verticale */
.compact-list li {
  padding: 0.5rem 0;
  /* Ridotto rispetto allo 0.8rem originale */
  font-size: 0.95rem;
}

/* Stile a 'Badge' per i pacchetti di skill, molto più compatto del flex precedente */
.compact-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.compact-skills .skill-item {
  flex: 0 1 auto;
  /* Modificato da 1 1 auto a 0 1 auto */
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 20px;
  background: var(--light);
  border: 1px solid var(--border);
}

/* Responsive: Torna alla visualizzazione a singola colonna sui dispositivi mobili */
@media (max-width: 900px) {
  .member-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.member-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  row-gap: 0.5rem;
  column-gap: 4rem;
  max-width: 900px;
  margin: 0 auto 3rem auto;
  text-align: left;
}

.member-header:not(:has(.action-buttons)) {
  grid-template-rows: 1fr auto auto auto 1fr;
}

.member-header .member-photo {
  grid-row: 1 / span 4;
  grid-column: 1;
  margin: 0;
}

.member-header:not(:has(.action-buttons)) .member-photo {
  grid-row: 1 / span 5;
}

.member-header .member-name,
.member-header .member-title,
.member-header p.member-section,
.member-header>div {
  grid-column: 2;
  margin: 0;
}

.member-header>div {
  align-self: start;
  margin-top: 1rem !important;
}

.member-header:not(:has(.action-buttons)) .member-name {
  grid-row: 2;
  margin-bottom: -0.3rem;
}

.member-header:not(:has(.action-buttons)) .member-title {
  grid-row: 3;
  margin-bottom: 0.5rem;
}

.member-header:not(:has(.action-buttons)) p.member-section {
  grid-row: 4;
}

.member-photo {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  object-fit: cover;
  border: 4px solid var(--primary);
  border-radius: var(--radius-round);
  box-shadow: var(--shadow-hover);
}

.member-name {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 2.5rem;
}

.member-title {
  margin-bottom: 1.5rem;
  color: var(--gray);
  font-size: 1.2rem;
  font-weight: 500;
}

.member-content {
  padding-top: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.member-section {
  margin-bottom: 2.5rem;
}

.member-section h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  color: var(--primary);
  font-size: 1.8rem;
}

.member-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.skill-item {
  box-sizing: border-box;
  flex: 0 0 calc(25% - 0.75rem);
  padding: 1rem;
  background: var(--light);
  border-radius: var(--radius-sm);
  color: var(--dark);
  font-weight: 500;
  text-align: center;

  /* --- Nuove regole --- */
  position: relative;
  /* Serve come ancoraggio per il riflesso di luce */
  overflow: hidden;
  /* Impedisce al riflesso di uscire fuori dai bordi della chip */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Rende lo zoom fluido */
}

/* Lieve zoom e un'ombra per dare profondità */
.skill-item:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Creazione del fascio di luce (invisibile di default perché spostato a sinistra) */
.skill-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.5) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  /* Inclina il fascio di luce per un effetto più naturale */
}

/* Attiva l'animazione in loop quando il mouse è sopra la chip */
.skill-item:hover::before {
  animation: glass-shine 1.5s infinite;
}

.certifications-list {
  padding: 0;
  list-style: none;
}

/* 
Certifications List con suddivisione di colonne
.certifications-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.certifications-list li::before {
  content: "✓";
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: bold;
} */

.certifications-list li {
  position: relative;
  padding: 0.8rem 0 0.8rem 2rem;
  /* 2rem crea lo spazio a sinistra per la spunta */
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  /* Migliora la leggibilità su più righe */
}

.certifications-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.8rem;
  /* Allinea la spunta in alto con la prima riga di testo */
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: bold;
}

.back-to-team {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.1rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
  width: fit-content;
  /* Impedisce al bottone di allungarsi occupando tutto lo spazio */
}

.back-to-team:hover {
  background: var(--primary);
  color: var(--white);
}

@media (max-width: 900px) {
  .skill-item {
    flex: 0 0 calc(33.333% - 0.67rem);
  }
}

@media (max-width: 768px) {

  .member-header,
  .member-header:not(:has(.action-buttons)) {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    text-align: center;
  }

  .member-header .member-photo,
  .member-header:not(:has(.action-buttons)) .member-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem auto !important;
  }

  .member-header:not(:has(.action-buttons)) .member-name {
    margin-bottom: 0.5rem !important;
  }

  .member-header:not(:has(.action-buttons)) .member-title {
    margin-bottom: 1.5rem !important;
  }

  .member-name {
    font-size: 2rem;
  }

  .skill-item {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .skill-item {
    flex: 0 0 100%;
  }
}

/* --- Partners & Certs --- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 0;
}

.cert-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: left;
  transition: var(--transition);
}

.cert-card:hover {
  border-style: solid;
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.cert-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.cert-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 6px;
  object-fit: contain;
  background: var(--light);
  border-radius: var(--radius-sm);
}

.cert-card h4 {
  margin: 0;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.cert-card p {
  margin: 0;
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.5;
}

.logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  opacity: 0.85;
}

.logo-item {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  background: var(--light);
  border-radius: 10px;
  transition: var(--transition);
  /* Evita selezione e drag nativo */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.logo-item img {
  max-height: 40px;
  object-fit: contain;
}

/* --- Customers Section --- */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: center;
  justify-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.customers-grid .logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 180px;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  opacity: 0.85;
  transition: var(--transition);
}

.customers-grid .logo-item:hover {
  border-color: var(--primary);
  opacity: 1;
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.customers-grid .logo-item img {
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: var(--transition);
}

.customers-grid .logo-item:hover img {
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .customers-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
  }

  .customers-grid .logo-item {
    padding: 0.8rem;
  }

  .customers-grid .logo-item img {
    max-height: 50px;
  }
}

/* --- Grant Carousel Slider --- */
.grants-slider {
  width: 100%;
  margin-top: 2.5rem;
  padding: 0.5rem 0;
  overflow: hidden;
}

.grants-track {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
}

.grant-card {
  display: flex;
  flex: 0 0 calc((100% - (3 * 1.5rem)) / 4);
  flex-direction: column;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  /* Evita selezione e drag nativo */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.grant-card:hover {
  border-color: var(--secondary-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.grant-badge-wrapper {
  margin-bottom: 1rem;
}

.grant-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.grant-card-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 45px;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.grant-img {
  width: auto;
  max-height: 35px;
  object-fit: contain;
}

.grant-card-content h3 {
  margin-bottom: 0.6rem;
  color: var(--dark);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.grant-card-content p {
  margin: 0;
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .grant-card {
    flex: 0 0 calc((100% - 1.5rem) / 2);
  }
}

@media (max-width: 600px) {
  .grant-card {
    flex: 0 0 100%;
  }
}

/* --- Products Template --- */
.product-hero {
  margin-bottom: 1.5rem;
  padding: 1.5rem 0;
  background: var(--primary);
  color: var(--white);
  text-align: center;
}

.product-hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

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

.product-content {
  max-width: 1000px;
  margin: 0 auto;
}

.product-section {
  margin-bottom: 2rem;
}

.product-section h2 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 700;
}

.product-section p {
  margin-bottom: 1.2rem;
  color: var(--gray);
  line-height: 1.8;
}

.product-image {
  width: 100%;
  margin: 1.5rem 0;
  border-radius: var(--radius);
}

.overview-images {
  --overview-img-size: 320px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.overview-images .product-image {
  flex: 0 1 auto;
  width: var(--overview-img-size);
  max-width: 100%;
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-item {
  padding: 1.5rem;
  background: var(--light);
  border-radius: var(--radius);
}

.feature-item h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.1rem;
}

.feature-item p {
  margin: 0;
  font-size: 0.95rem;
}

.applications-list {
  margin-left: 2rem;
  color: var(--gray);
  line-height: 2;
}

.specs-table {
  width: 100%;
  margin: 2rem 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.specs-table th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.overview-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
}

.overview-gallery {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  touch-action: pan-y;
}

.overview-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.overview-gallery-track img {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: var(--z-ui);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  border-radius: var(--radius-round);
  color: var(--primary-dark);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: var(--transition);
}

.gallery-arrow:hover {
  color: var(--primary);
}

.gallery-arrow.prev {
  left: 12px;
}

.gallery-arrow.next {
  right: 12px;
}

.gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: var(--z-ui);
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transform: translateX(-50%);
  transition: var(--transition);
}

.overview-gallery:hover .gallery-arrow,
.overview-gallery:hover .gallery-dots {
  opacity: 1;
}

.gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: color-mix(in srgb, var(--primary-dark) 45%, transparent);
  border: none;
  border-radius: var(--radius-round);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-dot.active {
  background: var(--primary-dark);
  transform: scale(1.3);
}

@media (max-width: 900px) {
  .overview-split {
    grid-template-columns: 1fr;
  }

  .overview-gallery {
    order: -1;
  }
}

@media (max-width: 768px) {
  .product-page {
    padding: 4rem 0 3rem;
  }

  .product-hero {
    padding: 3rem 0;
  }

  .specs-table th,
  .specs-table td {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .overview-images {
    --overview-img-size: 100%;
  }
}

/* --- Customer Success Stories (Marquee) --- */
.clients-marquee {
  display: flex;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  mask-image: none;
  -webkit-mask-image: none;
}

.clients-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
}

.clients-track.is-scrolling {
  animation: clients-scroll var(--marquee-duration, 22s) linear infinite;
}

/* Nasconde i loghi clonati quando lo scorrimento è disattivato.
   In questo modo il flexbox centrerà le sole 4 card originali senza tagliarle! */
.clients-track:not(.is-scrolling)>[aria-hidden="true"] {
  display: none !important;
}

.clients-marquee:has(.is-scrolling) {
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.clients-marquee:hover .clients-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .clients-track {
    animation: none;
  }
}

.client-card {
  display: flex;
  flex: 0 0 170px;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.8rem 1rem;
  background: var(--light);
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
}

.client-logo img {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition);
}

.client-card:hover .client-logo img {
  filter: grayscale(0%);
  opacity: 1;
}

.logo-placeholder {
  display: none;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius-round);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
}

.client-name {
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

/* --- CTA Box & Socials --- */
.cta-box {
  max-width: 900px;
  margin: 3rem auto 0 auto;
  padding: 3rem 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.cta-box h3 {
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: clamp(1.5rem, 3vw, 1.8rem);
}

.cta-box p {
  max-width: 650px;
  margin: 0 auto 2rem auto;
  color: var(--gray);
  line-height: 1.7;
}

.cta-box .btn {
  width: auto !important;
  padding: 0.8rem 2.5rem;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(36, 93, 162, 0.2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.back-link:hover {
  background: var(--primary);
  color: var(--white);
}

/* Snippet per Contacts Grid */
.contact-grid {
  display: grid;
  /* Partiamo forzando 3 colonne piene */
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Quando lo spazio diventa insufficiente per 3 (es. iPad verticale o Mobile orizzontale),
   passa DIRETTAMENTE a 1 singola colonna senza step intermedi */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    /* Centra le card orizzontalmente nel contenitore */
  }

  .contact-grid .card {
    width: 100%;
    /* Impedisce alla card di estendersi per tutto lo schermo */
    max-width: 450px;
  }
}

.obfuscated-link {
  display: inline-block;
  cursor: pointer;
}

.obfuscated-text {
  display: inline-block;
  direction: rtl;
  unicode-bidi: bidi-override;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gray);
  font-weight: 500;
  transition: var(--transition);
}

.social-list a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* --- Stakeholders Sliders --- */
.logos-slider {
  --gap: 1.5rem;
  --cols: 5;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.5rem 0;
  overflow: hidden;
}

.logos-track {
  display: inline-flex;
  gap: var(--gap);
  will-change: transform;
}

.logos-slider:hover .logos-track {
  animation-play-state: paused !important;
}

.logo-column {
  --column-width: calc((100vw - 3rem - (var(--cols) - 1) * var(--gap)) / var(--cols));
  display: flex;
  flex: 0 0 var(--column-width);
  flex-direction: column;
  flex-shrink: 0;
  gap: 1.2rem;
  width: var(--column-width);
}

.logo-column .logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 95px;
  padding: 1.2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.logo-column .logo-item:hover {
  border-color: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.logo-column .logo-item img {
  width: auto;
  max-width: 100%;
  max-height: 55px;
  object-fit: contain;
}

@media (min-width: 1200px) {
  .logo-column {
    --column-width: calc((1200px - 32px - (var(--cols) - 1) * var(--gap)) / var(--cols));
  }
}

@media (max-width: 1200px) {
  .logos-slider {
    --cols: 4;
  }
}

@media (max-width: 992px) {
  .logos-slider {
    --cols: 3;
  }
}

@media (max-width: 768px) {
  .logos-slider {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  .logos-slider::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 600px) {
  .logos-slider {
    --cols: 2;
  }
}

/* --- Privacy Policy --- */
.privacy-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.privacy-document {
  padding: 3rem 4rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.privacy-updated {
  display: block;
  margin-bottom: 2rem;
  color: var(--gray);
  font-style: italic;
}

.privacy-document h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  font-size: 1.3rem;
}

.privacy-document h3:first-of-type {
  margin-top: 1rem;
}

.privacy-document p,
.privacy-document li {
  margin-bottom: 1rem;
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.8;
}

.privacy-document ul {
  margin: 0.5rem 0 1.5rem;
  padding-left: 1.5rem;
}

.privacy-document strong {
  color: var(--dark);
}

.privacy-document a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.privacy-document a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.back-home:hover {
  background: var(--primary);
  color: var(--white);
}

@media (max-width: 768px) {
  .privacy-document {
    padding: 2rem 1.5rem;
  }
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  padding: 4.5rem 0 2.5rem;
  background: var(--dark);
  color: var(--white);
}

/* Snippet per il Footer */
.footer-grid {
  display: grid;
  /* Proporzioni native per il Desktop */
  grid-template-columns: 2.2fr 1fr 0.7fr 1.3fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-col {
  text-align: left;
}

.footer-col:first-child p {
  max-width: 380px;
}

.footer-col h3 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.2rem;
}

.footer-col p,
.footer-col a {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--footer-text);
  font-size: 0.95rem;
}

.footer-col a {
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-socials {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.footer-socials a {
  display: inline-flex;
  color: var(--footer-text);
  transition: var(--transition);
}

.footer-socials a:hover {
  color: var(--white);
  transform: scale(1.15);
}

.copyright {
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: var(--footer-copyright);
  font-size: 0.85rem;
  text-align: center;
}

.copyright a:hover {
  color: var(--footer-text);
}

/*
   @media (max-width: 1024px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
*/

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: left;
    /* Forza l'allineamento a sinistra */
  }

  .footer-col {
    text-align: left;
  }

  /* Assicura che i testi scorrano per tutta la larghezza disponibile senza centrarsi */
  .footer-col:first-child p {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  /* Allinea i social a sinistra */
  .footer-socials {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}