/* =========================
   BASE RESET & TYPOGRAPHY
   ========================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #111;
  background-color: #fff;
}

body {
  background: #f3f4f6;
}

/* =========================
   GENERIC ELEMENTS
   ========================= */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  font-size: 0.95rem;
}

/* =========================
   HEADER – INDUSTRIAL DARK
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #121212;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  height: 85px;
}

.site-nav {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  white-space: nowrap;   /* 🔥 fondamentale */
}

.site-nav a {
  position: relative;
  font-size: 0.9rem;
  color: #fff;
  padding-bottom: 6px;
  transition: color 0.25s ease;
}

.site-nav a:hover {
  color: #f5f500;
}

/* linea gialla hover */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #f5f500;
  transition: width 0.3s ease;
}

.site-nav a:hover::after {
  width: 100%;
}

/* active state */
.site-nav a.active {
  color: #fff;
}

.site-nav a.active::after {
  width: 100%;
}

.nav-link {
  position: relative;
}

.home-services-core,
.home-repairs {
  margin-top: 3rem;
}

/* =========================
   HERO MAIN (EDITORIALE)
   ========================= */

.hero-main {
  padding: 4rem 1.5rem 2.5rem;
}

.hero-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: center;
}

.hero-main-media img {
  width: 100%;
  max-width: 300px;   /* QUESTO È IL GAME CHANGER */
  margin: 0 auto;
}

.hero-main-media {
  display: flex;
  justify-content: center;
}

.hero-main-copy {
  max-width: 520px;
}

.hero-main-eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .75rem;
  color: #777;
  margin-bottom: .75rem;
}

.hero-main-title {
  position: relative;
  padding-left: 14px;
  margin-bottom: 1.2rem;
}

/* Linea verticale */
.hero-main-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 3px;
  height: 1.1em;
  background: #f5f500;
  border-radius: 2px;
}

/* Linea orizzontale sotto */
.hero-main-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  background: #f5f500;
  margin-top: 0.8rem;
  border-radius: 2px;
}

.hero-main-sub {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.2rem;
}

.hero-main-body {
  font-size: .95rem;
  line-height: 1.65;
  color: #444;
}

.hero-main {
  animation: heroFadeIn .8s ease-out both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* mobile */
@media (max-width: 900px) {
  .hero-main-inner {
    grid-template-columns: 1fr;
  }

  .hero-main-media {
    order: 2;
  }
}

/* =========================
   HOME GALLERY (SLIDER)
   ========================= */

.home-gallery {
  padding: 2rem 1.5rem;
}

.gallery-viewport {
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
  position: relative;
}

.gallery-track {
  display: flex;
  transition: transform 0.6s ease;
}

.gallery-slide {
  flex: 0 0 100%;
}

.gallery-slide img {
  width: 100%;
  height: 450px;           /* ← CONTROLLO VISIVO */
  object-fit: cover;
}

@media (min-width: 1024px) {
  .gallery-slide img {
    height: 60vh;
  }
}

/* arrows */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.75);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
}

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

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

.gallery-viewport {
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* dots */
.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
}

.gallery-dot.active {
  background: #fff;
}

/* =========================
   SERVIZI CORE
   ========================= */

.home-services-core {
  max-width: 1200px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.home-services-core {
  max-width: 1200px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.08);
}

.service-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.95) contrast(0.95);
  transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.03);
}

.service-content {
  padding: 1.5rem;
}

.service-card h3 {
  position: relative;
  padding-left: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.service-card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 3px;
  height: 1.1em;
  background: #f5f500;
  border-radius: 2px;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #555;
}

.service-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #111;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.service-card:hover .service-link {
  opacity: 1;
}

.service-card p strong {
  font-weight: 500;
  color: #222;
}

.service-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}


/* =========================
   ALTRI SERVIZI
   ========================= */

.home-services-other {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.services-other-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem;
}

.service-mini h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 0.9rem;
}

.service-mini h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 3px;
  height: 1em;
  background: #f5f500;
}

.service-mini p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #555;
}

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

.mini-icon {
  font-size: 0.95rem;
  margin-right: 0.5rem;
  opacity: 0.7;
}

/* =========================
   DIFFERENZIAZIONE
   ========================= */

.home-differentiation {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
}

/* =========================
   CTA
   ========================= */

.home-cta {
  text-align: center;
  padding: 2rem 1rem;
  background: #f5f5f5;
}

