/* =========================================
   1. IMPORTS & VARIABLES
   ========================================= */
/* lascialo se vuoi il nuovo font */
/* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap'); */

/* commentalo se vuoi il nuovo font, lascia se vuoi il font del vecchio sito */
@import url('./font-faces.css');

/* Keyframes */
@import url('./keyframes.css');

:root {
  --primary: #245da2;
  --primary-dark: #1b4679;
  --secondary: #4a8bb5;
  --secondary-dark: #236183;
  --accent: #f5f006;
  --dark: #1f222a;
  --gray: #52646f;
  --light: #f4f7f9;
  --white: #ffffff;
  --border: #e0e4e8;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --font-main: 'Poppins', system-ui, -apple-system, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --header-offset: 76px;
}

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

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

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

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

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

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

.section {
  padding: 1rem 0;
}

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

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

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

/* --- Sottotitoli per le sezioni interne (es. Stakeholders -> Customers) --- */
/* Subsection titles - allineati a sinistra e più compatti */
.subsection-title {
  text-align: left;
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--primary-dark);
  /* Opzionale: accento visivo a sinistra */
}

.subsection-title h3 {
  font-size: 1.4rem;
  /* Più piccolo del titolo principale (2rem+) */
  color: var(--primary);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

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

/* Responsive: ulteriore riduzione su mobile */
@media (max-width: 768px) {
  .subsection-title h3 {
    font-size: 1.2rem;
  }

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.8rem;
}

/* --- Brand Cards - Rendi cliccabile l'intera icona --- */
.brand-icon {
  width: 100%;
  height: 110px;
  order: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: 10px;
  padding: 6px;
  transition: var(--transition);
  flex-shrink: 0;
}

/* Il link all'interno dell'icona occupa tutto lo spazio */
.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);
}

/* Effetto Hover ottimizzato */
.card.brand-card:hover .brand-icon {
  background: var(--primary);
}

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

/* Nascondi il tasto di chiusura su desktop */
.menu-close {
  display: none;
}

/* Per mobile: layout orizzontale con icona a destra */
@media (max-width: 768px) {
  .card.brand-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
  }

  .brand-icon {
    width: 90px;
    height: auto;
    order: 0;
    /* Riporta l'icona a destra */
  }

  /* Reset layout per profili senza bottoni */
  .member-header:not(:has(.action-buttons)) {
    grid-template-rows: auto;
  }

  .member-header:not(:has(.action-buttons)) .member-photo,
  .member-header:not(:has(.action-buttons)) .member-name,
  .member-header:not(:has(.action-buttons)) .member-title,
  .member-header:not(:has(.action-buttons)) p.member-section {
    grid-row: auto;
  }

  .member-header,
  .member-header:not(:has(.action-buttons)) {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Assicura che l'immagine spinga il testo in basso */
  .member-header .member-photo,
  .member-header:not(:has(.action-buttons)) .member-photo {
    margin: 0 auto 1.5rem auto !important;
  }

  /* Ripristina i margini corretti per i testi nel caso senza bottoni */
  .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;
  }

  .action-buttons {
    width: 100%;
  }

  .action-buttons .btn {
    /* flex-grow: 1 (si espande) | flex-shrink: 1 (si restringe) | flex-basis: auto (usa la dimensione del testo) */
    flex: 1 1 auto !important;

    width: auto !important;
    justify-content: center;

    /* È il comando chiave: impedisce al testo di spezzarsi su due righe */
    white-space: nowrap;
  }
}

.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;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  /* Rimuove lo spazio extra nativo del font */
  padding-bottom: 3px;
  /* Spinge la freccia leggermente in su. Regola tra 1px e 4px a occhio */
}

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

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

/* =========================================
   4. COMPONENTS
   ========================================= */

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

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

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

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

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

.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);
}

/* Container per allineare i bottoni affiancati */
.action-buttons {
  display: flex;
  gap: 1.2rem;
  /* Distanza tra i bottoni di circa 19px per far respirare il layout */
  margin-top: 1.5rem;
  flex-wrap: wrap;
  /* Assicura che i bottoni vadano a capo su schermi molto stretti */
}

