/* =========================
   HERO statico (background)
   ========================= */
.df-hero{
  position: relative;
  width: 100%;
  min-height: 70vh;
  background-image: url("../img/carousel-bg-1.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80%;
}

.df-hero__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.70);
  display: flex;
  align-items: center;
  padding: 5rem 0;
}

@media (max-width: 768px){
  .df-hero{ min-height: 450px; }
  .df-hero__overlay{ padding: 4rem 0; }
}


/* =========================
   SEZIONE SERVIZI
   ========================= */
.df-services{
  position: relative;
  z-index: 10;
  margin-top: -120px;

  background: #000026;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 24px;
  padding: 3rem 1rem;
}

/* Tabs wrapper */
.df-services__tabs{
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 1.5rem 0 2.2rem;
  position: relative;
  z-index: 5;
}

/* =========================
   TAB BASE (stile "pill")
   (se usi ancora tab iconiche in altre sezioni)
   ========================= */
.df-tab{
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 1.25rem 2.2rem;

  display: inline-flex;
  align-items: center;
  gap: 1rem;

  background: rgba(40, 90, 160, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  color: #fff;
  opacity: .6;

  box-shadow:
    0 8px 20px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.25);

  transition: transform .25s ease, opacity .25s ease, background .25s ease, box-shadow .25s ease;
}

.df-tab i{
  font-size: 2.2rem;
  color: #7fb6ff;
}

.df-tab span{
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.df-tab.is-active{
  opacity: 1;
  background: rgba(70, 130, 200, 0.45);
  transform: scale(1.05);
  box-shadow:
    0 14px 35px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

/* =========================
   TAB AS CARD (Auto/Moto)
   ========================= */
.df-tab.df-tab--card{
  /* annulla stile "pill" */
  border-radius: 18px;
  padding: 0;
  gap: 0;
  opacity: 1;

  /* dimensioni card */
  width: clamp(320px, 42vw, 560px);
  height: clamp(190px, 24vw, 320px);

  position: relative;
  overflow: hidden;

 background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: block;              /* importante: niente inline-flex qui */
  box-shadow: 0 14px 35px rgba(0,0,0,0.30);

  transform: none;             /* evita conflitto con .df-tab.is-active */
}

/* overlay scuro per leggibilità */
.df-tab.df-tab--card::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.42);
  transition: background .25s ease;
}

/* titolo centrato sopra */
.df-tab.df-tab--card .df-tab__title{
  position: relative;
  z-index: 2;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* hover */
.df-tab.df-tab--card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.38);
}

.df-tab.df-tab--card:hover::before{
  background: rgba(0,0,0,0.25);
}

/* active (card): niente scale, glow pulito */
.df-tab.df-tab--card.is-active{
  box-shadow:
    0 22px 55px rgba(0,0,0,0.45),
    0 0 0 2px rgba(127, 182, 255, 0.55);
}

/* Mobile tweaks */
@media (max-width: 576px){
  .df-services{ padding: 2.2rem 1rem; }

  /* card tabs: full width */
.df-tab.df-tab--card{
  width: clamp(260px, 28vw, 360px);
  height: clamp(300px, 38vw, 420px);
}


  /* pill tabs (se presenti altrove) */
  .df-tab{
    padding: 1rem 1.6rem;
    gap: .75rem;
  }
  .df-tab i{ font-size: 1.9rem; }
  .df-tab span{
    font-size: .95rem;
    letter-spacing: .08em;
  }
}


/* =========================
   Cards grid servizi
   ========================= */
.df-cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.df-card{
  position: relative;
  height: 340px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  transition: transform .25s ease, box-shadow .25s ease;
}

.df-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.22);
}

.df-card img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.df-card__body{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.2rem 1.2rem;
  color: #fff;
  background: linear-gradient(transparent 0%, rgba(0,0,0,0.85) 45%);
}


/* Responsive grid */
@media (max-width: 992px){
  .df-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px){
  .df-cards{ grid-template-columns: 1fr; }
}
/* di default: la griglia servizi è nascosta */


/* dopo click su Auto/Moto: torna visibile e mantiene la grid */




.df-card.is-hidden { display: none !important; }

