:root {
  --page-bg: #ffffff;
  --page-fg: #1a1a1a;
  --muted: #6b7280;
  --accent: #0ea5e9;
  --accent-2: #1d4ed8;
  --line: rgba(0,0,0,.1);

  --container: 1120px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--page-fg);
  background: var(--page-bg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container { width: min(var(--container), 92vw); margin: 0 auto; }
.section { padding: var(--space-6) 0; }
.hero + .section { margin-top: 0; padding-top: var(--space-6); }
.section--tight { padding: var(--space-5) 0; }
.section--minimal { padding: var(--space-2) 0; }

/* Flex utilities */
.flex { display: flex; gap: var(--space-4); }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

@media (min-width: 768px) {
  .responsive-stack { display: flex; gap: var(--space-5); }
  .responsive-stack > * { flex: 1 1 0; }
}
@media (max-width: 767.98px) {
  .responsive-stack { display: flex; flex-direction: column; gap: var(--space-4); }
}

/* Header */
.site-header {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; }
.logo { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  color: var(--page-fg); 
  text-decoration: none; 
  font-weight: 700; 
  letter-spacing: .3px; 
}
.logo-img { 
  height: 32px; 
  width: auto; 
  filter: invert(1) brightness(0.1); /* Inversione colori per tema light */
  transform: scale(1.2);
}
.logo-text { 
  font-size: 1.1rem; 
}
.primary-nav { display: flex; }
.nav-list { list-style: none; display: flex; gap: var(--space-3); margin: 0; padding: 0; }
.nav-link { color: var(--page-fg); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.nav-link:hover { background: rgba(0,0,0,.05); }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; }
.menu-toggle__bar { display: block; width: 22px; height: 2px; background: var(--page-fg); margin: 4px 0; border-radius: 2px; }

@media (max-width: 767.98px) {
  .menu-toggle { display: inline-block; }
  .primary-nav { position: absolute; inset: 56px 0 auto 0; background: rgba(255,255,255,.98); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
  .primary-nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav-list { 
    flex-direction: column; 
    padding: var(--space-3); 
    width: 100%; 
  }
  .nav-list li { 
    width: 100%; 
  }
  .nav-link { 
    display: block; 
    width: 100%; 
    padding: 16px 12px; 
    text-align: left; 
    box-sizing: border-box; 
  }
}

/* Footer */
.site-footer { border-top: 1px solid rgba(0,0,0,.08); background: #f8f9fa; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) 0; flex-wrap: wrap; }
.footer-links { list-style: none; display: flex; gap: var(--space-3); margin: 0; padding: 0; }
.footer-link { color: var(--muted); text-decoration: none; }
.footer-link:hover { color: var(--page-fg); }
.footer-copy { color: var(--muted); font-size: .95rem; }

/* Hero */
/* Hero originale (commentato per backup)
.hero { position: relative; overflow: hidden; }
.hero-video { position: relative; border-radius: 18px; overflow: hidden; }
.hero-video-element { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  min-height: 60vh;
}
.hero .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,.5)); }
.hero-content { position: absolute; inset: 0; display: flex; align-items: center; }
.hero-copy { color: #fff; padding: var(--space-5); max-width: 680px; }
*/

/* Hero fullscreen attaccato al top */
.hero { 
  position: relative; 
  overflow: hidden; 
  margin: 0; 
  width: 100vw; 
  margin-left: calc(-50vw + 50%); 
  margin-bottom: 0;
}
.hero-video { 
  position: relative; 
  overflow: hidden; 
  /* Niente border-radius per fullscreen */
  border: none;
  outline: none;
}
.hero-video-element { 
  width: 100%; 
  height: 100vh; 
  object-fit: cover; 
  display: block;
  border: none;
}
.hero .overlay { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,.5)); 
}
.hero-content { 
  position: absolute; 
  inset: 0; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}
.hero-copy { 
  color: #fff; 
  padding: var(--space-5); 
  max-width: 680px; 
  text-align: center;
}

.hero-title { margin: 0 0 8px; font-size: clamp(28px, 3.5vw, 36px); font-weight: 600; letter-spacing: -.02em; }
.hero-sub { margin: 0 0 16px; color: #f0f4ff; font-size: clamp(14px, 2.2vw, 18px); opacity: .95; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta { justify-content: center; } /* Centra i bottoni per fullscreen */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 20px; text-decoration: none; font-weight: 500; background: transparent !important; border: 1px solid rgba(0,0,0,.15); transition: all .2s ease; }
.btn:hover { background: transparent !important; border-color: var(--accent); color: var(--accent); }
.btn-primary { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-minimal-primary { 
  background: transparent; 
  color: var(--accent); 
  border: 1px solid var(--accent); 
  backdrop-filter: blur(10px);
}
.btn-minimal-primary:hover { 
  background: transparent !important; 
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary { 
  background: transparent; 
  color: #fff; 
  border: 1px solid rgba(255,255,255,.3); 
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { 
  background: transparent !important; 
  border-color: rgba(255,255,255,.5);
}

/* Intro Cards Apple-style */
.intro-cards { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 20px; 
  margin-top: var(--space-6);
}

.intro-card { 
  background: #ffffff; 
  border: 1px solid rgba(0,0,0,.08); 
  border-radius: 18px; 
  padding: 40px; 
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
}

.intro-card-title { 
  font-size: clamp(28px, 4vw, 40px); 
  font-weight: 600; 
  letter-spacing: -.02em; 
  color: var(--page-fg); 
  margin: 0 0 24px; 
  line-height: 1.1;
}

.intro-card-text { 
  font-size: 17px; 
  font-weight: 400; 
  color: var(--page-fg); 
  line-height: 1.47058; 
  margin: 0 0 16px;
}
.intro-card-text:last-child { 
  margin-bottom: 0; 
}

.intro-image-card { 
  background: #ffffff; 
  border: 1px solid rgba(0,0,0,.08); 
  border-radius: 18px; 
  padding: 20px; 
  box-shadow: 0 4px 20px rgba(0,0,0,.04); 
  display: flex; 
  align-items: center; 
  justify-content: center;
}
.intro-image-card img { 
  border-radius: 12px; 
  width: 100%; 
  height: auto;
}

@media (max-width: 767.98px) {
  .intro-cards { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }
  .intro-card { 
    padding: 30px; 
  }
  .intro-image-card { 
    display: none; 
  }
  .intro-image-card--visible-mobile {
    display: flex !important;
    margin-top: var(--space-4);
  }
}

/* Visibilità varianti mobile/desktop */
.intro-card.desktop-version { display: block !important; }
.intro-card.mobile-version { display: none !important; }

@media (max-width: 767.98px) {
  .intro-card.desktop-version { display: none !important; }
  .intro-card.mobile-version { display: block !important; }
}

/* Feature blocks */

/* Stats Section Apple-style */
/* Voxel Stats Section (design identico) */
.voxel-stats-section {
  margin: var(--space-6) 0;
}

.voxel-stats-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.voxel-stats-text {
  padding: 20px;
}

.voxel-stats-title {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 600;
  color: var(--page-fg);
  margin: 0 0 20px;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.voxel-stats-description {
  font-size: 17px;
  font-weight: 400;
  color: var(--page-fg);
  line-height: 1.47058;
  margin: 0 0 24px;
}

.voxel-stats-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--page-fg);
  border: 1px solid rgba(0,0,0,.15);
  text-decoration: none;
  border-radius: 20px;
  font-weight: 500;
  font-size: 14px;
  transition: all .2s ease;
}
.voxel-stats-btn:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.voxel-stats-card {
  background: #ffffff;
  border: 1px solid var(--accent);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}

.voxel-counters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 30px;
}

.voxel-counter-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.voxel-counter-number-line {
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.voxel-counter-number {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  color: var(--page-fg);
  line-height: 1;
  letter-spacing: -.03em;
}

.voxel-counter-suffix {
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 700;
  color: var(--page-fg);
  margin-left: 2px;
}

.voxel-counter-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--page-fg);
  margin-top: 8px;
  letter-spacing: -.01em;
}

@media (max-width: 767.98px) {
  .voxel-stats-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .voxel-stats-card {
    padding: 30px;
  }
  .voxel-counters-grid {
    gap: 20px;
  }
}

/* Partners Section Apple-style */
.partners-section { 
  margin-top: var(--space-6);
  padding-top: 40px; /* Spazio aggiuntivo prima di "Tecnologie e partner" */
}
.partners-title { 
  font-size: 21px; 
  font-weight: 600; 
  letter-spacing: -.01em; 
  color: var(--page-fg); 
  text-align: center; 
  margin: 0 0 32px;
}
.partners-grid { 
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 0 0 16px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.partners-grid::-webkit-scrollbar {
  height: 8px;
}
.partners-grid::-webkit-scrollbar-track {
  background: rgba(0,0,0,.05);
  border-radius: 4px;
}
.partners-grid::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2);
  border-radius: 4px;
}
.partners-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,.3);
}
.partner-logo { 
  flex: 0 0 auto;
  width: 160px;
  background: #ffffff; 
  border: 1px solid rgba(0,0,0,.06); 
  border-radius: 12px; 
  padding: 20px; 
  text-align: center; 
  font-size: 14px; 
  font-weight: 500; 
  color: var(--muted); 
  transition: all .2s ease; 
  min-height: 100px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}
