
/* ======================================================================
   0x_GREENWASH THEME — hacker/terminal design system
   Sfondo nero, testo bianco, accenti arancione neon.
   Un file unico da importare su tutto il sito.
   ====================================================================== */

/* ---------- 1. DESIGN TOKENS ---------- */
:root{
  /* colori base */
  --bg:            #06070a;
  --bg-2:          #0b0d12;
  --bg-3:          #0e1015;
  --line:          #1b1e26;
  --line-soft:     #14161c;

  --fg:            #e8e8e8;
  --fg-muted:      #b8bcc4;
  --dim:           #7a7f8a;

  --orange:        #ff6a00;
  --orange-2:      #ffb347;
  --orange-dim:    #cc5500;
  --orange-glow:   rgba(255,106,0,0.55);
  --orange-soft:   rgba(255,106,0,0.08);

  --danger:        #ff5f56;
  --warn:          #ffbd2e;
  --ok:            #27c93f;

  /* tipografia */
  --font-mono:  "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, Menlo, monospace;
  --font-body:  var(--font-mono);

  /* scala tipografica */
  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-base: 15px;
  --fs-md:   16px;
  --fs-lg:   19px;
  --fs-xl:   24px;
  --fs-2xl:  32px;
  --fs-3xl:  44px;

  /* spaziatura */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 14px;
  --sp-4: 20px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 72px;

  /* forme */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* ombre / glow */
  --glow-sm: 0 0 8px 2px var(--orange-glow);
  --glow-md: 0 0 18px var(--orange-glow);
  --glow-lg: 0 20px 60px -20px rgba(255,106,0,0.18);
}

/* ---------- 2. RESET DI BASE ---------- */
*, *::before, *::after{ box-sizing: border-box; }

html{
  color-scheme: dark;
  scroll-behavior: smooth;
  height: 100%;
}

body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--navbar-h) !important; /* sostituisce il fisso 40px */
}

