/* DLN Live UI — header vivo, orari, Ultim'ora live, interruttore Notizie / Dietro le notizie */

/* Un solo Ultim'ora: via la striscia doppia della home */
.dln-home .dln-topbar{display:none!important}

/* Cielo del masthead secondo l'orario */
.dln-masthead{transition:background-color 1.2s}
.dln-masthead::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.9;transition:opacity 1.2s}
html[data-tod="alba"] .dln-masthead{background:#141433}
html[data-tod="alba"] .dln-masthead::after{background:radial-gradient(120% 140% at 85% 120%,rgba(255,150,90,.38),transparent 55%),linear-gradient(180deg,rgba(60,40,110,.35),transparent)}
html[data-tod="giorno"] .dln-masthead::after{background:radial-gradient(120% 140% at 80% -20%,rgba(70,140,255,.28),transparent 60%)}
html[data-tod="sera"] .dln-masthead{background:#120c1c}
html[data-tod="sera"] .dln-masthead::after{background:radial-gradient(130% 150% at 15% 130%,rgba(230,107,36,.42),transparent 55%),linear-gradient(180deg,rgba(120,40,60,.25),transparent)}
html[data-tod="notte"] .dln-masthead{background:#02040b}
html[data-tod="notte"] .dln-masthead::after{background:radial-gradient(90% 120% at 90% 0%,rgba(60,90,200,.18),transparent 60%)}
.dln-masthead__strip,.dln-masthead__main,.dln-masthead__ticker{position:relative;z-index:1}

/* Saluto + orologi */
.dln-masthead__date{gap:6px!important}
.dlu-greet{color:#fff;font-weight:700}
.dlu-sep{opacity:.45;margin:0 2px}
.dlu-clocks{display:flex;gap:14px;margin-left:auto;margin-right:18px;font-size:11px;color:rgba(163,185,220,.7);white-space:nowrap}
.dlu-clocks b{color:#e8eefb;font-weight:700;font-variant-numeric:tabular-nums}
.dln-masthead__strip .dln-masthead__inner{display:flex;align-items:center}
@media (max-width:900px){.dlu-clocks{display:none}}

/* Ultim'ora live */
a.dlu-ti{color:rgba(219,228,245,.92)!important;text-decoration:none!important;transition:color .2s}
a.dlu-ti:hover,a.dlu-ti:focus-visible{color:#fff!important;text-decoration:underline!important}
.dlu-tt{display:inline-flex;align-items:center;gap:6px;margin-right:2px;padding:2px 8px;border-radius:999px;background:rgba(206,43,55,.22);border:1px solid rgba(206,43,55,.55);color:#ffd5d9;font-weight:800;font-size:11px;font-variant-numeric:tabular-nums}
.dlu-tt i{width:6px;height:6px;border-radius:50%;background:#ff4d5e}
@media (prefers-reduced-motion:no-preference){.dlu-tt i{animation:dlu-blink 1.4s ease-in-out infinite}}
@keyframes dlu-blink{50%{opacity:.25}}

/* Interruttore nell'header */
.dlu-mode-item{display:flex;align-items:center;list-style:none}
.dlu-mode{position:relative;display:inline-flex;align-items:center;padding:3px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.06);cursor:pointer;font-family:inherit;font-size:11px;font-weight:700;line-height:1;letter-spacing:.08em;text-transform:uppercase;color:rgba(219,228,245,.8);min-height:34px}
.dlu-mode>span{position:relative;z-index:1;display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:999px;transition:color .25s,background .25s}
.dlu-mode svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dlu-mode-a{background:#fff;color:#0b1424}
html[data-dln-mode="dietro"] .dlu-mode-a{background:transparent;color:rgba(219,228,245,.8)}
html[data-dln-mode="dietro"] .dlu-mode-b{background:#e66b24;color:#fff}
.dlu-mode:focus-visible{outline:3px solid #60a5fa;outline-offset:2px}
.dlu-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Modalità "Dietro": le citazioni compaiono nelle card */
.dlu-dq{display:none}
html[data-dln-mode="dietro"] .dlu-dq{display:block;margin:8px 0 2px;padding:10px 12px 10px 14px;border-left:3px solid #e66b24;border-radius:0 10px 10px 0;background:#fff6ef;color:#3a2a1f;font:italic 500 .92rem/1.45 Georgia,"Times New Roman",serif;text-transform:none;letter-spacing:0}
html[data-dln-mode="dietro"] .dlu-dq .dlu-dq-k{display:block;margin-bottom:3px;font:800 .62rem/1 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;font-style:normal;color:#c0392b}
html[data-dln-mode="dietro"] .dlu-dq--over{position:absolute;inset:0;z-index:3;margin:0;border:0;border-radius:inherit;display:flex;flex-direction:column;justify-content:flex-end;padding:22px;background:linear-gradient(180deg,rgba(11,23,48,.55),rgba(11,23,48,.96) 55%);color:#fff;font-size:1.05rem}
html[data-dln-mode="dietro"] .dlu-dq--over .dlu-dq-k{color:#f2a16b}
html[data-dln-mode="dietro"] .dln-feature-card{position:relative}
html[data-dln-mode="dietro"] .dln-more-card,html[data-dln-mode="dietro"] .dln-rail-item{box-shadow:inset 3px 0 0 #e66b24}
@media (prefers-reduced-motion:no-preference){
html[data-dln-mode="dietro"] .dlu-dq{animation:dlu-flip .45s cubic-bezier(.2,.8,.2,1)}
}
@keyframes dlu-flip{from{opacity:0;transform:perspective(600px) rotateX(-35deg);transform-origin:top}to{opacity:1;transform:none}}

/* Sera e notte: la sezione live si fa scura */
html[data-tod="sera"] .dlh,html[data-tod="notte"] .dlh{background:linear-gradient(180deg,#0b1424,#101d36);color:#e8eefb;margin-top:0;padding-bottom:28px}
html[data-tod="notte"] .dlh{background:linear-gradient(180deg,#03060f,#0b1424)}
html[data-tod="sera"] .dlh .dlh-h,html[data-tod="notte"] .dlh .dlh-h{color:#fff}
html[data-tod="sera"] .dlh .dlh-up,html[data-tod="notte"] .dlh .dlh-up{color:#9fb3d6}
html[data-tod="sera"] .dlh .dlh-up b,html[data-tod="notte"] .dlh .dlh-up b{color:#fff}

/* Ultim'ora: pausa al passaggio del mouse */
.dln-masthead__ticker:hover .dln-masthead__ticker-inner,.dln-masthead__ticker:focus-within .dln-masthead__ticker-inner{animation-play-state:paused}

/* La linea del giorno */
body.dln-v2 #masthead.dlu-has-day::after{display:none}
#masthead.dlu-has-day{position:relative;overflow:visible}
.dlu-day{position:absolute;left:0;right:0;bottom:0;height:4px;background:rgba(255,255,255,.1);z-index:50}
.dlu-day-fill{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#009246,#e8eefb 50%,#ce2b37);background-size:100vw 100%;transition:width 1s}
.dlu-day-fill em{position:absolute;right:-5px;top:50%;width:10px;height:10px;margin-top:-5px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px rgba(206,43,55,.45),0 0 12px rgba(255,255,255,.8)}
.dlu-day-h{position:absolute;top:0;bottom:0;width:1px;background:rgba(255,255,255,.35)}
.dlu-day-h span{position:absolute;top:7px;left:3px;font:700 9px/1 system-ui,sans-serif;color:#9aa6b8;letter-spacing:.04em}
.dlu-day-dot{position:absolute;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:#ce2b37;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.4);z-index:2;transition:transform .2s}
.dlu-day-dot:hover,.dlu-day-dot:focus-visible{transform:scale(1.35);outline:none}
.dlu-day-dot span{position:absolute;top:16px;left:50%;transform:translate(-50%,4px);width:max-content;max-width:280px;padding:8px 11px;border-radius:10px;background:#0b1424;color:#fff;font:600 12px/1.35 system-ui,sans-serif;white-space:normal;box-shadow:0 10px 24px -10px rgba(0,0,0,.6);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}
.dlu-day-dot span b{display:block;color:#ff8a95;font-size:11px;margin-bottom:2px}
.dlu-day-dot:hover span,.dlu-day-dot:focus-visible span{opacity:1;transform:translate(-50%,0)}
@media (prefers-reduced-motion:no-preference){.dlu-day-fill em{animation:dlu-glow 2.4s ease-in-out infinite}}
@keyframes dlu-glow{50%{box-shadow:0 0 0 6px rgba(206,43,55,.12),0 0 18px rgba(255,255,255,.9)}}
@media (max-width:640px){.dlu-day-h span{display:none}.dlu-day-dot{width:10px;height:10px;margin:-5px 0 0 -5px}}

/* Interruttore su telefono */
.dlu-mode-m{display:none}
@media (max-width:1024px){
.dlu-mode-m{display:inline-flex;align-items:center;gap:5px;margin-right:8px;min-height:36px;padding:0 12px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);color:#e8eefb;font-family:inherit;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.dlu-mode-m svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html[data-dln-mode="dietro"] .dlu-mode-m{background:#e66b24;border-color:#e66b24;color:#fff}
}

/* Ultime notizie: immagini della stessa altezza del testo */
.dln-more-thumb{position:relative;align-self:stretch}
.dln-more-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.dln-more-card{align-items:center}
@media (min-width:768px){.dln-more-grid>.dln-more-card:last-child:nth-child(odd){display:none}}

/* Opinioni: titoli leggibili sulle foto */
.dln-feature-card .dln-card-shade{background:linear-gradient(180deg,rgba(7,13,26,0) 25%,rgba(7,13,26,.55) 55%,rgba(7,13,26,.95) 100%)!important}
.dln-feature-card .dln-card-copy strong{color:#fff!important;text-shadow:0 2px 12px rgba(0,0,0,.55)}
.dln-feature-card .dln-card-copy small{color:#d6deeb!important}

/* Categorie: nomi leggibili */
.dln-cat-tile strong{color:#fff!important;text-shadow:0 2px 14px rgba(0,0,0,.6);font-size:1.15rem}
.dln-cat-tile small{color:rgba(255,255,255,.9)!important;text-shadow:0 1px 8px rgba(0,0,0,.6)}
.dln-cat-tile>span{background:linear-gradient(180deg,rgba(7,13,26,.15),rgba(7,13,26,.7))!important}

/* Respiro tra In primo piano e Opinioni */
.dpp{padding-bottom:34px}