/* Regolazione dimensionale dei bottoni per renderli più eleganti */
.action-buttons .btn {
  width: auto !important;
  /* Sovrascrive il 100% ed evita che siano larghi 400px */
  padding: 0.6rem 1.4rem;
  /* Rimpicciolisce altezza (~48px) e larghezza interna */
  font-size: 0.95rem;
  /* Testo leggermente più raffinato e compatto */
}

/* Stile per la CTA Secondaria (Sfondo trasparente, bordo e testo blu) */
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

/* Effetto Hover per la CTA Secondaria */
.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

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

.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;
  /* padding-right: 65px rimosso */
}

/* Assicuriamoci che i testi non abbiano padding laterali strani */
.card h3,
.card p {
  padding-right: 0 !important;
  /* Toglie il vecchio spazio laterale di 65px */
}

/* Stato di default: Immagine invisibile e senza ingombro */
.card-icon {
  position: relative;
  width: 100%;
  max-height: 0;
  /* L'altezza parte da zero */
  opacity: 0;
  /* Invisibile */
  overflow: hidden;
  /* Nasconde il contenuto interno */
  margin-bottom: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: 8px;
  /* Transizione fluida che fa "crescere" la card */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  top: auto;
  right: auto;
  transform: none;
}

.card p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex: 1;
  /* padding-right: 65px rimosso */
}

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

.card a:hover {
  text-decoration: underline;
}

.card a.btn:hover {
  text-decoration: none;
}

/* --- STATO DI BASE: IMMAGINE NASCOSTA E COMPRESSA --- */
.card-icon {
  position: relative !important;
  /* Annulla il vecchio position: absolute */
  top: 0 !important;
  right: 0 !important;
  width: 100% !important;
  /* Prende tutta la larghezza della card */
  max-height: 0;
  /* Parte da altezza zero */
  opacity: 0;
  /* Totalmente invisibile */
  overflow: hidden;
  /* Nasconde l'immagine che c'è dentro */
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 8px;
  transition: all 0.4s ease-in-out;
  /* Animazione fluida */
}

/* L'immagine interna ha un'altezza fissa, ma il contenitore la nasconde */
.card-icon img {
  width: auto;
  max-width: 100%;
  height: 80px;
  /* Scegli tu quanto fare grande l'immagine */
  object-fit: contain;
}

/* --- STATO HOVER: L'IMMAGINE SI ESPANDE IN ALTO --- */
.card:hover .card-icon {
  max-height: 200px;
  /* Si apre e fa spazio all'immagine */
  opacity: 1;
  /* Diventa visibile */
  margin-bottom: 1.5rem;
  /* Spinge fisicamente il titolo e il testo in basso */
  padding: 1rem;
  background: var(--light);
  /* Sfondo grigino/chiaro dietro l'immagine */
}

/* --- Brand Cards (Layout Orizzontale a Tutta Altezza) --- */
.card.brand-card {
  flex-direction: column;
  /* Dispone immagine e testo in verticale su desktop */
  justify-content: flex-start;
  align-items: stretch;
  gap: 1.5rem;
}

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

/* --- Effetto Hover ridotto per Desktop --- */
.card.brand-card:hover .brand-icon img {
  transform: scale(1.05);
  /* Ridotto dal 1.12 originale */
}

.brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Risolto l'errore del cubic-bezier */
}

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

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

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

.brand-content a:hover {
  text-decoration: underline;
}

.brand-icon {
  width: 100%;
  /* Estende il box immagine orizzontalmente in alto */
  height: 110px;
  /* Definisce un'altezza per far respirare le immagini */
  order: -1;
  /* Sposta il box immagine PRIMA del testo, aggirando l'ordine HTML */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: 10px;
  padding: 6px;
  transition: var(--transition);
  flex-shrink: 0;
}