::selection{ background: var(--orange); color: #000; }

/* scanline overlay opzionale: aggiungi <div class="scan"></div> subito dopo <body> */
.scan{
  pointer-events: none;
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0px,
    rgba(255,255,255,0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  z-index: 50;
}

img, picture, video, canvas, svg{ display: block; max-width: 100%; }

/* ---------- 3. TITOLI ---------- */
h1, h2, h3, h4, h5, h6{
  color: var(--fg);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 0 0 var(--sp-3);
}

h1{
  font-size: clamp(28px, 5vw, var(--fs-3xl));
  letter-spacing: -0.5px;
  margin-bottom: var(--sp-2);
}
/* Per evidenziare parte del titolo, avvolgi il testo in <span class="hl"> */
h1 .hl, h2 .hl{
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px var(--orange-glow));
}

h2{
  font-size: var(--fs-lg);
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
/* linea decorativa dopo h2, coerente con lo stile "terminale" */
h2::after{
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

h3{
  font-size: var(--fs-xl);
  color: var(--orange-2);
  margin-top: var(--sp-5);
}

h4{
  font-size: var(--fs-md);
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

h5{
  font-size: var(--fs-base);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

h6{
  font-size: var(--fs-sm);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* eyebrow/kicker: etichetta piccola sopra un titolo, stile "$ comando" */
.kicker{
  color: var(--orange);
  font-size: var(--fs-xs);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
  opacity: .9;
}
.kicker::before{ content: "$ "; color: var(--dim); }

/* ---------- 4. TESTO / PARAGRAFI / INLINE ---------- */
p{
  margin: 0 0 var(--sp-4);
  color: var(--fg-muted);
}

small{ font-size: var(--fs-xs); color: var(--dim); }

strong, b{ color: var(--orange-2); font-weight: 700; }

em, i{ color: var(--fg); font-style: italic; }

mark{
  background: var(--orange-soft);
  color: var(--orange-2);
  padding: 0 4px;
  border-radius: 3px;
}

del, s{ color: var(--dim); text-decoration: line-through; }
ins, u{ color: var(--fg); text-decoration: underline; text-decoration-color: var(--orange); }

sub, sup{ font-size: 0.7em; }

abbr[title]{
  text-decoration: underline dotted var(--dim);
  cursor: help;
}

/* sottotitolo / lead usato sotto h1: <p class="subtitle"> */
.subtitle{
  color: var(--dim);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-6);
  border-left: 2px solid var(--orange);
  padding-left: var(--sp-3);
}

hr{
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--sp-6) 0;
}

/* ---------- 5. LINK ---------- */
a{
  color: var(--orange-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 179, 71, 0.35);
  transition: color .15s ease, border-color .15s ease, text-shadow .15s ease;
}
a:hover{
  color: var(--orange);
  border-color: var(--orange);
  text-shadow: 0 0 10px var(--orange-glow);
}
a:active{ color: var(--orange-dim); }
a:focus-visible{
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}
a:visited{ color: #d99a5c; }

/* link "muto", es. nella nav o nel footer */
a.link-muted{
  color: var(--dim);
  border-bottom-color: transparent;
}
a.link-muted:hover{ color: var(--orange-2); }

/* ---------- 6. LISTE ---------- */
ul, ol{
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-5);
  color: var(--fg-muted);
}
li{ margin-bottom: var(--sp-2); }
li::marker{ color: var(--orange); }

dl{ margin: 0 0 var(--sp-4); }
dt{ color: var(--orange-2); font-weight: 700; margin-top: var(--sp-3); }
dd{ margin: var(--sp-1) 0 0; color: var(--fg-muted); padding-left: var(--sp-3); }

/* lista "card", stile findings del blog: <ul class="findings"> */
ul.findings{
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-4);
  display: grid;
  gap: var(--sp-3);
}
ul.findings li{
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  margin: 0;
}
ul.findings li b{
  color: var(--orange-2);
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

/* ---------- 7. CITAZIONI E CODICE ---------- */
blockquote{
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--orange);
  background: var(--bg-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--fg-muted);
  font-style: italic;
}
blockquote footer, blockquote cite{
  display: block;
  margin-top: var(--sp-2);
  font-style: normal;
  font-size: var(--fs-xs);
  color: var(--dim);
}

code, kbd, samp{
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--orange-2);
  background: var(--orange-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

kbd{
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--bg-3);
  color: var(--fg);
}

pre{
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  overflow-x: auto;
  margin: 0 0 var(--sp-4);
}
pre code{
  background: none;
  padding: 0;
  color: var(--fg);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

/* blocco "finestra terminale": <div class="terminal"><div class="term-bar">...</div><div class="term-body">...</div></div> */
.terminal{
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), var(--glow-lg);
  margin-bottom: var(--sp-5);
  overflow: hidden;
}
.term-bar{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.term-bar i{ width: 10px; height: 10px; border-radius: 50%; background: #333; }
.term-bar i:nth-child(1){ background: var(--danger); }
.term-bar i:nth-child(2){ background: var(--warn); }
.term-bar i:nth-child(3){ background: var(--ok); }
.term-title{ margin-left: var(--sp-2); color: var(--dim); font-size: var(--fs-xs); letter-spacing: 1px; }
.term-body{ padding: var(--sp-4); font-size: var(--fs-md); }
.term-body p:last-child{ margin-bottom: 0; }
.prompt{ color: var(--orange); }
.prompt::before{ content: "> "; }

/* ---------- 8. TABELLE ---------- */
table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-sm);
}
caption{
  caption-side: top;
  text-align: left;
  color: var(--dim);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--sp-2);
}
thead th{
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--fs-xs);
  text-align: left;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--orange);
}
tbody td, tfoot td{
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
  color: var(--fg-muted);
}
tbody tr:hover{ background: var(--orange-soft); }
tfoot td{ color: var(--dim); font-size: var(--fs-xs); }

/* ---------- 9. FORM ---------- */
form{ margin: 0 0 var(--sp-4); }

fieldset{
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  margin: 0 0 var(--sp-4);
}
legend{
  color: var(--orange);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0 var(--sp-2);
}

label{
  display: block;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-1);
}

