/* 
  =========================================
  1. FONT & VARIABILI: MINIMALISMO TECNICO
  =========================================
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg-dark: #0a0a0b;       /* Nero opaco pulito da garage */
  --bg-charcoal: #121315;   /* Grigio carbone */
  --red-race: #e31b23;      /* Rosso preciso Zannori, meno neon */
  --red-glow: rgba(227, 27, 35, 0.25);
  --text-main: #f8f9fa;     /* Bianco metallico */
  --text-muted: #7c808c;    /* Grigio bullone */
  --font-main: 'Inter', sans-serif;
  --font-titles: 'Space Grotesk', sans-serif;
}

/* Reset Strutturale */
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* Selezione testo pulita */
::selection {
  background: var(--red-race);
  color: #fff;
}

/* Modifica globale dei Titoli: puliti ed eleganti */
h1, h2, h3, h4, h5, h6, .fw-black {
  font-family: var(--font-titles) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

/* 
  =========================================
  2. CHICCA WOW: FILO D'OLIO MOTORE (Destra)
  =========================================
*/
body::after {
  content: "";
  position: absolute;
  top: 0;
  right: 4%;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(15, 12, 10, 0.95) 0%, 
    rgba(227, 27, 35, 0.15) 15%, 
    rgba(34, 25, 18, 0.95) 50%, 
    rgba(10, 7, 5, 1) 100%
  );
  box-shadow: 
    -3px 0 12px rgba(0,0,0,0.9),
    2px 0 6px rgba(227, 27, 35, 0.1),
    inset 1px 0 2px rgba(255,255,255,0.25);
  z-index: 9999;
  pointer-events: none;
}

/* 
  =========================================
  3. NAVBAR & TOPBAR: TEXTURE MECCANICA
  =========================================
*/
.topbar {
  background: #020202;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.topbar .social-link {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color 0.2s ease, transform 0.2s ease;
}
.topbar .social-link:hover {
  color: var(--red-race);
  transform: scale(1.15);
}

.nav-glass {
  backdrop-filter: blur(20px);
  background-color: rgba(12, 13, 16, 0.88);
  /* Pattern geometrico compatto che simula la gomma incisa */
  background-image: 
    linear-gradient(45deg, rgba(0, 0, 0, 0.15) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.15) 75%, rgba(0, 0, 0, 0.15)),
    linear-gradient(45deg, rgba(0, 0, 0, 0.15) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.15) 75%, rgba(0, 0, 0, 0.15));
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
  border-bottom: 2px solid rgba(227, 27, 35, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: border-color 0.4s ease;
}
.nav-glass:hover {
  border-bottom-color: var(--red-race);
}

.navbar-nav .nav-link {
  color: var(--text-main);
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  text-uppercase: uppercase;
  position: relative;
  transition: color 0.3s ease;
}
.navbar-nav .nav-link:hover {
  color: var(--red-race);
}
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red-race);
  transition: width 0.3s ease;
}
.navbar-nav .nav-link:hover::after {
  width: 100%;
}

/* Bottoni stile Officina Tecnica */
.btn-tech {
  font-family: var(--font-titles);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.btn-danger.btn-tech {
  background: var(--red-race);
  border: 1px solid transparent;
  box-shadow: 0 4px 15px rgba(227, 27, 35, 0.3);
}
.btn-danger.btn-tech:hover {
  background: #bd1219;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(227, 27, 35, 0.5);
}
.btn-outline-light.btn-tech {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}
.btn-outline-light.btn-tech:hover {
  background: var(--text-main);
  color: var(--bg-dark);
  transform: translateY(-2px);
}

/* 
  =========================================
  4. HERO SECTION: GRIGLIA CON RUOTA A DESTRA
  =========================================
*/
.hero {
  min-height: 85vh;
  background: 
    radial-gradient(circle at 85% 30%, rgba(227, 27, 35, 0.06), transparent 45%),
    var(--bg-dark);
  padding: 100px 0;
}

.kicker {
  font-family: var(--font-titles);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  background: rgba(227, 27, 35, 0.06);
  border: 1px solid rgba(227, 27, 35, 0.2);
  color: var(--text-main);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}
.dot-red {
  width: 6px; height: 6px; background: var(--red-race);
  border-radius: 50%; display: inline-block; margin-right: 8px;
  box-shadow: 0 0 10px var(--red-race);
  animation: blink 1.5s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 0.4; } 50% { opacity: 1; }
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 40%, var(--red-race) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Spazio e Stile per la Ruota Ingrandita a destra */
.wheel-interactive-container {
  position: relative;
  display: inline-block;
  padding: 10px;
  max-width: 680px; /* Incrementato lo spazio massimo */
  width: 100%;
}
.tech-circle-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 110%; height: 110%;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 65%);
  z-index: 1;
  pointer-events: none;
}
.wheel-img {
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  max-width: 590px; /* Ruota decisamente più grande e visibile */
  filter: drop-shadow(0 25px 60px rgba(0, 0, 0, 0.9));
  transform-origin: center center !important;
  will-change: transform;
}