/* --- Immagine più piccola nel box su Desktop --- */
.brand-icon img {
  width: 75%;
  /* Rimpicciolisce l'immagine lasciando più spazio vuoto ai lati */
  height: 75%;
  object-fit: contain;
  transition: var(--transition);
}

/* Effetto Hover ottimizzato per colonne grandi */
.card.brand-card:hover .brand-icon {
  background: var(--primary);
}

.card.brand-card:hover .brand-icon img {
  transform: scale(1.12);
  /* L'immagine interna si ingrandisce fluidamente */
}

/* =========================================
   5. PAGE SECTIONS
   ========================================= */

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

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

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

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

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

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

.nav-links a {
  font-weight: 500;
  font-size: 0.85rem;
  /* Dimensione ridotta rispetto allo 0.95rem originale */
}

.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;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

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

.hero-header{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:48px;
    margin-bottom:2rem;
}

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

.hero-header h1{
    margin:0;
    text-align:left;
}

.hero>* {
  position: relative;
  z-index: 2;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.about-image-col .circle {
  position: absolute;
  top: 0;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  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;
  color: #ffffff;
  font-size: 25px;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 10;
}

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

.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;
  transform: none;
  text-align: left;
  line-height: 1.1;
}

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

/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.team-card {
  text-align: center;
  background: var(--white);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

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

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

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

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

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

.team-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

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

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

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

/* --- Distribuzione verticale quando mancano i bottoni --- */

/* --- FIX: Raggruppamento e centratura quando mancano i bottoni --- */

/* Creiamo 5 righe: la 1a e la 5a sono "spazi vuoti" (1fr) che fanno da molle per centrare il testo.
   Le 3 righe centrali (auto) si "stringono" attorno ai testi per tenerli vicini. */
.member-header:not(:has(.action-buttons)) {
  grid-template-rows: 1fr auto auto auto 1fr;
}

/* La foto occupa tutte e 5 le righe */
.member-header:not(:has(.action-buttons)) .member-photo {
  grid-row: 1 / span 5;
}

/* Forziamo i testi nelle righe centrali e regoliamo i margini per avvicinarli */
.member-header:not(:has(.action-buttons)) .member-name {
  grid-row: 2;
  margin-bottom: -0.3rem;
  /* Valore negativo per avvicinare visivamente il titolo al nome */
}

.member-header:not(:has(.action-buttons)) .member-title {
  grid-row: 3;
  margin-bottom: 0.5rem;
  /* Mantiene una corretta distanza dall'email */
}

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

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

.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-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-hover);
  border: 4px solid var(--primary);
}

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

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

.member-content {
  max-width: 900px;
  margin: 0 auto;
}

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

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

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

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* Questo centrerà gli elementi dell'ultima riga */
  gap: 1rem;
  margin-top: 1rem;
}

.skill-item {
  /* MATEMATICA DEL LAYOUT: 
     100% diviso 4 colonne = 25%. 
     Sottraiamo 0.75rem per compensare i 3 gap (1rem * 3 / 4) in modo che entrino esattamente 4 elementi per riga. */
  flex: 0 0 calc(25% - 0.75rem);

  background: var(--light);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  color: var(--dark);
  box-sizing: border-box;
}

/* --- REGOLE RESPONSIVE --- 
   Avendo tolto "auto-fit" della Grid, dobbiamo dire a Flexbox come 
   comportarsi sugli schermi più piccoli per evitare che i box si schiaccino troppo */

@media (max-width: 900px) {
  .skill-item {
    /* Passa a 3 colonne su schermi medi (100% / 3 = 33.333% meno i gap) */
    flex: 0 0 calc(33.333% - 0.67rem);
  }
}