input, textarea, select, button{
  font-family: var(--font-mono);
  font-size: var(--fs-base);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea,
select{
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: 10px var(--sp-3);
  margin-bottom: var(--sp-3);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder{ color: var(--dim); }

input:focus, textarea:focus, select:focus{
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

textarea{ resize: vertical; min-height: 100px; }

select{ appearance: none; cursor: pointer; }

input[type="checkbox"], input[type="radio"]{
  accent-color: var(--orange);
  width: 16px; height: 16px;
  margin-right: var(--sp-2);
}

input[type="range"]{ accent-color: var(--orange); width: 100%; }

/* pulsante primario */
button, input[type="submit"], input[type="button"], .btn{
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--orange);
  color: #06070a;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: var(--fs-sm);
  border: 1px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 10px var(--sp-4);
  cursor: pointer;
  transition: box-shadow .15s ease, transform .1s ease, background .15s ease;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover, .btn:hover{
  box-shadow: var(--glow-sm);
  background: var(--orange-2);
}
button:active, .btn:active{ transform: translateY(1px); }
button:focus-visible, .btn:focus-visible{
  outline: 2px solid var(--orange-2);
  outline-offset: 2px;
}
button:disabled, .btn:disabled{
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}

/* variante pulsante "outline" secondario */
.btn-outline{
  background: transparent;
  color: var(--orange);
}
.btn-outline:hover{ background: var(--orange-soft); color: var(--orange-2); }

/* ---------- 10. STRUTTURA DI PAGINA ---------- */
header{
  border-bottom: 1px solid var(--line);
  padding: var(--sp-4) 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(6,7,10,0.85);
  backdrop-filter: blur(6px);
  z-index: 10;
}

nav{ color: var(--dim); font-size: var(--fs-xs); }
nav ul{ list-style: none; padding: 0; margin: 0; display: flex; gap: var(--sp-4); }
nav li{ margin: 0; }
nav a{ color: var(--fg-muted); border-bottom: none; }
nav a:hover{ color: var(--orange); }

main{
  flex: 1 0 auto;
  max-width: 820px;
  margin: 0 auto;
  padding: var(--sp-3) 4vw var(--sp-4);  /* top/bottom molto ridotti */
}

section{ margin-bottom: var(--sp-6); }

article{
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}

aside{
  border-left: 2px solid var(--orange);
  padding-left: var(--sp-3);
  color: var(--dim);
  font-size: var(--fs-sm);
}

footer{
  max-width: 820px;
  margin: 0 auto;
  padding: 0 6vw var(--sp-6);
  color: var(--dim);
  font-size: var(--fs-xs);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: var(--sp-4);
}
footer a{ color: var(--dim); border-bottom: none; }
footer a:hover{ color: var(--orange); }

figure{ margin: 0 0 var(--sp-4); }
figcaption{
  color: var(--dim);
  font-size: var(--fs-xs);
  margin-top: var(--sp-2);
  text-align: center;
}

/* elementi "brand" e "dot" pulsante, coerenti col design originale */
.brand{
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: var(--glow-md);
  font-size: var(--fs-sm);
}
.brand span{ color: var(--dim); font-weight: 400; }

.dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  box-shadow: var(--glow-sm);
  display: inline-block;
  margin-right: var(--sp-2);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse{
  0%, 100%{ opacity: 1; }
  50%{ opacity: .35; }
}

/* box "verdetto" / callout finale */
.callout{
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--orange);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255,106,0,0.06), transparent);
  box-shadow: 0 0 40px -10px var(--orange-glow) inset;
}
.callout p{ margin: 0; color: var(--fg); }

/* ---------- 11. ELEMENTI VARI ---------- */
progress{
  width: 100%;
  height: 6px;
  accent-color: var(--orange);
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
}

meter{ accent-color: var(--orange); }

details{
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
}
summary{
  cursor: pointer;
  color: var(--orange-2);
  font-weight: 700;
  outline: none;
}
details[open] summary{ margin-bottom: var(--sp-2); color: var(--orange); }

dialog{
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--orange);
  border-radius: var(--radius-md);
  box-shadow: var(--glow-lg);
}
dialog::backdrop{ background: rgba(0,0,0,0.7); }

::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover{ background: var(--orange-dim); }

