/* Luce Elegante – Claudio Scarano 1.3.2 | Tutte le regole sono circoscritte al componente. */
#ponti-luce-elegante.pl-luce {
  --pl-blue:#116a99; --pl-ink:#183950; --pl-light:#75d0ef;
  position:fixed; z-index:1050; inset:0; pointer-events:none;
  font-family:"Titillium Web","Segoe UI",Arial,sans-serif;
  color:var(--pl-ink); font-size:16px; line-height:1.45;
}
#ponti-luce-elegante[hidden]{display:none!important}
#ponti-luce-elegante .pl-luce-panel {
  position:absolute; top:min(46vh,430px); left:50%;
  width:min(850px,calc(100vw - 48px)); min-height:165px;
  transform:translateX(-50%); border-radius:16px;
  border:1px solid #b6d9eb;
  background:linear-gradient(112deg,#fff 0%,#fbfdff 58%,#eaf6fd 100%);
  box-shadow:0 16px 38px #17395630,0 0 25px #8ac5ed28;
  overflow:hidden;
  opacity:0; clip-path:inset(0 0 0 100% round 16px);
  pointer-events:auto;
  transition:clip-path 1120ms cubic-bezier(.16,.8,.25,1),opacity 570ms ease,transform 1120ms cubic-bezier(.16,.8,.25,1);
  will-change:clip-path,opacity; isolation:isolate;
}
#ponti-luce-elegante .pl-luce-panel::before {
  content:"";position:absolute;inset:0 auto 0 0;width:5px;
  background:linear-gradient(#8de9ff,#2180b2,#b2ecff);
  box-shadow:3px 0 15px #8ddcff80;z-index:3;
}
#ponti-luce-elegante .pl-luce-panel::after {
  content:"";position:absolute;right:-65px;top:-95px;width:330px;height:310px;
  border-radius:50%;background:radial-gradient(circle,#b3e3fa55,transparent 70%);pointer-events:none;
}
#ponti-luce-elegante .pl-luce-body{
  position:relative;z-index:2;display:flex;gap:22px;align-items:center;
  padding:17px 69px 17px 21px; min-height:165px;
  opacity:0; transform:translateY(8px);
  transition:opacity 470ms ease,transform 470ms ease;
}
#ponti-luce-elegante .pl-luce-image{
  flex:0 0 215px; align-self:stretch;max-height:155px;min-height:117px;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  border:1px solid #daebf6;background:#f6fbff;border-radius:10px;
}
#ponti-luce-elegante .pl-luce-image img{display:block;width:100%;height:100%;max-width:100%;object-fit:contain;object-position:center}
#ponti-luce-elegante .pl-luce-copy{flex:1 1 0;min-width:0}
#ponti-luce-elegante .pl-luce-kicker{display:block;font-size:12px;line-height:1.1;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:#156890;margin-bottom:6px}
#ponti-luce-elegante .pl-luce-title{font-family:inherit;font-weight:700;font-size:clamp(20px,2.3vw,29px);line-height:1.13;letter-spacing:-.02em;color:#143754;margin:0 0 6px;padding:0}
#ponti-luce-elegante .pl-luce-description{font-family:inherit;font-size:14px;color:#4c6577;line-height:1.35;margin:0 0 12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#ponti-luce-elegante .pl-luce-read{
  display:inline-flex;gap:9px;align-items:center;text-decoration:none;
  background:#0e658e;color:#fff;padding:8px 18px;border-radius:999px;
  font-family:inherit;font-weight:700;font-size:14px;line-height:1.3;
  box-shadow:0 4px 11px #08678c25;
}
#ponti-luce-elegante .pl-luce-read:hover{background:#084f70;color:#fff;text-decoration:underline}
#ponti-luce-elegante .pl-luce-controls{position:absolute;right:11px;top:9px;display:flex;gap:5px}
#ponti-luce-elegante .pl-luce-controls button{
  display:grid;place-items:center;width:32px;height:32px;padding:0;border-radius:50%;
  font:500 18px/1 "Segoe UI",Arial,sans-serif;color:#2a536d;background:#eaf5fc;border:1px solid #d2e5f0;cursor:pointer;
}
#ponti-luce-elegante .pl-luce-controls button:hover{background:#d2ecfb}
#ponti-luce-elegante .pl-luce-controls .pl-luce-pause{font-size:13px}
#ponti-luce-elegante .pl-luce-read:focus-visible,#ponti-luce-elegante .pl-luce-controls button:focus-visible{
  outline:3px solid #ffbf47;outline-offset:3px;
}
#ponti-luce-elegante .pl-luce-sweep {
  position:absolute;z-index:2;inset:-45% auto -45% -115px;width:105px;
  background:linear-gradient(90deg,transparent,#def6ff00 18%,#ffffffb8 53%,transparent);
  opacity:0;transform:translateX(-100px) skewX(-14deg);pointer-events:none;
}
#ponti-luce-elegante .pl-luce-glow {
  position:absolute;inset:0;pointer-events:none;
  border:1px solid #b9eafd;border-radius:16px;box-shadow:inset 0 0 13px #b0e5ff40;
}
#ponti-luce-elegante .pl-luce-edge{
  position:fixed;left:96vw;top:var(--pl-edge-y,calc(min(46vh,430px) + 75px));
  width:3px;height:2px;border-radius:99px;opacity:0;pointer-events:none;
  background:#f8ffff;box-shadow:0 0 8px 4px #98e7ffb0,0 0 22px 6px #2ea1d888;
}
#ponti-luce-elegante.is-energizing .pl-luce-edge{animation:pl-fly 620ms cubic-bezier(.23,.72,.18,1) both}
@keyframes pl-fly{0%{left:99%;height:2px;opacity:0}20%{opacity:1;height:3px}75%{height:3px;opacity:1}100%{left:var(--pl-fly-end,17%);height:2px;opacity:0}}
#ponti-luce-elegante.is-revealing .pl-luce-panel,
#ponti-luce-elegante.is-visible .pl-luce-panel,
#ponti-luce-elegante.is-tracing .pl-luce-panel {opacity:1;clip-path:inset(0 0 0 0 round 16px)}
#ponti-luce-elegante.is-visible .pl-luce-body,
#ponti-luce-elegante.is-tracing .pl-luce-body,
#ponti-luce-elegante.is-closing .pl-luce-body{opacity:1;transform:translateY(0)}
#ponti-luce-elegante.is-visible .pl-luce-sweep{animation:pl-shine 1050ms cubic-bezier(.25,.7,.3,1) 220ms both}
@keyframes pl-shine{0%{opacity:0;transform:translateX(-100px) skewX(-14deg)}20%{opacity:.54}85%{opacity:.43}100%{opacity:0;transform:translateX(960px) skewX(-14deg)}}
#ponti-luce-elegante.is-closing .pl-luce-panel{
  opacity:0;clip-path:inset(0 100% 0 0 round 16px);
  transform:translateX(calc(-50% - 23px));
  transition-duration:1120ms,900ms,1120ms;
}
#ponti-luce-elegante .pl-luce-guide{position:fixed;inset:0;width:100vw;height:100vh;overflow:visible;pointer-events:none;opacity:0;transition:opacity 300ms ease}
#ponti-luce-elegante .pl-luce-path-glow{fill:none;stroke:#91dfff;stroke-width:6;opacity:.24;filter:blur(3px)}
#ponti-luce-elegante .pl-luce-path{fill:none;stroke:#1c8ab7;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round;stroke-dasharray:var(--pl-dash,1000);stroke-dashoffset:var(--pl-dash,1000);transition:stroke-dashoffset 1260ms cubic-bezier(.26,.63,.25,1)}
#ponti-luce-elegante .pl-luce-guide-dot{fill:#f7feff;stroke:#238dbb;stroke-width:2;opacity:0;transition:opacity 300ms ease}
#ponti-luce-elegante.is-tracing .pl-luce-guide{opacity:1}
#ponti-luce-elegante.is-tracing .pl-luce-path{stroke-dashoffset:0}
#ponti-luce-elegante.is-tracing .pl-luce-guide-dot{opacity:1}
#ponti-luce-elegante .pl-luce-guide.pl-fading{opacity:0}
.pl-luce-target-mark{
  outline:2px solid #2799c4!important;outline-offset:3px;
  box-shadow:0 0 0 5px #58b5df23,0 0 19px #4eaedc66!important;
  transition:box-shadow 300ms ease,outline-color 300ms ease;
  animation:pl-luce-card-beacon 1500ms ease-in-out 2;
}
@keyframes pl-luce-card-beacon {
  0%,100% {box-shadow:0 0 0 5px #58b5df23,0 0 19px #4eaedc66;}
  50% {box-shadow:0 0 0 10px #58b5df28,0 0 30px #4eaedca0;}
}
/* Chiusura rapida al primo gesto di scorrimento: prioritaria su ogni fase. */
#ponti-luce-elegante.is-scroll-closing .pl-luce-panel{
  opacity:0;
  clip-path:inset(0 100% 0 0 round 16px);
  transform:translateX(calc(-50% - 18px));
  transition:clip-path 470ms cubic-bezier(.25,.78,.23,1),
             opacity 400ms ease-out,
             transform 470ms cubic-bezier(.25,.78,.23,1);
}
#ponti-luce-elegante.is-scroll-closing .pl-luce-body{
  opacity:0;transform:translateY(-3px);
  transition:opacity 260ms ease-out,transform 350ms ease-out;
}
#ponti-luce-elegante.is-scroll-closing .pl-luce-guide{
  opacity:0;transition:opacity 170ms ease-out;
}
#ponti-luce-elegante.is-scroll-closing .pl-luce-edge,
#ponti-luce-elegante.is-scroll-closing .pl-luce-sweep{
  opacity:0;animation:none;transition:opacity 100ms ease;
}
@media (max-width:800px){
 #ponti-luce-elegante .pl-luce-panel{max-width:calc(100vw - 24px)}
 #ponti-luce-elegante .pl-luce-body{gap:13px;padding:15px 51px 15px 13px}
 #ponti-luce-elegante .pl-luce-image{flex-basis:115px;max-height:132px;min-height:110px}
 #ponti-luce-elegante .pl-luce-title{font-size:20px}
 #ponti-luce-elegante .pl-luce-description{font-size:13px;-webkit-line-clamp:2}
 #ponti-luce-elegante .pl-luce-kicker{font-size:11px}
 #ponti-luce-elegante .pl-luce-read{padding:7px 12px;font-size:13px}

}
@media (max-width:470px){
 #ponti-luce-elegante .pl-luce-body{align-items:flex-start;padding:13px 44px 14px 12px;min-height:160px}
 #ponti-luce-elegante .pl-luce-image{flex-basis:88px;max-height:96px;min-height:88px}
 #ponti-luce-elegante .pl-luce-title{font-size:17px;line-height:1.2}
 #ponti-luce-elegante .pl-luce-description{display:none}
 #ponti-luce-elegante .pl-luce-read{margin-top:7px}
 #ponti-luce-elegante .pl-luce-controls{right:6px;top:6px;gap:3px}
 #ponti-luce-elegante .pl-luce-controls button{width:27px;height:27px}
}
@media (prefers-reduced-motion:reduce){
 .pl-luce-target-mark{animation:none!important}
 #ponti-luce-elegante.pl-luce *,#ponti-luce-elegante.pl-luce *::before,#ponti-luce-elegante.pl-luce *::after{animation:none!important;transition:none!important}
}