/* Bagliori soffusi nello sfondo della pagina */
.glow-blob {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.2;
  z-index: 1;
}
.b1 { top: -10%; left: -10%; background: var(--red-race); }
.b2 { bottom: -10%; right: -5%; background: #000; }

/* 
  =========================================
  5. SERVIZI: SCATTO MECCANICO (HOVER)
  =========================================
*/
.bg-charcoal { background-color: var(--bg-charcoal); }
.section-padding { padding: 90px 0; }

.service-card {
  background: #17181c;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.15s ease, box-shadow 0.15s ease;
}
.service-card:hover {
  transform: scale(1.02) translateY(-3px);
  border-color: var(--red-race);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(227, 27, 35, 0.15);
}

.icon-box {
  width: 54px; height: 54px;
  background: rgba(227, 27, 35, 0.05);
  border: 1px solid rgba(227, 27, 35, 0.2);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  color: var(--red-race);
  transition: all 0.2s ease;
}
.service-card:hover .icon-box {
  background: var(--red-race);
  color: #fff;
  transform: rotate(15deg) scale(1.05);
  box-shadow: 0 0 15px var(--red-race);
}

.red-gradient-card {
  background: linear-gradient(145deg, #1c1011 0%, #121316 100%);
  border: 1px solid rgba(227, 27, 35, 0.15);
}

/* 
  =========================================
  6. SEZIONI BIANCHE CON TRACCIA DI FRENATA
  =========================================
*/
.bg-manual-white {
  background-color: #f4f4f6; /* Sfondo stile carta/scheda tecnica */
  color: #111215 !important;
}

.tire-track {
  position: absolute;
  top: -10%; left: -5%; width: 120%; height: 120%;
  pointer-events: none; opacity: 0.06; transform: rotate(-6deg);
  /* SVG del battistrada leggero */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cpath d='M0 5 h30 l15 10 h-30 z M45 5 h30 l-15 10 h-30 z M5 25 h30 l15 10 h-30 z M50 25 h30 l-15 10 h-30 z' fill='%23000000'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center center; background-size: 140px auto;
  mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
}

.paper-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 35px;
  height: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  position: relative;
  z-index: 3;
}
.paper-num {
  font-family: var(--font-titles);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red-race);
  margin-bottom: 15px;
}
.tech-tag-dark {
  font-family: var(--font-titles);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: #111215;
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  display: inline-block;
}
.tech-list-dark li {
  color: #111215;
  font-weight: 500;
}

/* 
  =========================================
  7. PROGETTO SIGNATURE (FIAT 127)
  =========================================
*/
.bg-black { background-color: var(--bg-dark); }
.project-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}
.project-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 7, 8, 0.8) 0%, transparent 40%);
}
.custom-poster {
  width: 100%; height: auto; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-frame:hover .custom-poster { transform: scale(1.04); }

.tech-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-family: var(--font-titles);
  font-size: 0.7rem;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
}

.gallery-wrapper {
  border-radius: 10px; overflow: hidden; aspect-ratio: 4/3;
  border: 1px solid rgba(255, 255, 255, 0.04); background: #17181c;
}
.gallery-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease; filter: grayscale(30%);
}
.gallery-wrapper:hover .gallery-img { transform: scale(1.08); filter: grayscale(0%); }

/* 
  =========================================
  8. CHI SIAMO, CONTATTI & ELEMENTI FISSI
  =========================================
*/
.photo-container-tech {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}
.photo-placeholder-dark {
  background: linear-gradient(135deg, #131419 0%, #0c0d10 100%);
  min-height: 360px; display: flex; flex-direction: column;
  justify-content: center; align-items: center; padding: 30px; text-align: center;
}
.tech-list li { margin-bottom: 15px; color: var(--text-muted); font-size: 1.05rem; }

.contact-box-modern {
  background: #17181c; border: 1px solid rgba(255, 255, 255, 0.03); border-radius: 12px;
  transition: border-color 0.3s ease;
}
.contact-box-modern:hover { border-color: rgba(255, 255, 255, 0.1); }
.contact-icon { width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center; font-size: 1.25rem; }

.map-wrapper { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); height: 100%; }
.map-wrapper iframe { filter: invert(90%) hue-rotate(180deg) opacity(0.85); }

/* Logo del brand posizionato nel Footer */
.footer-logo-custom {
  height: 70px;
  width: auto;
  object-fit: contain;
  opacity: 0.6;
  filter: grayscale(20%);
  transition: opacity 0.3s ease;
}
.footer-logo-custom:hover { opacity: 1; }

/* Floating WhatsApp fissato a sinistra per non collidere con la goccia */
.fab-whatsapp-fixed { position: fixed; left: 24px; bottom: 24px; z-index: 999; }
.whatsapp-btn-float {
  width: 56px; height: 56px; background: #25d366; color: #fff; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; text-decoration: none;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-btn-float:hover { transform: scale(1.1) rotate(10deg); color: #fff; }

/* 
  =========================================
  EFFETTO FOTO STRAPPATA (OFF ROAD)
  =========================================
*/
.ripped-photo-container {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  /* Una leggera ombra morbida sotto la foto per farla sembrare sollevata dalla carta */
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.15));
  transform: rotate(1.5deg); /* Leggermente storta per dare l'idea di una foto buttata sul banco */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ripped-photo-container:hover {
  transform: rotate(-0.5deg) scale(1.01); /* Si muove leggermente quando ci passi sopra */
}

