/* Home, barra di ricerca della testata (SVIL-509). Solo la home (.hf-ric): le pagine interne e HomeProva non cambiano.
   Fuori da ogni @layer e con selettori «html body .hf-ric»: vince su hero.css, home.css e sui fogli del tema scuro.
   Una barra grande con la frase d'esempio animata e il microfono dentro; sotto, un pannello di vetro a due schede.
   La testata è sempre su foto scura con velo navy: i colori sono gli stessi nel tema chiaro e nello scuro. */

/* ------------------------------------------------ contenitore ------------------------------------------------ */
html body .hf-ric .hf-azioni.ric{display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:var(--sp-3);width:100%;max-width:none}
html body .hf-ric .ric-form{flex:none;width:100%;min-width:0}

/* ------------------------------------------------ la barra ------------------------------------------------ */
html body .hf-ric .ric-barra{display:flex;align-items:center;height:68px;padding:0 10px 0 22px;border-radius:var(--r-pill);background:#fff;border:0;
  box-shadow:0 1px 2px rgba(0,0,0,.14),0 18px 44px rgba(0,0,0,.30);gap:6px}
html body .hf-ric .ric-barra .hx-lente{display:none}
html body .hf-ric .ric-campo{position:relative;flex:1 1 auto;min-width:0;align-self:stretch;display:flex;align-items:center}
html body .hf-ric .ric-barra .campo-in{width:100%;height:100%;padding:0;margin:0;border:0;background:transparent;outline:0;font-size:16px;line-height:1.25;font-weight:500;color:#10161F;text-overflow:ellipsis}
html body .hf-ric .ric-barra .campo-in::placeholder{color:#5B6575;opacity:1;font-weight:400}
/* con JS il segnaposto nativo cede il posto alla frase animata; col focus (o col testo) la frase sparisce e torna quello nativo */
html.hx-js body .hf-ric .ric-barra:not(:focus-within) .campo-in::placeholder{color:transparent}
html body .hf-ric .ric-ph{display:none;position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);pointer-events:none;
  font-size:16px;line-height:1.25;font-weight:400;color:#5B6575;white-space:nowrap;overflow:hidden;transition:opacity 160ms ease}
html.hx-js body .hf-ric .ric-ph{display:block}
html body .hf-ric .ric-barra:focus-within .ric-ph,
html body .hf-ric .ric-barra.ric-pieno .ric-ph,
html body .hf-ric .ric-campo:has(.campo-in:not(:placeholder-shown)) .ric-ph{opacity:0}
html body .hf-ric .ric-cur{display:inline-block;width:2px;height:1.1em;margin-left:2px;vertical-align:-.17em;border-radius:1px;background:#041B37}
html body .hf-ric .ric-barra.ric-ferma .ric-cur{display:none}
@media (prefers-reduced-motion:no-preference){
  html:not(.ridotto) body .hf-ric .ric-cur{animation:ric-cur 1.05s steps(1,end) infinite}
}
@keyframes ric-cur{0%,55%{opacity:1}56%,100%{opacity:0}}
html body .hf-ric .ric-barra:focus-within{box-shadow:0 0 0 3px rgba(255,255,255,.65),0 18px 44px rgba(0,0,0,.30)}

/* microfono: dentro la barra, accanto all'invio. Neutro (tinta navy), il giallo resta solo all'invio */
html body .hf-ric .ric-mic{flex:none;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;color:#041B37;background:rgba(4,27,55,.07);
  transition:background-color 200ms ease,transform 200ms var(--c-lusso,ease)}
html body .hf-ric .ric-mic .ico{width:22px;height:22px;stroke-width:1.9}
html body .hf-ric .ric-mic:hover{background:rgba(4,27,55,.14)}
html body .hf-ric .ric-mic:focus-visible{outline:2px solid #041B37;outline-offset:2px}
html body .hf-ric .ric-barra .invia{width:48px;height:48px;aspect-ratio:auto;border-radius:50%;flex:none;background:var(--giallo);color:#1A1A1A;padding:0}
html body .hf-ric .ric-barra .invia:hover{background:var(--giallo-h)}
html body .hf-ric .ric-barra .invia .ico{width:22px;height:22px}

/* ------------------------------------------------ pannello di vetro ------------------------------------------------ */
html body .hf-ric .ric-pan{position:relative;border-radius:24px;padding:4px 8px 8px;color:#fff;
  background:linear-gradient(180deg,rgba(var(--hf-navy),.50),rgba(var(--hf-navy),.62));border:1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter:blur(18px) saturate(1.35);backdrop-filter:blur(18px) saturate(1.35);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 14px 36px rgba(0,0,0,.22)}
html body .hf-ric .ric-tabs{position:relative;display:flex;gap:2px;border-bottom:1px solid rgba(255,255,255,.16)}
html body .hf-ric .ric-tab{appearance:none;background:none;border:0;margin:0;padding:12px 12px 11px;min-height:44px;font:inherit;font-size:14px;font-weight:600;letter-spacing:.005em;
  color:rgba(255,255,255,.74);cursor:pointer;border-radius:10px 10px 0 0;transition:color 220ms ease}
html body .hf-ric .ric-tab:hover{color:#fff}
html body .hf-ric .ric-tab[aria-selected="true"]{color:#fff}
html body .hf-ric .ric-tab:focus-visible{outline:2px solid #fff;outline-offset:-2px}
html body .hf-ric .ric-ind{display:none;position:absolute;left:0;bottom:-1px;height:2px;width:var(--w,0);border-radius:2px;background:var(--giallo);transform:translateX(var(--x,0))}
html body .hf-ric .ric-pan.ric-js .ric-ind{display:block}
@media (prefers-reduced-motion:no-preference){
  html:not(.ridotto) body .hf-ric .ric-ind{transition:transform 460ms var(--c-lusso,ease),width 460ms var(--c-lusso,ease)}
}

/* le due liste occupano la stessa cella: l'altezza del pannello non cambia con la scheda */
html body .hf-ric .ric-corpo{display:grid}
html body .hf-ric .ric-pp{grid-area:1/1;list-style:none;margin:0;padding:6px 0 0;display:grid;grid-template-columns:minmax(0,1fr)}
html body .hf-ric .ric-pp li{min-width:0}
html body .hf-ric .ric-pp a{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:8px 10px;border-radius:14px;color:#fff;text-decoration:none;
  font-size:15.5px;line-height:1.25;transition:background-color 180ms ease}
html body .hf-ric .ric-pp a>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .hf-ric .ric-pp a:hover{background:rgba(255,255,255,.13)}
html body .hf-ric .ric-pp a:focus-visible{outline:2px solid #fff;outline-offset:-2px}
html body .hf-ric .ric-su{flex:none;width:17px;height:17px;color:rgba(255,255,255,.62);transition:transform 220ms var(--c-lusso,ease),color 180ms ease}
html body .hf-ric .ric-pp a:hover .ric-su{color:var(--giallo)}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  html:not(.ridotto) body .hf-ric .ric-pp a:hover .ric-su{transform:translate(2px,-2px)}
}
/* telefono: massimo 3 righe */
html body .hf-ric .ric-pp li:nth-child(n+4){display:none}

/* con JS: una scheda alla volta. Quella nascosta resta nella cella (nessun salto d'altezza) ma fuori da lettura e tab */
html.hx-js body .hf-ric .ric-pan[data-sel="1"] .ric-pp[data-p="2"],
html.hx-js body .hf-ric .ric-pan[data-sel="2"] .ric-pp[data-p="1"]{visibility:hidden;opacity:0;pointer-events:none}
/* senza JS le due liste si impilano e non ci sono schede */
html:not(.hx-js) body .hf-ric .ric-corpo{display:block}
html:not(.hx-js) body .hf-ric .ric-tabs{display:none}
@media (prefers-reduced-motion:no-preference){
  html:not(.ridotto) body .hf-ric .ric-pp{transition:opacity 260ms ease,visibility 0s}
  html.hx-js:not(.ridotto) body .hf-ric .ric-pan[data-sel="1"] .ric-pp[data-p="2"],
  html.hx-js:not(.ridotto) body .hf-ric .ric-pan[data-sel="2"] .ric-pp[data-p="1"]{transition:opacity 200ms ease,visibility 0s 200ms}
  /* righe sfalsate: entrano una dopo l'altra a ogni cambio di scheda e al primo caricamento */
  html.hx-js:not(.ridotto) body .hf-ric .ric-pan[data-sel="1"] .ric-pp[data-p="1"] li,
  html.hx-js:not(.ridotto) body .hf-ric .ric-pan[data-sel="2"] .ric-pp[data-p="2"] li{animation:ric-riga 620ms var(--c-lusso,ease) both;animation-delay:calc(90ms + var(--i) * 60ms + var(--ric-d,0ms))}
  html.hx-js:not(.ridotto) body .hf-ric .ric-pan.ric-prima{--ric-d:620ms}
}
@keyframes ric-riga{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ------------------------------------------------ garanzie: discrete ------------------------------------------------ */
html body .hf-ric .hx-fatti{display:flex;flex-wrap:wrap;gap:6px 18px;margin:var(--sp-4) 0 0;font-size:13px;line-height:18px}
html body .hf-ric .hx-fatti li{display:flex;align-items:center;gap:6px}
html body .hf-ric .hx-fatti .ico{width:14px;height:14px;margin-top:0;flex:none}

/* ------------------------------------------------ computer ------------------------------------------------ */
@media (min-width:1024px){
  /* la barra esce un po' dalla colonna del testo: il velo navy la copre ancora */
  html body .hf-ric.hf-home .hf-azioni.ric{width:min(calc(var(--hf-tx) + 150px),calc(100cqw - var(--gx) - 24px));align-self:flex-start;margin-top:var(--sp-8)}
  html body .hf-ric .ric-barra{height:78px;padding:0 13px 0 30px;gap:8px}
  html body .hf-ric .ric-barra .hx-lente{display:block;margin:0 14px 0 0;width:22px;height:22px}
  html body .hf-ric .ric-barra .campo-in,html body .hf-ric .ric-ph{font-size:20px}
  html body .hf-ric .ric-mic{width:50px;height:50px}
  html body .hf-ric .ric-barra .invia{width:52px;height:52px}
  html body .hf-ric .ric-pan{padding:4px 12px 10px}
  html body .hf-ric .ric-tab{padding:13px 14px 12px}
  html body .hf-ric .ric-pp{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,auto);grid-auto-flow:column;column-gap:10px}
  html body .hf-ric .ric-pp li:nth-child(n+4){display:list-item}
  html body .hf-ric .ric-pp a{font-size:15px}
  /* garanzie in una riga sola, piccole, sulla colonna (a destra non c'è il velo pieno) */
  html body .hf-ric.hf-home .hx-fatti{order:5;flex-wrap:nowrap;width:max-content;max-width:none;gap:0 20px;margin-top:var(--sp-5);font-size:13px;white-space:nowrap}
  html body .hf-ric.hf-home .hx-fatti li{flex:none}
}
@media (min-width:1024px) and (max-width:1279.98px){
  html body .hf-ric .ric-barra{height:68px}
  html body .hf-ric .ric-pp a{min-height:40px;padding:6px 10px}
  html body .hf-ric.hf-home .hf-azioni.ric{margin-top:var(--sp-5)}
  html body .hf-ric.hf-home .hx-fatti{margin-top:var(--sp-4);gap:0 14px;font-size:12.5px}
}

/* telefono: la bolla dell'assistente (fissa, in basso a destra) non deve coprire l'ultima riga del pannello */
@media (max-width:1023.98px){
  html body .hf-ric.hf-home .hf-first{padding-bottom:88px}
}
@media (max-width:1023.98px){
  /* velo piu' alto sul telefono: il titolo sale con il pannello e deve restare leggibile sulla foto */
  html body .hf-ric.hf-home .hf-scrim{background:
    linear-gradient(180deg,rgba(var(--hf-navy),.8) 0,rgba(var(--hf-navy),.35) 96px,rgba(var(--hf-navy),0) 170px),
    linear-gradient(0deg,rgba(var(--hf-navy),.95) 0,rgba(var(--hf-navy),.9) 38%,rgba(var(--hf-navy),.7) 52%,rgba(var(--hf-navy),.3) 62%,rgba(var(--hf-navy),0) 70%)}
}

/* ------------------------------------------------ fascia «Per i professionisti» (compatta, senza prezzi) ------------------------------------------------ */
html body .pb .pb-in{display:grid;gap:var(--sp-5);margin:0 var(--m);padding:0 0 var(--sp-6);overflow:hidden;border-radius:var(--r-l,20px);background:var(--sup-2);border:1px solid var(--linea)}
html body .pb .pb-foto{margin:0;aspect-ratio:16/8;height:auto;min-height:0;border-radius:0;position:relative;overflow:hidden}
html body .pb .pb-foto img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 30%}
html body .pb .pb-tx{padding:0 var(--sp-5)}
html body .pb h2{font-size:var(--t-h2,28px);line-height:1.08;margin:0}
html body .pb .pb-s{margin:var(--sp-3) 0 0;color:var(--t2);font-size:var(--t-body);line-height:1.5;max-width:46ch}
html body .pb .pb-az{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-3) var(--sp-5);margin-top:var(--sp-5)}
@media (min-width:1024px){
  html body .pb .pb-in{grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:var(--sp-10,40px);align-items:stretch;padding:0;max-width:var(--box);margin:0 auto}
  html body .pb .pb-foto{aspect-ratio:auto;height:100%;min-height:280px}
  html body .pb .pb-tx{padding:var(--sp-8) var(--sp-10,40px) var(--sp-8) 0;align-self:center}
  html body .pb h2{font-size:var(--t-h1,36px)}
}
@media (prefers-reduced-motion:no-preference){
  html:not(.ridotto) body .pb .pb-foto img{transition:transform 900ms var(--c-lusso,ease)}
  @media (hover:hover){html:not(.ridotto) body .pb .pb-in:hover .pb-foto img{transform:scale(1.03)}}
}

/* SVIL-509 (Stefano 04/12: «parte sotto tutto troppo attaccato, anche la rotella»).
   Computer: la scena (foto/video, velo, rotella, pausa) segue l'altezza reale del contenuto, così il pannello
   non finisce sopra la rotella e le garanzie non toccano il bordo; più aria tra pannello, garanzie e rotella. */
@media (min-width:1024px){
  html body .hf-ric.hf-home .e4-scena{height:auto;bottom:0}
  html body .hf-ric.hf-home :is(.hf-media,.hf-scrim){height:auto;bottom:0}
  html body .hf-ric.hf-home .hf-in{padding-bottom:108px}
  html body .hf-ric.hf-home .hx-fatti{margin-top:var(--sp-6);gap:0 28px;font-size:14px;line-height:20px}
  html body .hf-ric.hf-home .hx-fatti li{gap:8px}
  html body .hf-ric.hf-home .hx-fatti .ico{width:16px;height:16px}
  html body .hf-ric.hf-home .hf-cue{bottom:32px}
  html body .hf-ric.hf-home .e4-ctl{bottom:36px}
}
/* schermi bassi (portatili): meno aria sopra, così rotella compresa sta nella prima schermata */
@media (min-width:1280px) and (max-height:900px){
  html body .hf-ric.hf-home .hf-in{padding-top:calc(var(--hf-top) + var(--hf-av) + var(--sp-2))}
  html body .hf-ric.hf-home .hf-azioni.ric{margin-top:var(--sp-6)}
}
@media (min-width:1024px) and (max-width:1279.98px){
  html body .hf-ric.hf-home .hf-in{padding-bottom:var(--sp-12)}
  html body .hf-ric.hf-home .hx-fatti{margin-top:var(--sp-5);gap:0 18px;font-size:13px}
}
/* schermi molto bassi: il contenuto riempie già la schermata, la rotella non entrerebbe */
@media (min-width:1024px) and (max-height:760px){html body .hf-ric.hf-home .hf-cue{display:none}}
