/* =====================================================================
   BYITALY STORE - services.css
   Listing SERVIZI (category "Servizi") + scheda servizio completa
   ---------------------------------------------------------------------
   Tema:   byitaly (child di Classic) - PrestaShop 8.2.6
   Autore: Francesco Fiore - www.fiorefrancesco.com - Licenza MIT
   Riferimenti: ANALISI.md par. 4 (img 3) e par. 5 (img 2)
   Markup: category Servizi = listing con card grandi (override
   miniature dedicata); scheda = template product-service.tpl (FASE 7)
   + blocchi ff_servicetabs (FASE 9).

   v1.1 - FIX: .ff-service__media img aveva solo width:100% senza
   height:auto. Con l'attributo height nell'HTML (dimensioni native
   del formato immagine, ora service_default 800x500 invece del
   large_default 900x900 quadrato sbagliato) e width:100% da CSS senza
   height, il rapporto larghezza/altezza si rompeva e la foto appariva
   deformata/stirata. Aggiunto anche aspect-ratio + object-fit:cover
   come rete di sicurezza per foto future con proporzioni diverse.
   ===================================================================== */

/* =====================================================================
   PARTE A - LISTING SERVIZI (img 3)
   ===================================================================== */

/* Intestazione: come Shop ma non uppercase ("SERVIZI" lo è: uniforme) */
.ff-services #category .block-category .h1 { text-transform: uppercase; }
.ff-services .category-description strong { font-weight: 700; }

/* Griglia 3 colonne con card grandi */
.ff-services #products .products {
  grid-template-columns: repeat(3, 1fr);
}

/* Card servizio: immagine 16:10 + corpo con CTA outline  [A] */
.ff-service-card { display: flex; flex-direction: column; height: 100%; }
.ff-service-card .ff-service-card__img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--ff-radius) var(--ff-radius) 0 0;
  background: var(--ff-bg-soft);
}
.ff-service-card .ff-service-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.ff-service-card:hover .ff-service-card__img img { transform: scale(1.04); }

.ff-service-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 24px;
}
.ff-service-card__title {
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--ff-navy);
  line-height: 1.3;
  margin: 0 0 10px;
}
.ff-service-card__text {
  font-size: var(--ff-fs-small);
  color: var(--ff-text-light);
  line-height: 1.55;
  margin: 0 0 20px;
}
.ff-service-card__body .ff-btn { margin-top: auto; align-self: flex-start; }

/* =====================================================================
   PARTE B - SCHEDA SERVIZIO (img 2)
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. BLOCCO ALTO: immagine | info+prezzo+CTA  [A]
--------------------------------------------------------------------- */
.ff-service {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 40px 0 12px;
}
.ff-service__media img {
  display: block;
  width: 100%;
  height: auto;              /* FIX: senza questo, con l'attributo
                                 height nell'HTML (dimensioni native
                                 del formato immagine) e width:100% da
                                 CSS, il rapporto larghezza/altezza si
                                 rompe e la foto appare stirata. */
  aspect-ratio: 16 / 10;      /* coerente con service_default 800x500:
                                 se in futuro carichi una foto con
                                 proporzioni diverse, viene ritagliata
                                 pulita invece di deformarsi. */
  object-fit: cover;
  border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-sm);
}

/* Badge "SERVIZIO PERSONALIZZATO" - outline verde pill  [A] */
.ff-service__badge {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--ff-green);
  border-radius: 999px;
  color: var(--ff-green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.ff-service__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--ff-navy);
  line-height: 1.2;
  margin: 0 0 12px;
}
.ff-service__subtitle {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ff-text);
  margin: 0 0 18px;
}

/* Check-list benefici: eredita .ff-checklist (variables.css) */
.ff-service .ff-checklist { margin-bottom: 22px; }

/* Prezzo "€150,00 + IVA" + "Tariffa a pratica"  [A]
   Il valore viene dal prezzo nativo (tasse escluse per esplicitare il
   netto); label rese da ff_servicetabs su displayProductPriceBlock. */
.ff-service__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.ff-service__price .current-price-value,
.ff-service__price .ff-price-value {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--ff-navy);
}
.ff-service__price .ff-price-vat {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ff-navy);
}
.ff-service__price-note {
  font-size: 0.8125rem;
  color: var(--ff-text-light);
  margin-bottom: 24px;
}

