/* ==========================================================================
   Home Black Friday (MIR-5176, ticket BF 12)
   Caricato solo in home, solo quando la hero BF è accesa (inc/home-bf.php).
   Prende il posto della hero: fondo come il riquadro nero di /black-friday/,
   due porte di pari peso: casa/negozio/ufficio (bianca) e installatori (navy),
   entrambe col pulsante rosso (acquisto / accesso al prezzo).
   Polish dopo la critique del 19/11 (.impeccable/critique/*home-bf-php.md).
   ========================================================================== */

body.prof-sicurezza .ps-hbf{
  /* Colori del blocco: derivati dai token del sito, scritti una volta sola qui. */
  --hbf-night:      oklch(0.14 0.01 250);            /* fondo, come .ps-bf-visual */
  --hbf-on-night:   oklch(0.86 0.01 250);            /* testo secondario sul fondo */
  --hbf-on-night-2: oklch(0.78 0.01 250);            /* prove, scadenza */
  --hbf-on-navy:    oklch(0.88 0.02 265);            /* testo sulla porta navy */
  --hbf-on-navy-2:  oklch(0.80 0.03 265);            /* etichette sulla porta navy */
  --hbf-navy-line:  oklch(1 0 0 / 0.30);             /* bordo della porta navy */
  --hbf-live:       oklch(0.65 0.20 25);             /* punto "in corso", come .hero-watermark */
  --hbf-star:       oklch(0.80 0.16 80);             /* stella Trustpilot */
  --focus-ring:var(--brand-soft);

  position:relative;
  background:var(--hbf-night);
  color:#fff;
  padding:56px 0 40px;
  overflow:hidden;
}
/* Riflesso navy in alto a destra, appena accennato. */
body.prof-sicurezza .ps-hbf::before{
  content:""; position:absolute; inset:-40% -20% auto auto;
  width:70%; height:120%;
  background:radial-gradient(closest-side, oklch(0.274 0.089 273.7 / 0.55), transparent);
  pointer-events:none;
}
body.prof-sicurezza .ps-hbf .container{ position:relative; z-index:1; }
/* Oxygen mette un <br> dopo lo shortcode: come per .hero-wrap, va nascosto. */
body.prof-sicurezza .ps-hbf + br{ display:none !important; }

body.prof-sicurezza .ps-hbf .screen-reader-text{
  position:absolute !important; width:1px !important; height:1px !important;
  padding:0 !important; margin:-1px !important; overflow:hidden !important;
  clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important;
}

body.prof-sicurezza .ps-hbf__preview{
  display:inline-block; margin:0 0 20px !important;
  padding:6px 12px; border-radius:var(--radius);
  background:var(--warn); color:var(--ink);
  font-size:12.5px; font-weight:600;
}

/* --- Testata: titolo a sinistra, testo a destra allineato in basso ---------- */
body.prof-sicurezza .ps-hbf__head{
  display:grid; grid-template-columns:auto minmax(0,1fr);
  align-items:end; gap:16px 48px;
  margin-bottom:32px;
}
body.prof-sicurezza .ps-hbf__title{
  margin:0 !important;
  color:#fff !important;
  font-size:72px !important; line-height:0.95 !important;
  font-weight:800 !important; letter-spacing:-0.015em !important;
  text-transform:uppercase;
  white-space:nowrap;
}
body.prof-sicurezza .ps-hbf__intro{ max-width:560px; padding-bottom:4px; }
body.prof-sicurezza .ps-hbf__lead{
  margin:0 !important;
  font-size:17px; line-height:1.5;
  color:var(--hbf-on-night);
  text-wrap:pretty;
}
body.prof-sicurezza .ps-hbf__until{
  display:flex; align-items:center; gap:8px;
  margin:10px 0 0 !important;
  font-size:14px; font-weight:600;
  color:#fff;
}
/* Commenti 19/11: niente pallino che lampeggia (anche su /black-friday/ e landing installatori). */
body.prof-sicurezza .ps-hbf__until .rec{ display:none; }