/* codice etichetta piccola, es. <code class="tag">acceso</code> */
code.tag{
  color: var(--orange-2);
  background: var(--orange-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ---------- 12. RESPONSIVE ---------- */
@media (max-width: 560px){
  header{ padding: var(--sp-3) 5vw; }
  main{ padding: var(--sp-2) 4vw var(--sp-3);}
  nav ul{ display: none; }
  h2{ font-size: var(--fs-md); }
}

/* ======================================================================
   14. BOOTSTRAP COMPATIBILITY LAYER
   Il sito usa Bootstrap 5 per navbar/grid. Queste regole riskinnano
   i componenti bootstrap più comuni senza dover toccare l'HTML/PHP.
   Va importato DOPO bootstrap.min.css nell'head.
   ====================================================================== */

/* navbar */
.navbar{
  background: var(--bg-2) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  padding-top: var(--sp-3);
  padding-bottom: var(--sp-3);
  position: fixed;
  top: 0;
  left: 0;
  right: 0; /* per estenderla su tutta la larghezza */
  z-index: 1000;
}
.navbar .navbar-nav .nav-link{
  color: var(--fg-muted) !important;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.5px;
  padding: 8px var(--sp-3) !important;
  transition: color .15s ease, text-shadow .15s ease;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus{
  color: var(--orange) !important;
  text-shadow: 0 0 10px var(--orange-glow);
}
.navbar .navbar-nav .nav-link.active{
  color: var(--orange-2) !important;
}

/* hamburger menu mobile */
.navbar-toggler{
  border-color: var(--line) !important;
}
.navbar-toggler:focus{
  box-shadow: 0 0 0 3px var(--orange-soft) !important;
}
.navbar-toggler-icon{
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 106, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* container / griglia: non toccano il layout, solo colore testo di base */
.container, .container-fluid, .row, .col, [class^="col-"]{
  color: var(--fg-muted);
}

/* bottoni bootstrap standard, se usati altrove sul sito */
.btn-primary{
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: #06070a !important;
}
.btn-primary:hover{
  background: var(--orange-2) !important;
  border-color: var(--orange-2) !important;
}
.btn-outline-primary{
  color: var(--orange) !important;
  border-color: var(--orange) !important;
  background: transparent !important;
}
.btn-outline-primary:hover{
  background: var(--orange-soft) !important;
}

/* card bootstrap */
.card{
  background: var(--bg-2) !important;
  border: 1px solid var(--line) !important;
  color: var(--fg-muted);
}
.card-title{ color: var(--orange-2); }
.card-header, .card-footer{
  background: var(--bg-3) !important;
  border-color: var(--line) !important;
}

/* alert bootstrap, riportati sui toni del tema */
.alert{
  background: var(--bg-2) !important;
  border: 1px solid var(--orange) !important;
  color: var(--fg) !important;
  border-left-width: 3px !important;
}

/* badge */
.badge{
  background: var(--orange-soft) !important;
  color: var(--orange-2) !important;
  font-weight: 700;
}

/* logo home, elemento specifico del sito */
.logohome{
  max-width: 220px;
  height: clamp(80px, 20vh, 160px); /* min 80px, max 160px */
  object-fit: contain;
  margin: var(--sp-6) auto;
  filter: drop-shadow(0 0 20px var(--orange-glow));
}

/* ======================================================================
   15. WIDGET PREZZI CRYPTO (widgets.php)
   Riskinna le classi esistenti .widgets/.price/.widicons senza
   toccare l'HTML o lo script di fetch dei prezzi.
   ====================================================================== */
.widgets{
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-1) var(--sp-1);
  transition: border-color .2s ease, box-shadow .2s ease;

  /* dimensione fissa per tutti i widget */
  width: 220px;
  min-height: 80px;
  box-sizing: border-box;
}
.widgets:hover{
  border-color: var(--orange);
  box-shadow: var(--glow-sm);
}
.widicons{
  filter: drop-shadow(0 0 6px var(--orange-glow));
}
.price{
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--orange-2);
  font-size: var(--fs-md);
  letter-spacing: 0.5px;
}
.centratura{
  display: flex;
  justify-content: center;
}
.altezzarigheindex{
  padding: var(--sp-3) 0;
}

/* ======================================================================
   16. FOOTER SITO (pdp.php)
   Sostituisce lo <style> inline con bg bianco: qui il footer diventa
   coerente con lo sfondo nero e gli accenti arancioni del tema.
   ====================================================================== */
.footer-moderno{
  width: 100%;
  max-width: none;
  margin-top: auto;
}
.footer-moderno h5{
  color: var(--orange) !important;
}
.footer-moderno .text-muted-custom{
  color: var(--dim) !important;
}
.footer-moderno .btn-sostieni{
  background: linear-gradient(135deg, var(--orange), var(--orange-2)) !important;
  color: #06070a !important;
  border: none;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 20px -6px var(--orange-glow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.footer-moderno .btn-sostieni:hover{
  transform: translateY(-3px);
  box-shadow: 0 6px 26px -6px var(--orange-glow);
  color: #06070a !important;
}
.footer-moderno .social-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: 1.2rem;
  transition: all .25s ease;
}
.footer-moderno .social-icon:hover{
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-4px) scale(1.1);
  box-shadow: var(--glow-sm);
}

/* ======================================================================
   17. BLOG FEED / POST CARDS (blog.php)
   Riskinna le card dei post (locali + Mastodon) in stile scuro.
   Le classi HTML restano invariate: .post, .post-featured, .post-small,
   .avatar, .post-title, .post-content, .post-source, .reply-btn ecc.
   ====================================================================== */
#feed-wrapper{
  font-family: var(--font-mono);
}

.post{
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color .2s ease, transform .15s ease, box-shadow .2s ease;
  animation: postFadeIn .4s ease;
  min-width: 0;
}
.post:hover{
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: var(--glow-sm);
}

.post-featured{
  padding: var(--sp-5) 28px;
  margin: 0 auto var(--sp-5) auto;
  max-width: 640px;
}
.post-featured .post-title{ font-size: 1.3rem; }
.post-featured .avatar{ width: 52px; height: 52px; font-size: 1.15rem; }
.post-featured .avatar-img{ width: 52px; height: 52px; }

.post-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}

