/* ==========================================================================
   Hero della home: due porte fotografiche (dal 1/12/2026, dopo il Black Friday)
   Caricato solo in home, solo quando la hero è accesa (inc/home-hero.php).
   Fondo carta del sito, titolo navy, due rettangoli di pari peso con la foto a
   tutto riquadro e il testo sopra. Il rettangolo intero è il link.
   ========================================================================== */

body.prof-sicurezza .ps-hh{
  /* Velature: il testo deve leggersi qualunque foto si scelga da Vetrina home. */
  --hh-home: 0.31 0.050 245;             /* blu ardesia, il cielo della foto: porta casa/negozio/ufficio */
  --hh-pro:  0.274 0.089 273.7;          /* --navy, porta installatori */
  --hh-on:   oklch(0.95 0.006 250);      /* testo secondario sulle foto */
  --hh-star: oklch(0.72 0.15 70);        /* --warn, stella Trustpilot */

  background:var(--bg);
  color:var(--ink);
  padding:40px 0 36px;
}
/* Oxygen mette un <br> dopo lo shortcode: come per .hero-wrap, va nascosto. */
body.prof-sicurezza .ps-hh + br{ display:none !important; }

body.prof-sicurezza .ps-hh .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-hh__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, prove a destra sulla stessa linea di base ---- */
body.prof-sicurezza .ps-hh__head{
  display:grid; grid-template-columns:minmax(0,1fr) auto;
  align-items:end; gap:16px 48px;
  margin-bottom:28px;
}
body.prof-sicurezza .ps-hh__title{
  margin:0 !important;
  color:var(--navy) !important;
  font-size:clamp(48px, 4.6vw, 64px) !important; line-height:1 !important;
  font-weight:700 !important; letter-spacing:-0.02em !important;
  max-width:13.5em;
  text-wrap:balance;
}
body.prof-sicurezza .ps-hh .ps-hh__proof{
  display:flex !important; flex-direction:column; gap:8px;
  margin:0 0 6px !important;
  font-size:15px; line-height:1.35; color:var(--ink-2);
}
body.prof-sicurezza .ps-hh__proof li{ display:flex; align-items:center; gap:10px; }
body.prof-sicurezza .ps-hh__proof .icon{ width:18px; height:18px; flex-shrink:0; color:var(--navy); }
body.prof-sicurezza .ps-hh__proof .icon--star{ color:var(--hh-star); fill:currentColor; }

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

body.prof-sicurezza .ps-hh-door{
  --door:var(--hh-home);
  position:relative; isolation:isolate; overflow:hidden;
  display:flex; flex-direction:column; justify-content:flex-end; align-items:flex-start;
  min-height:432px;
  padding:32px;
  border-radius:var(--radius-lg);
  background:oklch(var(--door));
  color:#fff;
}
body.prof-sicurezza .ps-hh-door--pro{ --door:var(--hh-pro); }

body.prof-sicurezza .ps-hh-door__photo{
  position:absolute !important; inset:0 !important; z-index:-2;
  width:100% !important; height:100% !important; max-width:none !important;
  object-fit:cover !important; object-position:50% 50% !important;
  border-radius:0 !important;
  transition:transform .7s cubic-bezier(.16,1,.3,1);
}
/* Il soggetto (telecamera, mani sulla planimetria) sta in alto a destra in tutte e due le foto. */
body.prof-sicurezza .ps-hh-door--home .ps-hh-door__photo{ object-position:100% 30% !important; }
body.prof-sicurezza .ps-hh-door--pro  .ps-hh-door__photo{ object-position:62% 40% !important; }

/* Velatura in due passate. La prima moltiplica: sotto il testo il bianco della foto diventa
   al massimo il colore della porta, mai più chiaro, quindi il testo si legge su qualunque foto.
   La seconda spegne i dettagli dietro alle righe piccole. */
body.prof-sicurezza .ps-hh-door::before,
body.prof-sicurezza .ps-hh-door::after{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
}
body.prof-sicurezza .ps-hh-door::before{
  background:linear-gradient(to top, oklch(var(--door)) 0%, oklch(var(--door)) 38%, oklch(var(--door) / 0.78) 56%, oklch(var(--door) / 0.28) 74%, oklch(var(--door) / 0) 94%);
  mix-blend-mode:multiply;
}
body.prof-sicurezza .ps-hh-door::after{
  background:linear-gradient(to top, oklch(var(--door) / 0.72) 0%, oklch(var(--door) / 0.5) 34%, oklch(var(--door) / 0) 60%);
}