.ripped-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  
  /* Crea lo strappo irregolare usando una maschera SVG generativa */
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='none'%3E%3Cpath d='M3,4 Q15,2 35,5 T75,3 T120,6 T170,2 T220,5 T280,3 T330,6 T380,2 T396,4 L397,295 Q380,297 350,294 T290,296 T220,293 T160,297 T100,294 T50,296 T3,293 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='none'%3E%3Cpath d='M3,4 Q15,2 35,5 T75,3 T120,6 T170,2 T220,5 T280,3 T330,6 T380,2 T396,4 L397,295 Q380,297 350,294 T290,296 T220,293 T160,297 T100,294 T50,296 T3,293 Z' fill='%23000'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
}

/* Dettaglio: Il nastro adesivo/etichetta da officina sopra la foto */
.photo-tape {
  position: absolute;
  top: -12px;
  left: 25px;
  background: #111215;
  color: #fff;
  font-family: var(--font-titles);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  transform: rotate(-3deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-left: 3px solid var(--red-race); /* Un richiamo al rosso del brand */
}

/* 
  =========================================
  EFFETTO HOVER ANTEPRIME INSTAGRAM
  =========================================
*/
.ig-preview-box {
  position: relative;
  aspect-ratio: 1 / 1; /* Rende le foto perfettamente quadrate stile Instagram */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: #17181c;
}

.ig-preview-box img {
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: grayscale(15%) brightness(0.9); /* Effetto vintage e meccanico di base */
}

/* Velatura scura con icona che appare al passaggio del mouse o al touch */
.ig-overlay {
  position: absolute;
  inset: 0;
  background: rgba(227, 27, 35, 0.25); /* Una sfumatura del rosso del brand */
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

/* Quando l'utente ci passa sopra, la foto si accende, zooma leggermente e mostra il logo IG */
.ig-preview-link:hover .ig-overlay {
  opacity: 1;
}

.ig-preview-link:hover .ig-preview-box img {
  transform: scale(1.05);
  filter: grayscale(0%) brightness(1);
}

*/
.officina-slider-wrapper {
  position: relative;
  background: #111215;
  padding-bottom: 10px;
}

.officina-slider-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3; /* Imposta una dimensione fissa e pulita per entrambe le foto */
  object-fit: cover;
  display: block;
  border-radius: 12px;
  transition: opacity 0.3s ease; /* Effetto sfumato morbido al cambio foto */
}

/* Pulsantini (pallini) sotto la foto */
.btn-slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Il pallino della foto attualmente visibile diventa rosso corsa */
.btn-slider-dot.active {
  background: var(--red-race);
  border-color: var(--red-race);
  transform: scale(1.2);
  box-shadow: 0 0 8px var(--red-race);
}

.btn-slider-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.4);
}

/* 
  =========================================
  HERO SECTION: IL GARAGE DIGITALE CON FOTO IN TRASPARENZA
  =========================================
*/
.hero {
  min-height: 85vh;
  position: relative;
  padding: 100px 0;
  background-color: var(--bg-dark);
  
  /* Sovrapponiamo i gradienti di luce e ombra sopra la foto dell'officina */
  background-image: 
    radial-gradient(circle at 85% 30%, rgba(227, 27, 35, 0.05), transparent 45%), /* Luce rossa neon */
    radial-gradient(circle at 30% 50%, rgba(10, 10, 11, 0.85) 20%, rgba(10, 10, 11, 0.98) 80%), /* Ombra scura per proteggere il testo a sinistra */
    url('../img/officina-1.jpg'); /* La tua foto di sfondo */
    
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed; /* Effetto parallasse premium: la foto resta fissa mentre il sito si muove */
  
  /* Un leggero filtro per rendere la foto scura, quasi monocromatica, e integrarsi nel total black */
  filter: brightness(1.2) contrast(1.25);
}

/* 
  =========================================
  BANNER COOKIE FISSO (INTERFACCIA HARDWARE)
  =========================================
*/
.cookie-banner-fixed {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  max-width: 850px;
  margin: 0 auto;
  background: rgba(18, 19, 21, 0.96);
  backdrop-filter: blur(15px);
  z-index: 10000; /* Superiore a qualsiasi altro elemento o fluido */
  transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
  .cookie-banner-fixed {
    left: auto; /* Su PC si ancora elegantemente nell'angolo destro */
  }
}

html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
  width: 100%;
}

/* Sistema i margini negativi delle righe Bootstrap che a volte bucano lo schermo */
.row {
  --bs-gutter-x: 1.5rem;
  padding-right: 0 !important;
  padding-left: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Forza gli elementi flessibili a rimanere dentro i confini dello smartphone */
.container, .container-fluid {
  max-width: 100% !important;
  overflow-hidden: hidden;
}