.post-small{ padding: 12px var(--sp-3); font-size: .85rem; }
.post-small .avatar{ width: 32px; height: 32px; font-size: .8rem; }
.post-small .avatar-img{ width: 32px; height: 32px; }
.post-small .post-title{ font-size: .9rem; margin-bottom: var(--sp-1); }
.post-small .post-content{ font-size: .8rem; overflow: visible; }
.post-small .post-date{ font-size: .65rem; }

@media (max-width: 992px){ .post-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px){ .post-grid{ grid-template-columns: 1fr; } }

.post-header{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.avatar{
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #06070a;
  width: 42px;
  height: 42px;
}
.avatar-img{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info{ display: flex; flex-direction: column; align-items: center; }
.author-name{ font-weight: 700; color: var(--fg); }
.post-date{ color: var(--dim); font-size: var(--fs-xs); }

.post-title{
  font-weight: 700;
  color: var(--orange-2);
  margin-bottom: var(--sp-2);
}

.post-content{
  line-height: 1.5;
  color: var(--fg-muted);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.post-actions{
  display: flex;
  justify-content: center;
  gap: var(--sp-5);
  margin-top: var(--sp-3);
  color: var(--dim);
  font-size: .85rem;
}

.post-source{
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: var(--sp-2);
}
.badge-local{
  background: var(--orange-soft);
  color: var(--orange-2);
}
.badge-mastodon{
  background: rgba(99, 100, 255, 0.14);
  color: #9a9bff;
}

.reply-btn{
  display: inline-block;
  margin-top: var(--sp-2);
  padding: 6px var(--sp-4);
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #06070a;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  transition: box-shadow .2s ease, transform .15s ease;
}
.reply-btn:hover{
  box-shadow: var(--glow-sm);
  transform: translateY(-1px);
  color: #06070a;
}

.loading, .empty-state{
  text-align: center;
  color: var(--dim);
  padding: var(--sp-6) 0;
}

@keyframes postFadeIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* ======================================================================
   18. ARTICOLI / FEED RSS (articoli/index.php)
   Le variabili --mp-* sono scopate dentro .mp-articles (non :root!)
   per non collidere con le variabili globali del tema su altre pagine.
   Avvolgi il contenuto dello snippet in <div class="mp-articles">.
   ====================================================================== */
.mp-articles{
  --mp-primary:        var(--orange);
  --mp-primary-hover:  var(--orange-2);
  --mp-primary-hl:     var(--orange-soft);
  --mp-text:           var(--fg);
  --mp-text-muted:     var(--fg-muted);
  --mp-text-faint:     var(--dim);
  --mp-surface:        var(--bg-2);
  --mp-surface-off:    var(--bg-3);
  --mp-divider:        var(--line);
  --mp-shadow-sm:      0 1px 2px rgba(0,0,0,.35);
  --mp-shadow-md:      0 8px 28px -10px var(--orange-glow);

  --mp-r-sm: 4px; --mp-r-md: 8px; --mp-r-lg: 12px; --mp-r-xl: 14px; --mp-r-full: 9999px;
  --mp-tx: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --mp-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --mp-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --mp-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --mp-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --mp-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  --mp-s1: 0.25rem; --mp-s2: 0.5rem;  --mp-s3: 0.75rem;
  --mp-s4: 1rem;    --mp-s5: 1.25rem; --mp-s6: 1.5rem;
  --mp-s8: 2rem;    --mp-s10: 2.5rem; --mp-s12: 3rem;
  --mp-s16: 4rem;   --mp-s20: 5rem;

  font-family: var(--font-mono);
}

.mp-hero{
  padding-block: clamp(var(--mp-s12), 6vw, var(--mp-s20));
  border-bottom: 1px solid var(--mp-divider);
}
.mp-hero-label{
  display: inline-flex; align-items: center; gap: var(--mp-s2);
  font-size: var(--mp-xs); font-weight: 600;
  color: var(--mp-primary); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: var(--mp-s4);
}
.mp-hero h1{
  font-size: var(--mp-2xl); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.1;
  color: var(--mp-text); margin-bottom: var(--mp-s4);
  text-shadow: 0 0 24px var(--orange-glow);
}
.mp-hero p{
  font-size: var(--mp-base); color: var(--mp-text-muted);
  max-width: 55ch; line-height: 1.6;
}

.mp-toolbar{
  display: flex; align-items: center; justify-content: space-between;
  padding-block: var(--mp-s6); gap: var(--mp-s4); flex-wrap: wrap;
}
.mp-meta{
  display: flex; align-items: center; gap: var(--mp-s2);
  font-size: var(--mp-xs); color: var(--mp-text-muted);
}
.mp-dot{
  width: 6px; height: 6px;
  background: var(--mp-primary); border-radius: var(--mp-r-full);
  box-shadow: var(--glow-sm);
  animation: mp-pulse 2s ease-in-out infinite;
}
@keyframes mp-pulse{
  0%,100%{ opacity:1; transform:scale(1) }
  50%    { opacity:.5; transform:scale(.8) }
}
.mp-refresh{
  display: inline-flex; align-items: center; gap: var(--mp-s2);
  font-size: var(--mp-sm); color: var(--mp-text-muted);
  padding: var(--mp-s2) var(--mp-s4); cursor: pointer;
  border: 1px solid var(--mp-divider);
  border-radius: var(--mp-r-full); background: none; font: inherit;
  transition: background var(--mp-tx), color var(--mp-tx), border-color var(--mp-tx);
}
.mp-refresh:hover{ background: var(--mp-surface-off); color: var(--mp-primary); border-color: var(--mp-primary); }
.mp-refresh svg  { transition: transform .5s ease; }
.mp-refresh.spinning svg{ animation: mp-spin .6s linear; }
@keyframes mp-spin{ to { transform: rotate(360deg) } }

#mp-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: var(--mp-s6);
}
#mp-grid .mp-card:first-child{
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--mp-s8); align-items: center;
}