.partner-logo-img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.partner-logo:hover { 
  border-color: rgba(0,0,0,.12); 
  transform: translateY(-1px);
}
.partner-logo:hover .partner-logo-img {
  filter: grayscale(0) opacity(1);
}

@media (max-width: 767.98px) {
  .stats-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
  .partners-section {
    margin-top: var(--space-5);
  }
  
  /* Carosello mobile ottimizzato */
  .gallery.gallery-container {
    padding: 0 16px; /* Padding minimo per frecce */
    margin: 0 -16px; /* Espandi oltre container */
  }
  
  .item-container {
    gap: 12px; /* Gap ridotto tra card */
    padding-left: 60px; /* Spazio per freccia sinistra */
    padding-right: 60px; /* Spazio per freccia destra */
  }
  
  .gallery-item-carousel {
    width: calc(100vw - 140px); /* Larghezza ottimale: full width - spazio frecce */
    max-width: 320px; /* Limite massimo */
    min-width: 280px; /* Limite minimo */
  }
  
  /* Frecce mobile ottimizzate */
  .paddlenav-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
  }
  .paddlenav-arrow-previous {
    left: 8px;
  }
  .paddlenav-arrow-next {
    right: 8px;
  }
  .paddlenav-arrow svg {
    width: 18px;
    height: 18px;
  }
  
  /* Card mobile compatte */
  .retail-spotlight-card-media {
    height: 140px;
  }
  .retail-spotlight-card-media-image {
    max-height: 80px;
    max-width: 90%;
  }
  .spotlight-text-container {
    padding: 16px;
  }
  .spotlight-headline {
    font-size: 16px;
    margin-bottom: 6px;
  }
  .spotlight-description {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .spotlight-display-date {
    font-size: 11px;
  }
}