/* Doppia CTA: add-to-cart navy + info outline rosso  [A] */
.ff-service__cta { display: flex; flex-wrap: wrap; gap: 16px; }
.ff-service__cta .ff-btn, .ff-service__cta .btn { min-width: 220px; }
/* Nascondiamo il selettore quantità: un servizio = una pratica.
   (qty resta 1 nel form nativo, campo hidden nel template FASE 7) */
.ff-service .product-quantity { display: none; }

/* ---------------------------------------------------------------------
   2. FASCIA 5 USP sotto il blocco alto: riusa .ff-usp --cols-5 --stack
   (footer.css par. 5). Nessuna regola aggiuntiva necessaria.
--------------------------------------------------------------------- */

/* ---------------------------------------------------------------------
   3. TAB ANCHOR BAR  [A]
   ---------------------------------------------------------------------
   Le 5 tab fanno smooth-scroll alle card (decisione FASE 1 §5.3:
   nello screenshot le card sono tutte visibili). Il JS (tabs.js)
   gestisce lo stato .active con scroll-spy.
--------------------------------------------------------------------- */
.ff-service-tabs {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  border-bottom: 1px solid var(--ff-border);
  overflow-x: auto;               /* scorre su viewport stretti */
}
.ff-service-tabs a {
  display: block;
  padding: 16px 20px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ff-text-light);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color var(--ff-transition), border-color var(--ff-transition);
}
.ff-service-tabs a:hover,
.ff-service-tabs a.active {
  color: var(--ff-navy);
  border-bottom-color: var(--ff-navy);
}

/* Descrizione sotto le tab */
.ff-service-desc {
  padding: 26px 0 8px;
  max-width: 900px;
  font-size: var(--ff-fs-body);
  color: var(--ff-text);
}

/* ---------------------------------------------------------------------
   4. CARD INFORMATIVE (5 affiancate)  [A]
   ---------------------------------------------------------------------
   COSA INCLUDE / COME FUNZIONA / INFORMAZIONI RICHIESTE /
   PERCHÉ SCEGLIERCI / IDEALE PER
--------------------------------------------------------------------- */
.ff-service-info {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  padding: 26px 0 8px;
}
.ff-service-info__card {
  /* estende .ff-card */
  padding: 22px 18px;
  scroll-margin-top: 110px;       /* target smooth-scroll: compensa
                                     l'header sticky (86px + margine) */
}
.ff-service-info__card > i {
  display: block;
  font-size: 1.625rem;
  color: var(--ff-navy);
  margin-bottom: 12px;
}
.ff-service-info__title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ff-navy);
  margin: 0 0 16px;
}
.ff-service-info__card .ff-checklist li {
  font-size: 0.8125rem;
  margin-bottom: 10px;
}

/* Lista numerata "COME FUNZIONA": pallini navy pieni  [A] */
.ff-steps { list-style: none; counter-reset: ffstep; margin: 0; padding: 0; }
.ff-steps li {
  counter-increment: ffstep;
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  font-size: 0.8125rem;
}
.ff-steps li::before {
  content: counter(ffstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ff-navy);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

/* ---------------------------------------------------------------------
   5. FAQ ACCORDION  [A]
   ---------------------------------------------------------------------
   Markup accessibile (accordion.js gestisce aria-expanded):
   <div class="ff-faq">
     <h2 class="ff-faq__heading">FAQ</h2>
     <div class="ff-faq__item">
       <button class="ff-faq__q" aria-expanded="false" aria-controls="faq-1">
         Domanda <i class="fa-solid fa-plus"></i>
       </button>
       <div class="ff-faq__a" id="faq-1" hidden>Risposta</div>
     </div>
   </div>
--------------------------------------------------------------------- */
.ff-faq { padding: 30px 0 60px; scroll-margin-top: 110px; }
.ff-faq__heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ff-navy);
  margin-bottom: 16px;
}
.ff-faq__item {
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-sm);
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.ff-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--ff-font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ff-navy);
  cursor: pointer;
}
.ff-faq__q i {
  font-size: 0.875rem;
  color: var(--ff-navy);
  transition: transform var(--ff-transition);
  flex-shrink: 0;
}
.ff-faq__q[aria-expanded="true"] i { transform: rotate(45deg); } /* + -> x */
.ff-faq__a {
  padding: 0 20px 18px;
  font-size: var(--ff-fs-small);
  color: var(--ff-text);
  line-height: 1.6;
}
/* Apertura animata: accordion.js anima max-height; questo è il
   fallback no-JS: [hidden] nativo mantiene la funzione */