/* 1.3.2 — Geometria adattiva: JS misura la testata e la sezione Notizie.
   I selettori restano limitati al plugin per non modificare il tema. */
#ponti-luce-elegante.pl-mode-compact .pl-luce-panel {
  min-height:0;max-width:calc(100vw - 24px);border-radius:12px;
}
#ponti-luce-elegante.pl-mode-compact .pl-luce-body {
  min-height:93px;gap:0;padding:11px 78px 11px 17px;align-items:center;
}
#ponti-luce-elegante.pl-mode-compact .pl-luce-image,
#ponti-luce-elegante.pl-mode-compact .pl-luce-description {display:none}
#ponti-luce-elegante.pl-mode-compact .pl-luce-title {
  font-size:clamp(16px,1.65vw,21px);line-height:1.2;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
}
#ponti-luce-elegante.pl-mode-compact .pl-luce-kicker{font-size:10px;margin-bottom:4px}
#ponti-luce-elegante.pl-mode-compact .pl-luce-read{font-size:12px;padding:5px 11px}
#ponti-luce-elegante.pl-mode-compact .pl-luce-controls{right:9px;top:9px}
/* Quando non c'e' spazio sopra Notizie, la notifica prende una riga
   nel normale flusso prima della sezione: non copre mai una card. */