.feature { display: flex; gap: var(--space-4); }
.feature + .feature { margin-top: calc(var(--space-5) + 32px); }
.feature:nth-child(even) { flex-direction: row-reverse; }
@media (max-width: 767.98px) { .feature, .feature:nth-child(even) { flex-direction: column; } }
.feature .media { flex: 1 1 0; }
.feature .text { flex: 1 1 0; }

/* Team cards */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (max-width: 767.98px) { .team { grid-template-columns: 1fr; } }
.card { position: relative; border-radius: 18px; overflow: hidden; background: #ffffff; box-shadow: 0 18px 44px rgba(0,0,0,.1), inset 0 0 0 1px rgba(0,0,0,.05); }
.card-media { aspect-ratio: 16/10; background: #f1f5f9; }
.card-body { padding: var(--space-4); }
.card-title { margin: 0 0 6px; font-weight: 600; letter-spacing: -.01em; }
.card-sub { margin: 0; color: var(--muted); }
.card:hover { transform: translateY(-2px); transition: transform .2s ease; }

/* Services shape */
.stage { display: flex; align-items: center; justify-content: center; padding: var(--space-4) 0; }
.square { width: min(92vw, 700px); aspect-ratio: 1/1; position: relative; border-radius: 18px; overflow: hidden; background: #ffffff; box-shadow: 0 24px 60px rgba(0,0,0,.1), inset 0 0 0 1px rgba(0,0,0,.05); perspective: 1200px; perspective-origin: 50% 50%; isolation: isolate; }
.square::after { content: ""; position: absolute; inset: 0; background: linear-gradient(45deg, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)); mix-blend-mode: multiply; opacity: .3; pointer-events: none; }
.panel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 90%, white 10%), color-mix(in oklab, var(--accent-2) 90%, white 10%)); background-blend-mode: overlay; filter: saturate(1.05); transition: transform .45s cubic-bezier(.2,.6,.2,1), box-shadow .45s ease; will-change: transform; color: #fff; text-align: center; }
.panel--a { clip-path: polygon(0 0, 100% 0, 0 100%); transform-origin: 10% 10%; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.panel--b { clip-path: polygon(100% 100%, 0 100%, 100% 0); transform-origin: 90% 90%; box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.square:hover .panel--a { transform: rotateY(8deg) rotateX(2deg); }
.square:hover .panel--b { transform: rotateY(-8deg) rotateX(-2deg); }
.content { width: 90%; max-width: 520px; padding: clamp(10px, 3vw, 18px); }
.content h3 { margin: 0 0 6px; font-size: clamp(18px, 2.6vw, 24px); }
.content p  { margin: 0; font-size: clamp(14px, 2.1vw, 16px); color: #f2f5ff; opacity: .95; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { appearance: none; border: 0; cursor: pointer; color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-2)); padding: 9px 14px; border-radius: 12px; font-weight: 600; letter-spacing: .25px; box-shadow: 0 6px 14px rgba(0,0,0,.15), inset 0 0 0 1px rgba(255,255,255,.12); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.tab:hover { transform: translateY(-1px); filter: brightness(1.05); }
.tab.active { box-shadow: 0 10px 24px rgba(0,0,0,.2), 0 0 0 2px rgba(255,255,255,.08) inset; }

/* Contact form */
.form { display: grid; gap: var(--space-3); }
.input, .textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,.12); background: #ffffff; color: var(--page-fg); transition: border-color .2s ease; }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.textarea { min-height: 140px; resize: vertical; }
.form-actions { display: flex; gap: var(--space-3); align-items: center; }

/* Simple page titles */
.page-title { margin: 0 0 var(--space-3); font-weight: 600; letter-spacing: -.01em; }

/* Services grid */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-6); }
.service-category { }
.service-item { margin-bottom: var(--space-5); }
.service-title { margin: 0 0 var(--space-2); font-size: clamp(20px, 2.6vw, 24px); font-weight: 600; color: var(--page-fg); letter-spacing: -.01em; }
.service-desc { margin: 0; font-size: clamp(14px, 2.1vw, 16px); color: var(--page-fg); line-height: 1.6; font-weight: 400; }