.mp-card{
  background: var(--mp-surface);
  border: 1px solid var(--mp-divider);
  border-radius: var(--mp-r-xl);
  padding: var(--mp-s6);
  display: flex; flex-direction: column; gap: var(--mp-s3);
  box-shadow: var(--mp-shadow-sm);
  opacity: 0; transform: translateY(14px);
  animation: mp-up .4s ease forwards;
  transition: transform var(--mp-tx), box-shadow var(--mp-tx), border-color var(--mp-tx);
}
.mp-card:nth-child(1){ animation-delay:.05s }
.mp-card:nth-child(2){ animation-delay:.12s }
.mp-card:nth-child(3){ animation-delay:.19s }
.mp-card:nth-child(4){ animation-delay:.26s }
.mp-card:nth-child(5){ animation-delay:.33s }
.mp-card:nth-child(6){ animation-delay:.40s }
@keyframes mp-up{ to { opacity:1; transform:translateY(0) } }

.mp-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--mp-shadow-md);
  border-color: var(--mp-primary);
}

.mp-card-top{
  display: flex; align-items: center;
  justify-content: space-between; gap: var(--mp-s2);
}
.mp-badge{
  font-size: var(--mp-xs); font-weight: 600;
  color: var(--mp-primary); background: var(--mp-primary-hl);
  padding: var(--mp-s1) var(--mp-s3);
  border-radius: var(--mp-r-full);
  text-transform: uppercase; letter-spacing: .06em;
}
.mp-date{ font-size: var(--mp-xs); color: var(--mp-text-muted); }
.mp-title{
  font-size: var(--mp-lg); font-weight: 700;
  letter-spacing: -.01em; line-height: 1.25;
  color: var(--mp-text);
  transition: color var(--mp-tx);
}
.mp-card:hover .mp-title{ color: var(--mp-primary); }