@media (max-width: 768px) {
  .skill-item {
    /* Passa a 2 colonne su tablet in verticale/mobile grande */
    flex: 0 0 calc(50% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .skill-item {
    /* Passa a 1 colonna su smartphone */
    flex: 0 0 100%;
  }
}

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

.certifications-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

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

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

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

/* --- Partners & Certs --- */
.partners-section {
  background: var(--white);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

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

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

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

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

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

.cert-card p {
  color: var(--gray);
  margin: 0;
  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 {
  background: var(--light);
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
  transition: var(--transition);
}

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

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

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

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

.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%);
}

/* --- Grants --- */
.grant-banner {
  background: linear-gradient(90deg, #e6f4ea, #f0f7ff);
  border: 1px solid #d0e3f0;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.grant-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  flex-wrap: wrap;
}

.grant-logo {
  flex: 0 0 auto;
  width: clamp(80px, 10%, 110px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.grant-logo img {
  max-height: 60px;
  object-fit: contain;
}

.grant-text {
  flex: 1 1 320px;
  min-width: 220px;
  text-align: center;
}

.grant-badge {
  background: var(--accent);
  color: var(--dark);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.grant-text h3 {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.grant-text p {
  color: var(--gray);
}

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

.footer-grid {
  display: grid;
  /* Terza colonna ridotta (0.7fr), quarta colonna allargata (1.3fr) */
  grid-template-columns: 2.2fr 1fr 0.7fr 1.3fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-col {
  /* Assicura l'allineamento a sinistra per tutte le colonne */
  text-align: left;
}

/* 2. Rimuovi il padding-right usato prima e usa max-width sul paragrafo */
.footer-col:first-child p {
  /* Limita la larghezza del testo. Regola questo valore per far 
     andare a capo il testo esattamente dove vuoi tu */
  max-width: 380px;
}

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

.footer-col p,
.footer-col a {
  color: #ccc;
  margin-bottom: 0.6rem;
  display: block;
  font-size: 0.95rem;
}

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

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

/* --- Products Template --- */
/* .product-page {
  padding: 3rem 0 2rem;
} */

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

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

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

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

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

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

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

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

/* Contenitore immagini Overview: affiancate orizzontalmente, dimensione regolabile */
.overview-images {
  /* Modifica questo valore per cambiare la dimensione delle immagini */
  --overview-img-size: 320px;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

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

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

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

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

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

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

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

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

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

/* --- Overview + Gallery (sezione unica affiancata) --- */
.overview-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.overview-gallery {
  position: relative;
  overflow: hidden;
  /* height: 420px; */
  aspect-ratio: 16 / 9;
  /* al posto di height: 420px */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--white);
}

.overview-gallery-track {
  display: flex;
  height: 100%;
  width: 100%;
  /* Lo scorrimento orizzontale e' gestito via JS con transform: translateX(...) */
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

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

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

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

.gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary-dark) 45%, transparent);
  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;
  }
}


/* =========================================
       NUOVO CUSTOMER SUCCESS STORIES
   ========================================= */

/* ============================================
     1) WRAPPER: nasconde ciò che esce dai bordi
        e sfuma i bordi sx/dx con una mask
     ============================================ */
.clients-marquee {
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
  /* Centra la track se è più corta del wrapper */

  /* La maschera sfumata serve solo se si scorre. La attiviamo via CSS condizionale */
  -webkit-mask-image: none;
  mask-image: none;
}

/* ============================================
     2) TRACK: la striscia flessibile che scorre.
        width: max-content -> non va mai a capo.
        Viene duplicata via JS per il loop infinito.
     ============================================ */
.clients-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  /* animation: clients-scroll var(--marquee-duration, 22s) linear infinite; --rimossa perché ora è gestita con isscrolling, non la fa sempre*/
}

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

/* Applica la sfumatura solo quando la track sta effettivamente scorrendo */
.clients-marquee:has(.is-scrolling) {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

/* Pausa allo hover, comodo per leggere i nomi */
.clients-marquee:hover .clients-track {
  animation-play-state: paused;
}

@keyframes clients-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }

  /* metà = un set intero, perché il set è duplicato */
}

/* Rispetta chi preferisce meno animazioni */
@media (prefers-reduced-motion: reduce) {
  .clients-track {
    animation: none;
  }
}

/* ============================================
     3) CARD: stessa grafica di prima, ma con
        larghezza fissa invece che colonna di grid
     ============================================ */
.client-card {
  flex: 0 0 170px;
  display: flex;
  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 {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.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 {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  background: var(--white);
}

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

/* Sezione Customer Success Stories 
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.client-card {
  display: flex;
  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 {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.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 {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  background: var(--white);
}

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


/* .cta-box {
  background: var(--light);
  padding: 2.5rem;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 3rem;
}

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

.cta-box p {
  color: var(--gray);
  margin-bottom: 1.5rem;
} */

.cta-box {
  background: var(--white);
  /* Usa il bianco puro con un'ombra, oppure mantieni var(--light) */
  box-shadow: var(--shadow);
  /* Aggiunge profondità */
  padding: 3rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 3rem;
  max-width: 900px;
  /* Evita che il box diventi troppo largo su desktop */
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  /* Un bordo leggero opzionale */
}

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

.cta-box p {
  color: var(--gray);
  margin: 0 auto 2rem auto;
  /* Centra il testo e aggiunge spazio sotto */
  max-width: 650px;
  /* Stringe il paragrafo per una migliore leggibilità */
  line-height: 1.7;
}

/* Corregge il bottone che attualmente prende il 100% della larghezza */
.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);
  /* Ombra colorata per il bottone */
}

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

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

/* =========================================
   6. HEROICONS SIZING
   ========================================= */
svg.w-5.h-5,
svg.w-6.h-6,
svg.size-5,
svg.size-6 {
  width: 1em;
  height: 1em;
  /* 'middle' | 'text-bottom' | 'baseline' */
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}

/* Regola Hover generale per le icone */
svg.w-5.h-5:hover,
svg.w-6.h-6:hover,
svg.size-5:hover,
svg.size-6:hover {
  color: var(--secondary);
  /* Lieve zoom (puoi regolare il valore, es. 1.1 o 1.2) */
  transform: scale(1.15);
}

/* ECCEZIONE: Disabilita l'effetto per le icone dentro i bottoni */
.action-buttons .btn svg:hover {
  color: inherit;
  /* Fa in modo che l'icona mantenga il colore dettato dal bottone */
  transform: none;
  /* Annulla l'effetto di zoom */
}

/* =========================================
   7. MEDIA QUERIES (Responsive)
   ========================================= */

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

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

/* --- Tablet / Hub Responsive Principale (max 900px) --- */
@media (max-width: 900px) {
  :root {
    --header-offset: 68px;
  }

  /* Header & Nav */
  .logo-img {
    height: 32px;
  }

  .logo {
    font-size: 1.3rem;
  }

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

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

  .menu-toggle {
    display: block;
  }

  /* Layout & Sections */
  .section {
    padding: 2rem 0;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  /* About Grid Unificato */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
  }

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

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

  .nav-links a {
    font-size: 1rem;
    /* Lo ingrandisce per facilitare il tocco da mobile */
  }

  .menu-close {
    display: block;
    position: absolute;
    /* Fondamentale per non scombinare i link */
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    padding: 0.5rem;
    line-height: 1;
    transition: var(--transition);
  }

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

/* --- Tablet in Verticale / Mobile Grande (max 768px) --- */
@media (max-width: 768px) {

  /* Team Member Page Unificata */
  .member-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .member-header .member-photo {
    grid-column: 1;
    grid-row: auto;
    margin: 0 auto 1.5rem auto;
    width: 150px;
    height: 150px;
  }

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

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

  /* Venn Diagram */
  .about-image-col .diagram-container {
    transform: none !important;
    margin-bottom: 0 !important;
  }

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

  /* Customers Grid */
  .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;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Ripristina l'effetto originale (icona laterale a destra) su mobile */
  .card.brand-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
  }

  .brand-icon {
    width: 90px;
    height: auto;
    order: 0;
    /* Riporta l'icona nella sua posizione originale a destra */
  }

  .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;
  }
}

/* --- Smartphone (max 480px) --- */
@media (max-width: 480px) {
  :root {
    --header-offset: 64px;
  }

  .logo-img {
    height: 28px;
  }

  .logo {
    font-size: 1.1rem;
    gap: 0.3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}