/* ===== SERVIZI (sfondo bianco sotto + card 4 per riga) ===== */
    .services{
      background: #f3f4f6;
      padding: 80px 0;
    }

    /*.cards-wrap{
      margin-top: -120px; /* overlap sul blu 
    }*/
    /*@media (max-width: 768px){
    .cards-wrap{
        margin-top: -60px;
    }
    }*/
    .cards{
         position: relative;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;              /* meno spazio laterale */
  max-width: 1040px;      /* 👈 stringe il blocco */
  margin: 0 auto;         /* centra */
    }
    .card{ position: relative;
      background:#fff;
      border-radius: var(--radiusCard);
      box-shadow: var(--shadow);
      padding: 18px 18px 14px;
      text-align:center;
      border: 1px solid rgba(0,0,0,.03);
      z-index: 1;
    }
    .card h3{
    margin: 6px 0 12px;
    font-size: 16px;
    letter-spacing: .02em;
    font-weight: 700;
    text-transform: uppercase;
    color: #111827;
    }
    .card img{
      width: 86%;
      max-width: 230px;
      height: 140px;
      object-fit: contain;
      margin: 0 auto 10px;
      display:block;
    }
    .card p{
      margin: 0 auto 18px;
      color: #6b7280;
      font-size: 16px;
      line-height: 1.55;
      font-weight: 450;

      display: -webkit-box;
      -webkit-box-orient: vertical;

      /* standard (futuro) */
      line-clamp: 2;

      /* attuale (funzionante) */
      -webkit-line-clamp: 2;

      overflow: hidden;

      max-height: calc(1.55em * 2);
    }
    .card .btn-card{
      display:block;
      width:100%;
      height: 34px;
      line-height: 34px;
      border-radius: 10px;
      background: var(--btnBlue);
      color:#fff;
      font-weight: 600;
      font-size: 14px;
    }
    .card .btn-card:hover{ background: var(--btnBlueHover); }

    /*.cards-wrap{
  margin-top: -120px;   /* regola tra -80 e -140 
  position: relative;
  z-index: 2;
}*/

/* CARD: stato ACTIVE */
.card.active{
  position: relative;
  z-index: 10; /* 👈 sopra le altre */

  border-color: #0b6fb8;
  /* sfondo più luminoso rispetto alle altre */
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #eaf3fb 100%
  );

  border: 1px solid #0b6fb8;

  box-shadow:
    0 24px 60px rgba(11,111,184,.35),
    0 12px 28px rgba(0,0,0,.22);

  transform: translateY(-14px) scale(1.02);
}

.card.active h3{
  color: #0b6fb8;
}
.card.active p{
  color: #334155; /* leggermente più scuro */
}

.card.active .btn-card{
  background: #0b6fb8;
  box-shadow: 0 6px 16px rgba(11,111,184,.35);
}

.card.active::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120% 80% at 50% 0%,
    rgba(11,111,184,.12) 0%,
    transparent 60%
  );
  pointer-events:none;
}


    /* ===== RESPONSIVE ===== */
    @media (max-width: 1100px){
      .cards{ grid-template-columns: repeat(2, 1fr); }
      .menu{ overflow-x:auto; }
    }
    @media (max-width: 680px){
      .top-links{ display:none; }
      .cards{ grid-template-columns: 1fr; }
      .hero p{ font-size: 16px; padding: 0 6px; }
    }

/* ===== SEZIONE CSS PACCHETTI LAVORO ===== */
.packs{
  background:#fff;
  padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 7vw, 84px);
}

.packs__title{
  margin: 0 0 clamp(26px, 4vw, 44px);
  text-align:center;
  font-size: clamp(28px, 5.2vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0b6fb8;
}

.packs__grid{
  max-width: 1180px;
  padding: 0 16px; /* aria sui bordi su mobile */
  margin: 0 auto;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 22px) clamp(14px, 2.6vw, 26px);
}

/* ===== CARD ===== */
.pack-card{
  display:flex;
  align-items:flex-start;
  gap: clamp(12px, 2vw, 18px);
  padding: clamp(14px, 2.2vw, 18px);
  border-radius: 18px;
  background:#fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);

  /* evita overflow su device stretti */
  min-width: 0;
  flex-wrap: nowrap;  /* 👈 IMPORTANT: niente wrap, titolo resta a destra dell'immagine */
}

/* immagine */
.pack-card__img{
  width: clamp(64px, 16vw, 88px);
  height: clamp(52px, 12vw, 68px);
  border-radius: 14px;
  overflow:hidden;
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #f3f6fb;
}

.pack-card__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== CONTENUTO ===== */
.pack-card__content{
  flex: 1 1 auto;
  min-width: 0; /* 👈 fondamentale: permette al testo di restringersi senza spaccare il layout */
}

/* TITOLO */
.pack-card__h{
  margin: 0 0 10px;
  font-size: clamp(15px, 2.1vw, 18px);
  line-height: 1.25;
  font-weight: 800;
  color:#0f172a;
  overflow: visible;
  display: block;
}

/* TESTO */
.pack-card__p{
  margin: 0;
  font-size: clamp(14px, 1.9vw, 16px);
  line-height: 1.5;
  color: #6b7280;
  overflow: visible;
  display: block;
}

/* CTA */
.pack-card__cta{
  width: clamp(38px, 10vw, 44px);
  height: clamp(38px, 10vw, 44px);
  border-radius: 12px;
  background: #0b6fb8;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  margin-top: 4px;
}

.pack-card__cta svg{
  width: clamp(18px, 5vw, 22px);
  height: clamp(18px, 5vw, 22px);
  color:#fff;
}

/* hover leggero */
@media (hover:hover) and (pointer:fine){
  .pack-card:hover{
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
    transform: translateY(-1px);
    transition: box-shadow .15s ease, transform .15s ease;
  }
}

/* ===== BREAKPOINTS MIGLIORATI ===== */

/* 2 colonne ma più “strette” prima di collassare */
@media (max-width: 1100px){
  .packs__grid{ max-width: 980px; }
}

/* 1 colonna */
@media (max-width: 820px){
  .packs__grid{
    grid-template-columns: 1fr;
    max-width: 680px;
  }
}

/* telefoni piccoli: mantieni IMG a sinistra del titolo (NO WRAP) */
@media (max-width: 420px){
  .packs__grid{ padding: 0 12px; }

  .pack-card{
    flex-wrap: nowrap;  /* 👈 FIX: non mandare titolo sotto l’immagine */
    gap: 12px;
  }

  /* su small riduco un filo le dimensioni per respirare */
  .pack-card__img{
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .pack-card__cta{
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-top: 2px;
  }

  .pack-card__cta svg{
    width: 18px;
    height: 18px;
  }
}

/* extra-small (320px): ancora più compatto ma sempre in riga */
@media (max-width: 360px){
  .pack-card{
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }

  .pack-card__img{
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .pack-card__cta{
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .pack-card__h{ margin-bottom: 8px; }
  .pack-card__p{ line-height: 1.45; }
}

/* -------------- END CSS SERVICES PACKS ------------------- */