.mp-desc{
  font-size: var(--mp-sm); color: var(--mp-text-muted);
  line-height: 1.6; flex: 1; max-width: 65ch;
}
.mp-read{
  display: inline-flex; align-items: center; gap: var(--mp-s2);
  align-self: flex-start;
  font-size: var(--mp-sm); font-weight: 700; color: var(--mp-primary);
  margin-top: var(--mp-s2); text-decoration: none;
  text-transform: uppercase; letter-spacing: .5px;
  background: transparent;
  border: 1px solid var(--mp-primary);
  border-radius: var(--mp-r-full);
  padding: var(--mp-s2) var(--mp-s4);
  transition: gap var(--mp-tx), color var(--mp-tx), background var(--mp-tx), box-shadow var(--mp-tx);
}

.mp-articles .mp-read,
.mp-articles .mp-read:visited {
  color: var(--mp-primary) !important;
}

.mp-articles .mp-read:hover,
.mp-articles .mp-read:focus-visible {
  color: var(--mp-primary-hover) !important;
}

.mp-read:hover{
  gap: var(--mp-s3);
  color: var(--mp-primary-hover);
  background: var(--orange-soft);
  box-shadow: var(--glow-sm);
}

@keyframes mp-shimmer{
  0%  { background-position: -200% 0 }
  100%{ background-position:  200% 0 }
}
.mp-skeleton-wrap{
  background: var(--mp-surface);
  border: 1px solid var(--mp-divider);
  border-radius: var(--mp-r-xl); padding: var(--mp-s6);
  display: flex; flex-direction: column; gap: var(--mp-s4);
}
.mp-sk{
  background: linear-gradient(90deg,
    var(--mp-surface-off) 25%,
    rgba(255,106,0,0.10) 50%,
    var(--mp-surface-off) 75%);
  background-size: 200% 100%;
  animation: mp-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--mp-r-sm);
}
.mp-sk-h   { height: 1.4em; width: 65% }
.mp-sk-sm  { height: .85em; width: 35% }
.mp-sk-md  { height: .85em; width: 60% }
.mp-sk-lg  { height: .85em; width: 85% }
.mp-sk-cta { height: .85em; width: 20% }

.mp-state{
  grid-column: 1/-1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--mp-s20) var(--mp-s8);
  text-align: center; gap: var(--mp-s4);
}
.mp-state svg { width:48px; height:48px; color: var(--mp-text-faint) }
.mp-state-title{ font-size: var(--mp-lg); font-weight: 700; color: var(--mp-text) }
.mp-state-desc { font-size: var(--mp-sm); color: var(--mp-text-muted); max-width: 36ch }