.home-cta .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid #111;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-slide img {
    height: 70vh;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =========================
   REPAIRS (STATIC PREVIEW)
   ========================= */

.home-repairs {
  padding: 0.5rem 1.5rem;
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: .2rem;
}

.section-header p {
  font-size: .95rem;
  color: #666;
}

.repairs-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
}

.repair-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  overflow: hidden;
}

.repair-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.repair-card h3 {
  position: relative;
  font-size: 1.05rem;
  font-weight: 600;          /* uniformiamo col core */
  margin: 1rem 1.25rem .5rem;
  padding-left: 1rem;        /* spazio per la linea */
}

.repair-card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 3px;
  height: 1.1em;
  background: #f5f500;
  border-radius: 2px;
}

.repair-card p {
  font-size: .9rem;
  line-height: 1.55;
  color: #555;
  margin: 0 1.25rem 1.5rem;
}

/* mobile */
@media (max-width: 900px) {
  .repairs-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   REPAIR CARD HOVER
   ========================= */

.repair-card {
  transition: transform .35s ease, box-shadow .35s ease;
}

.repair-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.08);
}

.repair-card img {
  transition: transform .5s ease, filter .5s ease;
}

.repair-card:hover img {
  transform: scale(1.04);
  filter: saturate(1) contrast(1);
}

/* REVEAL ON SCROLL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

section {
  scroll-margin-top: 130px;
}

html {
  scroll-behavior: smooth;
}

/* =========================
   BRAND CAROUSEL
   ========================= */

.home-brands {
  padding: 2rem 1.5rem;
  background: #f0f1f3;
}

.brands-track {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.brands-list {
  display: flex;
  align-items: center;
  gap: 3rem;
  animation: brandScroll 35s linear infinite;
  list-style: none;
  padding: 0 2rem;
  margin: 0;
}

.brands-list li {
  flex: 0 0 auto;
}

.brands-list img {
  height: 34px;                 /* QUI REGOLI LA POTENZA */
  width: auto;
  opacity: 0.6;
  filter: grayscale(1);
  transition: opacity .3s ease, filter .3s ease;
}

.brands-list img:hover {
  opacity: 1;
  filter: grayscale(0);
}


.home-brands {
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* movimento */
@keyframes brandScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* mobile */
@media (max-width: 768px) {
  .brands-list img {
    height: 26px;
  }
}

/* =========================
   CONTACTS PAGE
   ========================= */

.page-contacts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.contacts-location {
    max-width: 1200px;
    margin: 0 auto;
}
  
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    align-items: stretch;
}
  
  .contacts-intro {
    font-size: 0.95rem;
    line-height: 1.7;
}
  
.contacts-intro h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}
  
.contacts-intro h2::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 1em;
    background: #f5f500;
    margin-right: 0.6rem;
    vertical-align: middle;
}
  
.contacts-map iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
  
.contacts-intro p {
    margin-bottom: 0.8rem;
    color: #444;
}
  
.contacts-intro strong {
    font-weight: 500;
    color: #111;
}
  
.contacts-intro hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 1.5rem 0;
}

.contacts-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-grid textarea {
  grid-column: span 3;
}

.contacts-form input,
.contacts-form textarea {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
}

.contacts-form button {
  padding: 0.7rem 1.5rem;
  background: #111;
  color: #f5f500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: transform .2s ease;
}

.contacts-form button:hover {
  transform: translateY(-2px);
}

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

  .form-grid textarea {
    grid-column: span 1;
  }
}

/* =========================
    FOOTER
   ========================= */

.site-footer {
  position: relative; /* ← QUESTO MANCAVA */
  background: linear-gradient(180deg, #0f0f0f 0%, #080808 100%);
  padding: 4rem 1.5rem 2rem;
  color: #ddd;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  max-width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f5f500, transparent);
  opacity: 0.9;
}

.footer-col:first-child {
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-col {
  position: relative;
}

.footer-col:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.04);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.footer-logo {
  width: 230px;
  margin-bottom: 1rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.6rem;
}

.footer-col a {
  display: block;
  color: #aaa;
  text-decoration: none;
  margin-bottom: 0.4rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col a:hover {
  color: #f5f500;
  transform: translateX(3px);
}

.footer-vat {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 0.6rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #222;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.6;
}

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

/* =========================
    BACK TO TOP BUTTON
   ========================= */

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #111;
  color: #f5f500;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

#backToTop:hover {
  transform: translateY(-3px);
}