/* Footer Apple-style globale */
#bp-globalfooter{
  --footer-background: rgb(245, 245, 247);
  --footer-border-color: rgba(0, 0, 0, 0.16);
  --footer-text-color: rgba(0, 0, 0, 0.56);
  --footer-link-color: rgba(0, 0, 0, 0.72);
  --footer-pipe-color: rgba(0, 0, 0, 0.48);
  --footer-directory-title-color: rgba(0, 0, 0, 0.88);
  --footer-directory-title-color-hover: #000;
  --footer-section-border-color: var(--footer-border-color);
  font-size:12px;
  line-height:1.3333733333;
  font-weight:400;
  letter-spacing:-0.01em;
  font-family:"SF Pro Text","Myriad Set Pro","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
  background:var(--footer-background);
  color:var(--footer-text-color);
  min-width:1024px;
  overflow:hidden;
  position:relative;
  z-index:1;
}
@media only screen and (max-width: 1044px){ #bp-globalfooter{min-width:320px} }
#bp-globalfooter h1,#bp-globalfooter h2,#bp-globalfooter h3,#bp-globalfooter h4,#bp-globalfooter h5,#bp-globalfooter h6{ color:var(--footer-directory-title-color) }
#bp-globalfooter a{ color:var(--footer-link-color); text-decoration:none }
#bp-globalfooter a:hover{ text-decoration:underline }
#bp-globalfooter .bp-gf-content{ margin:0 auto; max-width:980px; padding:0 22px }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-content{ padding:0 16px } }
#bp-globalfooter .bp-gf-label{ position:absolute; clip:rect(1px, 1px, 1px, 1px); overflow:hidden; height:1px; width:1px; padding:0; border:0 }
#bp-globalfooter .bp-gf-directory{ display:flex; flex-wrap:nowrap; padding-top:20px; padding-bottom:28px }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory{ flex-direction:column } }
#bp-globalfooter .bp-gf-directory-column{ flex-basis:25% }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column{ flex-basis:auto } }
#bp-globalfooter .bp-gf-directory-column-section{ pointer-events:none }
@media only screen and (max-width: 833px){
  #bp-globalfooter .bp-gf-directory-column-section{ position:relative; z-index:1; overflow:hidden; pointer-events:auto; margin-left:-4px; width:calc(100% + 8px); padding:0 4px 1px; box-sizing:border-box }
  #bp-globalfooter .bp-gf-directory-column-section::after{ content:""; position:absolute; right:4px; left:4px; bottom:0; height:1px; background-color:var(--footer-section-border-color); z-index:3 }
}
#bp-globalfooter .bp-gf-directory-column-section~.bp-gf-directory-column-section{ padding-top:24px }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column-section~.bp-gf-directory-column-section{ padding-top:0 } }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column-section-title{ margin-bottom:0; } }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column-section-title-button{ padding-top:6px; padding-bottom:6px; } }
#bp-globalfooter .bp-gf-directory-column-section-title-button, #bp-globalfooter .bp-gf-directory-column-section-title>.bp-gf-directory-column-section-title-text{ font-size:12px; line-height:1.3333733333; font-weight:600; letter-spacing:-0.01em; font-family:"SF Pro Text","Myriad Set Pro","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif; margin-bottom:.8em; margin-right:20px; outline:none }
#bp-globalfooter .bp-gf-directory-column-section-title-button{ border:none; display:none; text-align:start }
@media only screen and (max-width: 833px){
  #bp-globalfooter .bp-gf-directory-column-section-title-button{ font-weight:400; display:block; margin:0; width:100%; padding-top:10px; padding-bottom:10px; color:var(--footer-directory-title-color); background:var(--footer-background); cursor:pointer; position:relative; user-select:none; z-index:2 }
  #bp-globalfooter .bp-gf-directory-column-section-title-button:hover{ color:var(--footer-directory-title-color-hover) }
}
#bp-globalfooter .bp-gf-directory-column-section-title>.bp-gf-directory-column-section-title-text{ display:block }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column-section-title>.bp-gf-directory-column-section-title-text{ display:none } }
#bp-globalfooter .bp-gf-directory-column-section-list{ margin-right:20px; list-style:none; padding:0 }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column-section-list{ margin:0; overflow:hidden; padding-top:2px; padding-bottom:8px; position:relative; top:0; left:0; width:100%; visibility:hidden; z-index:1; transform:translateY(0); max-height:0; transition: max-height 0.3s ease, visibility 0.3s ease; } }
#bp-globalfooter .bp-gf-directory-column-section-item{ display:block; pointer-events:auto; margin-bottom:.8em }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column-section-item{ margin-bottom:0 } }
#bp-globalfooter .bp-gf-directory-column-section-link{ color:var(--footer-link-color); text-decoration:none }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-directory-column-section-link{ padding:6px 14px; display:block } }
#bp-globalfooter .bp-gf-footer{ border-top:1px solid var(--footer-section-border-color); padding:17px 0 11px }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-footer{ border-top:none; } }
#bp-globalfooter .bp-gf-footer-shop{ color:var(--footer-text-color); padding-bottom:3px }
@media only screen and (max-width: 833px){ #bp-globalfooter .bp-gf-footer-shop{ padding-bottom:10px } }
#bp-globalfooter .bp-gf-footer-shop a{ color:#06c; text-decoration:underline }
#bp-globalfooter .bp-gf-footer-legal{ position:relative; top:-3px; z-index:1; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap }
@media only screen and (max-width: 1023px){ #bp-globalfooter .bp-gf-footer-legal{ flex-direction:column; align-items:flex-start } }
#bp-globalfooter .bp-gf-footer-legal-copyright{ margin-right:30px; margin-top:5px; color:var(--footer-text-color) }
#bp-globalfooter .bp-gf-footer-legal-links{ position:relative; top:-5px; margin-left:0; z-index:1; list-style:none; display:flex; gap:6px }
#bp-globalfooter .bp-gf-footer-legal-links-item{ position:relative; margin-right:6px; display:inline-block; margin-top:5px }
#bp-globalfooter .bp-gf-footer-legal-links-item:after{ content:""; position:absolute; height:10px; width:1px; background-color:var(--footer-pipe-color); margin:3px 0; right:-3px }
#bp-globalfooter .bp-gf-footer-legal-links-item:last-child:after{ display:none }
#bp-globalfooter .bp-gf-footer-legal-link{ padding:0 9px; margin-left:-9px; display:inline-block; white-space:nowrap; color:var(--footer-link-color); text-decoration:none }
#bp-globalfooter .bp-gf-footer-legal-link:hover{ text-decoration:underline }
.nowrap{white-space:nowrap}

/* Apple Card System */
.card-set { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
  display: grid; 
  gap: 20px;
}
.card-set.grid { 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-items: center; /* Centra sempre le card */
}
.card-set-full-bleed { 
  margin-top: var(--space-6);
  transition: margin-top 0.3s ease; /* Transizione fluida del margine */
}

.card-container { position: relative; }
.feature-card { }
.theme-light { }
.gallery-item { }

.card { 
  position: relative; 
  display: flex; /* Cambiato da block a flex */
  flex-direction: column; /* Layout verticale */
  background: #ffffff; 
  border-radius: 18px; 
  overflow: hidden; 
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transition: transform .3s ease, box-shadow .3s ease;
}
.tile { }
.tile-rounded { }
.card-hover:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

/* Touch feedback per mobile */
@media (pointer: coarse) {
  .card-hover:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform .1s ease;
  }
}

/* Focus states per accessibilità */
.card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Prefers-reduced-motion per card */
@media (prefers-reduced-motion: reduce) {
  .card, .card-hover:hover, .card-hover:active {
    transition: none;
    transform: none;
  }
}

.feature-card-content { 
  position: relative; 
  padding: 40px 40px 60px; 
  min-height: 280px;
  height: 100%; /* Riempie automaticamente l'altezza del contenitore */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.image-inline { }

.feature-card-copy-container { 
  flex: 1; 
}

.feature-card-copy { }

.feature-card-icon { 
  margin-bottom: 20px; 
}

.card-icon { 
  width: 56px; 
  height: 56px; 
  display: block;
}

.typography-feature-card-label,
.feature-card-label { 
  font-size: 12px; 
  font-weight: 600; 
  color: var(--muted); 
  text-transform: uppercase; 
  letter-spacing: .08em; 
  margin: 0 0 8px;
}

.feature-card-copy-stack { }

.typography-feature-card-headline,
.feature-card-headline { 
  font-size: clamp(22px, 2.8vw, 28px); 
  font-weight: 600; 
  letter-spacing: -.01em; 
  color: var(--page-fg); 
  margin: 0 0 12px; 
  line-height: 1.2;
}

.typography-feature-card-body,
.feature-card-body { 
  font-size: 17px; 
  font-weight: 400; 
  color: var(--muted); 
  margin: 0; 
  line-height: 1.47058;
}

.feature-card-image-container { 
  margin-top: auto; 
  position: relative;
}

.pin-self-bottom-center { 
  align-self: flex-end; 
}

.feature-card-image-container img { 
  width: 100%; 
  height: auto; 
  border-radius: 12px;
}

/* Card Control Button */
.card-control { 
  position: absolute; 
  top: 0; 
  right: 0; 
  bottom: 0; 
  left: 0; 
  z-index: 1; 
  text-decoration: none;
}

.card-control:focus-visible { 
  outline: 2px solid var(--accent); 
  outline-offset: 2px; 
}

.tile-button-wrapper { 
  position: absolute; 
  top: 20px; 
  right: 20px; 
  z-index: 2;
}

.tile-button-bottom-right { 
  top: auto; 
  bottom: 30px; 
}

.tile-button { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  background: transparent; /* Rimuovo il background che causa il doppio fondo */
  backdrop-filter: none; /* Rimuovo il blur che può causare artefatti */
  transition: all .3s ease;
  border: 1px solid rgba(0,0,0,.1); /* Bordo sottile per definire il bottone */
}
.tile-button-high-contrast { 
  background: rgba(0,0,0,.8); 
  border: 1px solid rgba(0,0,0,.8);
}
.card-hover:hover .tile-button { 
  background: rgba(0,0,0,.08); /* Background leggero solo su hover */
  transform: scale(1.1);
  border-color: rgba(0,0,0,.2);
}
.card-hover:hover .tile-button-high-contrast { 
  background: rgba(0,0,0,.9); 
  border-color: rgba(0,0,0,.9);
}

.icon-control { 
  width: 18px; 
  height: 18px; 
  fill: #ffffff;
}
.tile-icon { }
.icon-control-chevronright { }

/* Tablet Portrait - Transizione fluida */
@media (max-width: 1024px) and (min-width: 768px) {
  .card-set.grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 800px;
    margin: 0 auto;
    padding-top: 65px;
  }
  
  .card-container {
    max-width: 350px;
  }
  
  /* Spazio intermedio per tablet */
  .card-set-full-bleed {
    margin-top: 64px; /* Spazio intermedio tra desktop (48px) e mobile (80px) */
  }
}

/* Mobile - Card centrate in colonna singola */
@media (max-width: 767.98px) {
  .feature-card-content { 
    padding: 30px 30px 0; 
    min-height: 350px;
  }
  .card-set.grid { 
    grid-template-columns: 1fr;
    justify-items: center; /* Centra le card orizzontalmente */
    max-width: 400px; /* Limita la larghezza massima delle card */
    margin: 0 auto; /* Centra il container delle card */
    gap: 16px; /* Gap ridotto su mobile */
    padding-top: 65px;
  }
  
  /* Maggiore spazio dalla sezione "Chi è BP Nexus" quando le card sono una sotto l'altra */
  .card-set-full-bleed {
    margin-top: 80px; /* Aumentato da 48px a 80px per più respiro */
  }
  
  /* Assicura che le card abbiano una larghezza ottimale su mobile */
  .card-container {
    width: 100%;
    max-width: 360px; /* Larghezza ottimale per mobile */
  }
}

/* Mobile piccolo - Card ancora più compatte */
@media (max-width: 480px) {
  .card-set.grid {
    max-width: 100%;
    padding: 0 16px; /* Padding laterale per evitare bordi */
    padding-top: 65px;
  }
  
  .card-container {
    max-width: 320px;
  }
  
  .feature-card-content {
    padding: 24px 24px 0;
    min-height: 320px;
  }
  
  /* Spazio ancora maggiore su schermi molto piccoli per più respiro */
  .card-set-full-bleed {
    margin-top: 96px; /* Ulteriore aumento per mobile piccolo */
  }
}

/* Servizi depliant styles (spostati da inline) */
:root {
  --offset: 12.5%;
  --panel-bg: none;
}
body.cat-hardware { --accent-a:#0ea5e9; --accent-b:#475569; }
body.cat-software { --accent-a:#a855f7; --accent-b:#1d4ed8; }
body.cat-reti     { --accent-a:#10b981; --accent-b:#0ea5e9; }

.depliant { display: grid; place-items: center; padding: 16px; }
.booklet { position:relative; width:min(94vw,960px); aspect-ratio: 16/9; border-radius:18px; overflow:hidden; box-shadow:0 24px 60px rgba(0,0,0,.1),inset 0 0 0 1px rgba(0,0,0,.05); background:#ffffff; }
.face { position:absolute; inset:0; display:flex; }
.face-enter { animation:fadeSlide .45s cubic-bezier(.2,.6,.2,1); }
@keyframes fadeSlide{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.panel { position:absolute; inset:0; display:flex; padding:24px; color:#fff; }
.panel, .panel * { color:#fff !important; }
.panel::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,color-mix(in oklab,var(--accent-a) 85%,white 15%),color-mix(in oklab,var(--accent-b) 85%,white 15%));opacity:.9;z-index:-2}
.panel::after {content:"";position:absolute;inset:0;background:var(--panel-bg) center/cover;filter:saturate(1.05) contrast(1.05) brightness(.9);z-index:-3}

.panel--a{clip-path:polygon(0 0,100% 0,100% var(--offset),0 calc(100% - var(--offset) - 1px));justify-content:flex-start;align-items:flex-start}
.panel--b{clip-path:polygon(100% var(--offset),100% 100%,0 100%,0 calc(100% - var(--offset) - 1px));justify-content:flex-end;align-items:flex-end}

.content{max-width:520px;text-shadow:0 1px 3px rgba(0,0,0,.6), 0 0 2px rgba(0,0,0,1);backdrop-filter:blur(10px)}
.content h3{margin:0 0 6px;font:700 clamp(18px,2.4vw,26px)/1.2 system-ui}
.content p{margin:0;font-size:clamp(16px,2.2vw,18px);color:#fff;opacity:1;font-weight:500}

@media(max-width:720px){.booklet{aspect-ratio:3/4}} 

/* Apple Gallery Carousel - Versione Web Responsive Migliorata */
.gallery.gallery-container {
  position: relative;
  overflow: hidden;
  padding: 0 80px; /* Spazio per frecce su desktop */
  margin: 0 auto;
}

/* Responsive padding per diversi dispositivi */
@media (max-width: 1024px) {
  .gallery.gallery-container {
    padding: 0 60px;
  }
}

@media (max-width: 768px) {
  .gallery.gallery-container {
    padding: 0 50px;
  }
  
  .item-container-wrapper {
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
    /* Assicura che il contenuto sia centrato su mobile */
  }
}

@media (max-width: 480px) {
  .gallery.gallery-container {
    padding: 0 40px;
  }
}

.item-container-wrapper {
  overflow: hidden;
  position: relative;
  touch-action: pan-y pinch-zoom; /* Migliora il touch su mobile */
}

.item-container {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  gap: 20px;
  will-change: transform; /* Ottimizza le animazioni */
}

/* Responsive gap tra le card */
@media (max-width: 768px) {
  .item-container {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .item-container {
    gap: 12px;
  }
}

.gallery-item {
  flex: 0 0 auto;
  width: 300px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transition: transform .3s ease, box-shadow .3s ease;
}

.gallery-item.current {
  opacity: 1;
}

.gallery-item-carousel {
  flex: 0 0 auto;
  width: 300px;
  /* Responsive width per diversi breakpoint */
}

/* Responsive card width */
@media (max-width: 1200px) {
  .gallery-item-carousel {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .gallery-item-carousel {
    width: calc(100vw - 120px); /* Full width - spazio frecce */
    max-width: 320px;
    min-width: 260px;
    flex-shrink: 0; /* Impedisce il restringimento */
  }
}

@media (max-width: 480px) {
  .gallery-item-carousel {
    width: calc(100vw - 100px);
    max-width: 300px;
    min-width: 240px;
    flex-shrink: 0; /* Impedisce il restringimento */
  }
}

/* Spotlight Cards Apple-style - Responsivi */
.retail-spotlight-card-link {
  text-decoration: none;
  display: block;
}

.retail-spotlight-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  transition: transform .3s ease, box-shadow .3s ease;
  height: 100%; /* Assicura altezza uniforme */
}

.retail-spotlight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

.retail-spotlight-card-media {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

/* Responsive media height */
@media (max-width: 768px) {
  .retail-spotlight-card-media {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .retail-spotlight-card-media {
    height: 140px;
  }
}

.retail-spotlight-card-media-image {
  max-width: 80%;
  max-height: 100px;
  object-fit: contain;
  transition: transform .3s ease;
}

/* Override per card servizi - immagini full size */
.service-details .retail-spotlight-card-media-image {
  max-width: none !important; /* Rimuove limite larghezza */
  max-height: none !important; /* Rimuove limite altezza */
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* Copre tutto lo spazio */
}

/* Responsive image size */
@media (max-width: 768px) {
  .retail-spotlight-card-media-image {
    max-height: 80px;
  }
}

@media (max-width: 480px) {
  .retail-spotlight-card-media-image {
    max-height: 70px;
  }
}

.retail-spotlight-card:hover .retail-spotlight-card-media-image {
  transform: scale(1.05);
}

.spotlight-text-container {
  padding: 20px;
}

/* Responsive text padding */
@media (max-width: 768px) {
  .spotlight-text-container {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .spotlight-text-container {
    padding: 14px;
  }
}

.spotlight-headline {
  font-size: 18px;
  font-weight: 600;
  color: var(--page-fg);
  margin: 0 0 8px;
  letter-spacing: -.01em;
  line-height: 1.3;
}

/* Responsive headline */
@media (max-width: 768px) {
  .spotlight-headline {
    font-size: 16px;
    margin-bottom: 6px;
  }
}

.spotlight-description {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Responsive description */
@media (max-width: 768px) {
  .spotlight-description {
    font-size: 13px;
    margin-bottom: 6px;
  }
}

.spotlight-display-date {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

/* Responsive date */
@media (max-width: 768px) {
  .spotlight-display-date {
    font-size: 11px;
  }
}

/* Paddlenav Apple-style - Responsive */
.paddlenav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Responsive arrow size */
@media (max-width: 768px) {
  .paddlenav-arrow {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .paddlenav-arrow {
    width: 36px;
    height: 36px;
  }
}

.paddlenav-arrow-previous {
  left: 20px;
}

.paddlenav-arrow-next {
  right: 20px;
}

/* Responsive arrow position */
@media (max-width: 768px) {
  .paddlenav-arrow-previous {
    left: 15px;
  }
  .paddlenav-arrow-next {
    right: 15px;
  }
}

@media (max-width: 480px) {
  .paddlenav-arrow-previous {
    left: 8px;
  }
  .paddlenav-arrow-next {
    right: 8px;
  }
}

.paddlenav-arrow:hover {
  background: rgba(255,255,255,1);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  transform: translateY(-50%) scale(1.05);
}

.paddlenav-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.paddlenav-arrow:disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: not-allowed;
}

.paddlenav-arrow svg {
  width: 20px;
  height: 20px;
  fill: var(--page-fg);
  transition: transform .2s ease;
}

/* Responsive arrow icon */
@media (max-width: 768px) {
  .paddlenav-arrow svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .paddlenav-arrow svg {
    width: 16px;
    height: 16px;
  }
}

/* Indicatori di posizione (dots) */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,.2);
  cursor: pointer;
  transition: all .3s ease;
  border: none;
  padding: 0;
}

.carousel-indicator.active {
  background: var(--accent);
  transform: scale(1.2);
}

.carousel-indicator:hover {
  background: var(--accent);
  opacity: 0.7;
}

/* Responsive indicators */
@media (max-width: 768px) {
  .carousel-indicators {
    margin-top: 20px;
    gap: 6px;
  }
  .carousel-indicator {
    width: 6px;
    height: 6px;
  }
}

/* Loading state per carosello */
.carousel-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--muted);
}

.carousel-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Miglioramenti per touch devices */
@media (pointer: coarse) {
  .paddlenav-arrow {
    width: 48px;
    height: 48px;
  }
  
  .paddlenav-arrow svg {
    width: 22px;
    height: 22px;
  }
  
  .carousel-indicator {
    width: 12px;
    height: 12px;
  }
}

/* Animazioni smooth per ridimensionamento finestra */
.gallery.gallery-container,
.item-container,
.gallery-item-carousel {
  transition: all .3s ease;
}

/* Focus states per accessibilità */
.paddlenav-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-indicator:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Prefers-reduced-motion support */
@media (prefers-reduced-motion: reduce) {
  .item-container {
    transition: none;
  }
  
  .paddlenav-arrow,
  .carousel-indicator,
  .retail-spotlight-card {
    transition: none;
  }
  
  .carousel-loading::after {
    animation: none;
  }
}

/* Chi siamo - Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  align-items: start;
  grid-auto-rows: auto;
}

.team-card {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
  height: auto;
  perspective: 1000px;
  display: block;
}

.team-card-inner {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 380px; /* stabilizza area durante flip */
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  will-change: transform;
}

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

/* Stato flipped controllato via classe (mobile o esplicito) */
.team-card-flip.flipped .team-card-inner {
  transform: rotateY(180deg);
}

/* Disattiva hover su device touch */
.no-hover .team-card-flip:hover .team-card-inner {
  transform: none;
}

.team-card-front,
.team-card-back {
  position: absolute;
  inset: 0; /* assicurati che occupino tutto l'inner per evitare salti */
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  padding: var(--space-4);
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.team-card-back {
  transform: rotateY(180deg);
  justify-content: center;
}

/* Effetto bordo elettrico solo quando il retro è visibile */
.team-card-flip .team-card-inner .team-card-back::before,
.team-card-flip .team-card-inner .team-card-back::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}

/* Layer principale con filtro di spostamento turbolento */
.team-card-flip .team-card-inner .team-card-back::before {
  border: 2px solid var(--accent);
  filter: url(#bp-electric-displace);
}

/* Glow morbido per dare profondità, molto discreto */
.team-card-flip .team-card-inner .team-card-back::after {
  box-shadow: 0 0 24px rgba(221, 132, 72, 0.35), inset 0 0 0 1px rgba(221, 132, 72, 0.25);
  border-radius: 18px;
}

/* Attiva l’effetto solo quando flipped (hover desktop o classe su mobile) */
/* Attiva l'effetto solo quando flipped su desktop */
.team-card-flip:hover .team-card-inner .team-card-back::before,
.team-card-flip:hover .team-card-inner .team-card-back::after {
  opacity: 1;
}

/* Su desktop quando ha classe flipped (per consistenza) */
@media (min-width: 768px) {
  .team-card-flip.flipped .team-card-inner .team-card-back::before,
  .team-card-flip.flipped .team-card-inner .team-card-back::after {
    opacity: 1;
  }
}

/* Mobile: disabilita completamente gli effetti elettrici */
@media (max-width: 767.98px) {
  /* Disabilita sempre il filtro elettrico su mobile */
  .team-card-flip .team-card-inner .team-card-back::before {
    filter: none !important; /* Nessun filtro elettrico mai */
    transition: none !important; /* Nessuna transizione per evitare flash */
  }
  
  /* Disabilita sempre il layer glow su mobile */
  .team-card-flip .team-card-inner .team-card-back::after {
    opacity: 0 !important; /* Sempre invisibile */
    transition: none !important; /* Nessuna transizione */
  }
  
  /* Solo bordo semplice quando flipped */
  .team-card-flip.flipped .team-card-inner .team-card-back::before {
    border: 2px solid var(--accent); /* Solo bordo semplice */
    opacity: 1;
  }
}

/* Riduci l’intensità su preferenze ridotte di movimento */
@media (prefers-reduced-motion: reduce) {
  .team-card-flip .team-card-inner .team-card-back::before {
    filter: none;
  }
}

.team-card-hover-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  opacity: 0.3;
  transition: opacity 0.2s ease;
  pointer-events: none; /* non intercetta i click */
}

.team-card-hover-hint img {
  width: 20px;
  height: 20px;
  filter: grayscale(1);
}

.team-card:hover .team-card-hover-hint {
  opacity: 0.6;
}

.team-card-flip:hover .team-card-hover-hint {
  opacity: 1;
}

.team-card-flip {
  cursor: pointer;
}

/* Mobile: icona click invece di hover */
@media (max-width: 767.98px) {
  .team-card-hover-hint img {
    content: url('../img/click.png');
  }
  
  .team-card-flip {
    cursor: default;
  }
  
  .team-card-flip:hover .team-card-inner {
    transform: none !important;
  }
  /* Forza rotazione su mobile quando presente la classe flipped, anche in stato :hover simulato */
  .team-card-flip.flipped .team-card-inner {
    transform: rotateY(180deg) !important;
  }
  /* Titoli centrati su mobile */
  .page-title,
  .section-title,
  .team-card-title {
    text-align: center;
  }
}

.team-card-media {
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.team-card-media img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.team-card-title {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--page-fg);
  margin: 0 0 var(--space-2) 0;
}

.team-card-role {
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 var(--space-3) 0;
}

.team-card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-card-specs {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-top: var(--space-2);
}

.team-card-back .team-card-description {
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin: var(--space-3) 0;
  text-align: center;
}

.spec-list {
  margin-top: var(--space-2);
}

.spec-item {
  text-align: left;
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  background: rgba(0,0,0,.02);
  border-radius: 8px;
  font-size: clamp(12px, 1.6vw, 14px);
  line-height: 1.3;
}

.spec-item:last-child {
  margin-bottom: 0;
}

.spec-item strong {
  color: var(--accent);
  font-weight: 600;
}

.team-card-description {
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Chi siamo - Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.value-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  padding: var(--space-4);
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
  text-align: center;
}

.value-title {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--page-fg);
  margin: 0 0 var(--space-3) 0;
}

.value-text {
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Section Light Background */
.section--light {
  background: #f8f9fa;
}



/* Page Subtitle */
.page-subtitle {
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  max-width: 600px;
  margin: var(--space-3) auto 0;
}

/* Section Title */
.section-title {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--page-fg);
  text-align: center;
  margin: 0 0 var(--space-2) 0;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-4);
  }
  
  .team-card-inner {
    min-height: 350px;
    height: auto;
  }
  
  .team-card-front,
  .team-card-back {
    padding: var(--space-3);
    min-height: 350px;
    height: auto;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    grid-auto-rows: auto;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .value-card {
    padding: var(--space-3);
  }
} 