/* Cartellino dell'offerta, come quelli del banco: carta, navy, in alto a sinistra sulla foto. */
body.prof-sicurezza .ps-hh-door__tag{
  position:absolute; top:32px; left:32px;
  margin:0 !important; padding:9px 14px;
  border-radius:var(--radius);
  background:var(--surface, #fff); color:var(--navy);
  font-size:18px; line-height:1.2; font-weight:700; letter-spacing:-0.01em;
}

body.prof-sicurezza .ps-hh-door__title{
  margin:0 0 8px !important;
  color:#fff !important;
  font-size:38px !important; line-height:1.04 !important;
  font-weight:700 !important; letter-spacing:-0.02em !important;
  text-wrap:balance;
}
body.prof-sicurezza .ps-hh-door__offer{
  margin:0 0 24px !important; max-width:23em;
  font-size:19px; line-height:1.4; font-weight:500;
  color:var(--hh-on);
  text-wrap:balance;
}

/* Il pulsante è il link; ::after rende cliccabile tutto il rettangolo. */
body.prof-sicurezza .ps-hh-door__cta{
  position:static !important;
  display:inline-flex !important; align-items:center; gap:10px;
  background:var(--action) !important; color:#fff !important;
}
body.prof-sicurezza .ps-hh-door__cta::after{
  content:""; position:absolute; inset:0; border-radius:inherit;
}
body.prof-sicurezza .ps-hh-door__cta .icon{ width:18px; height:18px; transition:transform .25s cubic-bezier(.16,1,.3,1); }
@supports selector(:has(*)){
  body.prof-sicurezza .ps-hh-door__cta:focus-visible{ outline:none !important; }
  body.prof-sicurezza .ps-hh-door:has(.ps-hh-door__cta:focus-visible){
    outline:2px solid var(--focus-ring); outline-offset:2px;
  }
}

@media (hover:hover){
  body.prof-sicurezza .ps-hh-door:hover .ps-hh-door__photo{ transform:scale(1.035); }
  body.prof-sicurezza .ps-hh-door:hover .ps-hh-door__cta{ background:var(--action-ink) !important; }
  body.prof-sicurezza .ps-hh-door:hover .ps-hh-door__cta .icon{ transform:translateX(4px); }
}
@media (prefers-reduced-motion: reduce){
  body.prof-sicurezza .ps-hh-door__photo,
  body.prof-sicurezza .ps-hh-door__cta .icon{ transition:none; }
  body.prof-sicurezza .ps-hh-door:hover .ps-hh-door__photo{ transform:none; }
}

/* --- Tablet ------------------------------------------------------------------ */
@media (max-width:1024px){
  body.prof-sicurezza .ps-hh{ padding:32px 0 28px; }
  body.prof-sicurezza .ps-hh__head{ grid-template-columns:minmax(0,1fr); margin-bottom:22px; }
  body.prof-sicurezza .ps-hh__title{ font-size:48px !important; }
  body.prof-sicurezza .ps-hh .ps-hh__proof{ flex-direction:row; flex-wrap:wrap; gap:6px 24px; margin:0 !important; }
  body.prof-sicurezza .ps-hh-door{ min-height:400px; padding:24px; }
  body.prof-sicurezza .ps-hh-door__tag{ top:24px; left:24px; font-size:16px; }
  body.prof-sicurezza .ps-hh-door__title{ font-size:30px !important; }
  body.prof-sicurezza .ps-hh-door__offer{ font-size:17px; margin-bottom:20px !important; }
}

/* --- Telefono: le due porte, coi loro pulsanti, nella prima schermata --------- */
@media (max-width:768px){
  body.prof-sicurezza .ps-hh{ padding:18px 0 20px; }
  body.prof-sicurezza .ps-hh__head{ margin-bottom:14px; gap:10px; }
  body.prof-sicurezza .ps-hh__title{ font-size:clamp(28px, 8.2vw, 36px) !important; line-height:1.04 !important; }
  body.prof-sicurezza .ps-hh .ps-hh__proof{ flex-wrap:nowrap; gap:12px; font-size:13px; white-space:nowrap; }
  body.prof-sicurezza .ps-hh__proof li{ gap:6px; }
  body.prof-sicurezza .ps-hh__wide{ display:none; }
  body.prof-sicurezza .ps-hh__proof .icon{ width:15px; height:15px; }
  body.prof-sicurezza .ps-hh__doors{ grid-template-columns:minmax(0,1fr); gap:10px; }
  body.prof-sicurezza .ps-hh-door{ min-height:clamp(236px, 66vw, 258px); padding:16px; }
  /* Rettangolo più basso: la velatura sale, perché il testo ne occupa di più. */
  body.prof-sicurezza .ps-hh-door::before{
    background:linear-gradient(to top, oklch(var(--door)) 0%, oklch(var(--door)) 48%, oklch(var(--door) / 0.78) 66%, oklch(var(--door) / 0.28) 84%, oklch(var(--door) / 0) 100%);
  }
  body.prof-sicurezza .ps-hh-door__title{ font-size:clamp(23px, 6.4vw, 25px) !important; margin-bottom:4px !important; }
  body.prof-sicurezza .ps-hh-door__offer{ font-size:15.5px; line-height:1.35; margin-bottom:14px !important; }
  body.prof-sicurezza .ps-hh-door__cta{ padding-top:12px !important; padding-bottom:12px !important; }
  body.prof-sicurezza .ps-hh-door__tag{ top:16px; left:16px; padding:6px 11px; font-size:15px; }
}