.df-tab.df-tab--card::before{
  background: rgba(0,0,0,0.38);
}
.df-tab.df-tab--card{
  background-position: center 40%;
}
/* ==================================================
   HERO BUTTONS – smartphone: 2 colonne SEMPRE
   ================================================== */
@media (max-width: 576px){

  /* contenitore */
  .df-services__tabs{
    flex-wrap: nowrap !important;        /* MAI uno sotto l’altro */
    justify-content: center;
    gap: 10px;
  }

  /* card ridotte e fluide */
  .df-tab.df-tab--card{
    flex: 0 0 46%;                        /* due card affiancate */
    max-width: 46%;
    height: auto;
    aspect-ratio: 3 / 4;                 /* proporzione elegante */
  }

  /* titolo più compatto */
  .df-tab.df-tab--card .df-tab__title{
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    text-align: center;
    padding: 0 0.5rem;
  }
}
@media (max-width: 576px){
  .df-hero{
    background-size: cover;        /* invece di 80% */
    background-position: center;   /* centrata */
    min-height: 520px;             /* evita “schiacciamenti” */
  }

  .df-hero__overlay{
    padding: 3rem 0;               /* meno padding su phone */
  }
}
@media (max-width: 576px){
  .df-hero__overlay h1{
    font-size: clamp(28px, 7vw, 40px);
    line-height: 1.05;
    margin-bottom: 10px;
  }
  .df-hero__overlay h2{
    font-size: clamp(18px, 5vw, 26px);
    line-height: 1.15;
  }
}
/* =========================================
   HERO – mobile typography tuning
   ========================================= */
@media (max-width: 576px){

  /* Logo principale */
  .df-hero__logo img{
    max-width: 260px;        /* prima era 400px */
    margin-bottom: 0.75rem;
  }

  /* Sottotitolo hero */
  .df-hero__title{
    font-size: 0.95rem;     /* MOLTO più piccolo del logo */
    letter-spacing: 0.12em;
    line-height: 1.2;
    opacity: 0.9;
  }
}
@media (max-width: 576px){
  .df-hero__title{
    font-size: 0.8rem;
    letter-spacing: 0.25em;
  }
}
/* =========================================
   HERO – payoff sempre secondario al logo
   ========================================= */
.df-hero__title{
  font-size: 0.85rem;        /* piccolo su desktop */
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1.1;
  margin-top: 0.6rem;
  opacity: 0.85;
}


@media (max-width: 576px){
  .df-hero__title{
    font-size: 0.45rem;     /* MICRO, quasi decorativo */
    letter-spacing: 0.4em;
  }
}

/* =========================================
   HERO – micro payoff FORCE mobile
   ========================================= */

/* base (desktop / tablet) */
.df-hero__title{
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  line-height: 1;
  margin-top: 0.4rem;
  opacity: 0.75;
}

/* smartphone: FORZA riduzione */
@media (max-width: 576px){
  .df-hero__overlay .df-hero__title{
    font-size: 0.60rem !important;
    letter-spacing: 0.42em;
  }
}
/* Stop overflow orizzontale (banda nera a destra su mobile) */
html, body{
  overflow-x: hidden;
  width: 100%;
}
/* =========================================
   HERO LOGO – centrato e dimensioni controllate
   ========================================= */

.df-hero__logo{
  width: 100%;
  display: flex;
  justify-content: center;   /* centratura perfetta */
  align-items: center;
}

.df-hero__logo img{
  width: 100%;
  max-width: 320px;          /* dimensione desktop */
  height: auto;
}
/* =========================================
   HERO CARDS – SHADOW PREMIUM
   ========================================= */

.df-tab.df-tab--card{
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 0 rgba(255,255,255,0);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

/* Hover */
.df-tab.df-tab--card:hover{
  transform: translateY(-6px);
  box-shadow:
    0 26px 55px rgba(0, 0, 0, 0.65),
    inset 0 0 0 rgba(255,255,255,0);
}
@media (max-width: 576px){
  .df-tab.df-tab--card{
    box-shadow: 0 14px 32px rgba(0,0,0,0.55);
  }
}
/* ==================================================
   HERO background – fix TABLET (come mobile)
   ================================================== */
@media (max-width: 991px){
  .df-hero{
    background-size: cover !important;
    background-position: center !important;
  }
}