@media (max-width: 768px){
  #mp-grid .mp-card:first-child{ grid-template-columns: 1fr }
  .mp-toolbar{ flex-direction: column; align-items: flex-start }
}

/* ---------- 13. ACCESSIBILITÀ ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible{
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ======================================================================
   19. PAGINA ALTERNATIVE OPEN SOURCE (oss.php)
   Card riutilizzano .card del layer Bootstrap (sezione 14).
   Nuove classi scoped: .oss-container, .oss-card, .oss-img, .oss-platforms
   ====================================================================== */
.oss-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}

.oss-card {
  text-align: center;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.oss-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-sm);
  border-color: var(--orange);
}

.oss-img {
  width: 100%;
  max-width: 150px;
  height: 140px;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin: 0 auto var(--sp-3);
  background: var(--bg-3);
  padding: 6px;
}

.oss-desc {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  margin-bottom: var(--sp-3);
}

.oss-platforms {
  font-size: 1.2rem;
  color: var(--orange);
  line-height: 1.8;
}

.oss-platforms i {
  margin: 0 2px;
}

.oss-platforms .fa-arrow-right {
  font-size: .8rem;
  color: var(--dim);
  margin: 0 4px;
}

.oss-card-link {
  text-decoration: none;
  border-bottom: none;
  display: block;
  height: 100%;
}

.oss-img-shell {
  position: relative;
  width: 100%;
  max-width: 160px;
  height: 130px;
  margin: 0 auto var(--sp-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 30% 0,
              rgba(255,106,0,0.25),
              transparent 60%);
}

/* glow + integrazione nel tema */
.oss-img-shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at center,
              rgba(255,106,0,0.35),
              transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* l’immagine vera e propria */
.oss-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 14px var(--orange-glow));
}

/* ======================================================================
   20. PAGINA TOOLS (tools.php)
   Blocchi in stile "verdetto" con immagine di sfondo attenuata.
   ====================================================================== */

/* container pagina, riusa layout principale */
.tools-container {
  max-width: 820px;
  margin: 0 auto;
}

/* wrapper blocco tool, riusa base .callout */
.tool-block {
  position: relative;
  overflow: hidden;
}

/* overlay immagine di sfondo, opacità dimezzata */
.tool-bg {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(0.5px);
  mix-blend-mode: screen;
}

/* per-tool background images */
.tool-bg-qrcode  { background-image: url("../00img/qrcode.png"); }
.tool-bg-binario { background-image: url("../00img/binario.png"); }
.tool-bg-ip      { background-image: url("../00img/infoviewer.png"); }
.tool-bg-tastiera{ background-image: url("https://www.michelepelosi.com/strumenti/test-tastiera/img.png"); }
.tool-bg-request {
  background-image: url("../00img/qrcode.png"); /* o un’icona generica */
  filter: blur(5px);
}

/* contenuto sopra lo sfondo */
.tool-content {
  position: relative;
  z-index: 1;
}

/* testi dentro il blocco */
.tool-title {
  margin: 0 0 var(--sp-2);
  color: var(--orange-2);
}

.tool-subtitle {
  margin: 0 0 var(--sp-2);
  color: var(--fg-muted);
  font-size: var(--fs-sm);
}

.tool-meta {
  margin: 0;
  color: var(--dim);
  font-size: var(--fs-xs);
}

/* link wrapper: niente bordo sottolineato sui blocchi */
.tool-link {
  text-decoration: none;
  border-bottom: none;
  display: block;
}

/*-------------------------------fix per la barra-----------------------------*/
:root{
  --navbar-h: 60px; /* fallback iniziale, sovrascritto da JS */
}

/* spazio per la navbar fixed in alto */
body{
  padding-top: var(--navbar-h);
  padding-bottom: var(--pdp-h);
}

/* se preferisci spaziare solo il contenuto (non tutto il body) */
main{
  padding-bottom: var(--pdp-h);
}

/* utile se hai link/ancore che scrollano verso i commenti,
   così non finiscono nascosti sotto il pdp */
.commenti-box{
  scroll-margin-bottom: var(--pdp-h);
}