/* --- Porte ---------------------------------------------------------------- */
body.prof-sicurezza .ps-hbf__doors{
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px;
}
body.prof-sicurezza .ps-hbf__doors--pro-first .ps-hbf-door--pro{ order:-1; }

body.prof-sicurezza .ps-hbf-door{
  position:relative;
  display:flex; flex-direction:column; align-items:flex-start;
  padding:28px 32px 32px;
  border-radius:var(--radius-lg);
  transition:box-shadow .15s ease, border-color .15s ease;
}
body.prof-sicurezza .ps-hbf-door--home{
  background:var(--surface, #fff); color:var(--ink);
  border:1px solid transparent;
}
body.prof-sicurezza .ps-hbf-door--pro{
  background:var(--navy); color:#fff;
  border:1px solid var(--hbf-navy-line);
}
/* Il riquadro intero è il link: l'anello di focus e l'hover vanno sul riquadro. */
body.prof-sicurezza .ps-hbf-door:hover{ box-shadow:0 0 0 2px oklch(1 0 0 / 0.55); }
body.prof-sicurezza .ps-hbf-door:has(.ps-hbf-door__cta:focus-visible){
  outline:2px solid var(--focus-ring); outline-offset:3px;
}

body.prof-sicurezza .ps-hbf-door__tag{
  display:inline-flex; align-items:center; gap:8px;
  margin:0 0 12px !important;
  font-size:13.5px; font-weight:600; letter-spacing:0;
}
body.prof-sicurezza .ps-hbf-door__tag .icon{ width:18px; height:18px; flex-shrink:0; }
body.prof-sicurezza .ps-hbf-door--home .ps-hbf-door__tag{ color:var(--navy); }
body.prof-sicurezza .ps-hbf-door--pro .ps-hbf-door__tag{ color:var(--hbf-on-navy); }

body.prof-sicurezza .ps-hbf-door__title{
  margin:0 0 16px !important;
  font-size:28px !important; line-height:1.12 !important;
  font-weight:700 !important; letter-spacing:-0.02em !important;
  color:inherit !important;
  text-wrap:balance;
}

body.prof-sicurezza .ps-hbf .ps-hbf-door__list{
  display:flex !important; flex-direction:column; gap:8px;
  margin:0 0 28px !important;
}
body.prof-sicurezza .ps-hbf-door__list li{
  display:flex; align-items:flex-start; gap:10px;
  font-size:15.5px; line-height:1.4; color:var(--ink-2);
}
body.prof-sicurezza .ps-hbf-door__list .icon{
  flex-shrink:0; width:18px; height:18px; margin-top:1px;
  color:var(--ok-ink);
}

body.prof-sicurezza .ps-hbf-door__text{
  margin:0 0 16px !important; max-width:520px;
  font-size:15.5px; line-height:1.5;
  color:var(--hbf-on-navy);
  text-wrap:pretty;
}
body.prof-sicurezza .ps-hbf-door__brands{
  display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px;
  margin:0 0 28px !important;
}
body.prof-sicurezza .ps-hbf-door__brands-lbl{
  font-size:13px; color:var(--hbf-on-navy-2);
}
body.prof-sicurezza .ps-hbf-door__brands-list{
  font-family:'IBM Plex Mono', monospace; font-size:12.5px;
  letter-spacing:0.06em; text-transform:uppercase;
  color:#fff;
}

/* Il pulsante va in fondo, così i due riquadri finiscono alla stessa altezza;
   ::after rende cliccabile tutto il riquadro. */
body.prof-sicurezza .ps-hbf-door__cta{
  margin-top:auto !important;
  display:inline-flex !important; align-items:center; gap:10px;
  background:var(--action) !important; color:#fff !important;
}
body.prof-sicurezza .ps-hbf-door__cta::after{
  content:""; position:absolute; inset:0; border-radius:inherit;
}
body.prof-sicurezza .ps-hbf-door:hover .ps-hbf-door__cta{ background:var(--action-ink) !important; }
body.prof-sicurezza .ps-hbf-door__cta .icon{ width:18px; height:18px; transition:transform .15s ease; }
body.prof-sicurezza .ps-hbf-door:hover .ps-hbf-door__cta .icon{ transform:translateX(3px); }

/* --- Prove ----------------------------------------------------------------- */
body.prof-sicurezza .ps-hbf .ps-hbf__proof{
  display:flex !important; flex-wrap:wrap; gap:8px 28px;
  margin:24px 0 0 !important;
  font-size:13.5px; color:var(--hbf-on-night-2);
}
body.prof-sicurezza .ps-hbf__proof li{ display:inline-flex; align-items:center; gap:8px; }
body.prof-sicurezza .ps-hbf__proof .icon{ width:16px; height:16px; flex-shrink:0; }
body.prof-sicurezza .ps-hbf__proof li:first-child .icon{ color:var(--hbf-star); fill:currentColor; }

@media (prefers-reduced-motion: reduce){
  body.prof-sicurezza .ps-hbf-door,
  body.prof-sicurezza .ps-hbf-door__cta .icon{ transition:none; }
}

/* --- Tablet ---------------------------------------------------------------- */
@media (max-width: 1024px){
  body.prof-sicurezza .ps-hbf{ padding:40px 0 32px; }
  body.prof-sicurezza .ps-hbf__head{ grid-template-columns:minmax(0,1fr); gap:12px; margin-bottom:24px; }
  body.prof-sicurezza .ps-hbf__title{ font-size:56px !important; white-space:normal; text-wrap:balance; }
  body.prof-sicurezza .ps-hbf-door{ padding:24px 24px 28px; }
  body.prof-sicurezza .ps-hbf-door__title{ font-size:24px !important; }
}

/* --- Telefono: entrambe le porte (e i loro pulsanti) nella prima schermata --- */
@media (max-width: 768px){
  body.prof-sicurezza .ps-hbf{ padding:20px 0 24px; }
  body.prof-sicurezza .ps-hbf__head{ gap:8px; margin-bottom:16px; }
  body.prof-sicurezza .ps-hbf__title{ font-size:clamp(36px, 11vw, 44px) !important; }
  /* Le porte dicono già a chi si rivolgono: sul telefono la frase lascia posto alla seconda porta. */
  body.prof-sicurezza .ps-hbf__lead{ display:none; }
  body.prof-sicurezza .ps-hbf__until{ margin-top:6px !important; font-size:13px; }
  body.prof-sicurezza .ps-hbf__doors{ grid-template-columns:minmax(0,1fr); gap:12px; }
  body.prof-sicurezza .ps-hbf-door{ padding:16px 18px 18px; }
  body.prof-sicurezza .ps-hbf-door__tag{ margin-bottom:6px !important; font-size:13px; }
  body.prof-sicurezza .ps-hbf-door__title{ font-size:21px !important; margin-bottom:10px !important; }
  body.prof-sicurezza .ps-hbf .ps-hbf-door__list{ gap:4px; margin-bottom:14px !important; }
  body.prof-sicurezza .ps-hbf-door__list li,
  body.prof-sicurezza .ps-hbf-door__text{ font-size:14.5px; line-height:1.4; }
  body.prof-sicurezza .ps-hbf-door__text{ margin-bottom:14px !important; }
  /* I marchi stanno nella landing: sul telefono si lascia posto al pulsante. */
  body.prof-sicurezza .ps-hbf-door__brands{ display:none; }
  body.prof-sicurezza .ps-hbf-door__cta{ width:100%; justify-content:center; padding-top:12px !important; padding-bottom:12px !important; }
  body.prof-sicurezza .ps-hbf .ps-hbf__proof{ flex-direction:column; gap:6px; margin-top:18px !important; font-size:13px; }
}