#ponti-luce-elegante.pl-mode-inline {
  position:relative;inset:auto;display:flex;justify-content:center;
  z-index:5;pointer-events:none;width:100%;min-height:0;
  margin:12px auto 20px;grid-column:1 / -1;
  max-height:520px;transition:max-height 550ms ease,margin 550ms ease;
}
#ponti-luce-elegante.pl-mode-inline .pl-luce-panel{
  position:relative;left:auto;top:auto;max-width:calc(100% - 16px);
  margin:0 auto;transform:none;
}
#ponti-luce-elegante.pl-mode-inline .pl-luce-edge,
#ponti-luce-elegante.pl-mode-inline .pl-luce-guide{display:none!important}
#ponti-luce-elegante.pl-mode-inline.is-closing .pl-luce-panel{
  transform:translateX(-23px);
}
#ponti-luce-elegante.pl-mode-inline.is-scroll-closing .pl-luce-panel{
  transform:translateX(-18px);
}
@media (max-width:470px){
  #ponti-luce-elegante.pl-mode-compact .pl-luce-body{
    min-height:100px;padding:12px 72px 12px 13px;
  }
  #ponti-luce-elegante.pl-mode-compact .pl-luce-title{font-size:17px}
}

/* All'uscita la riga temporanea si richiude gradualmente: evita
   lo spostamento brusco delle notizie mentre l'utente scorre. */
#ponti-luce-elegante.pl-mode-inline.is-scroll-closing,
#ponti-luce-elegante.pl-mode-inline.is-closing {
  max-height:0;margin-top:0;margin-bottom:0;overflow:hidden;
}
