/* ============================================================
   IL CARDINE — Design System
   Editoriale · SEO/AEO-first · CSS puro (nessun framework)
   Palette brand: navy #16324f · arancio #e8702a
   Font: Playfair Display (700/800) + Source Sans 3 (400/600/700)
   Breakpoint: 720px (mobile) · 1080px (tablet) · container 1180px
   ============================================================ */

:root {
  --navy: #16324f;
  --navy-dark: #0e2237;
  --navy-light: #274a70;
  --orange: #e8702a;
  --orange-dark: #c4551a;
  --orange-soft: #fdf1e7;
  --paper: #ffffff;
  --bg-soft: #f6f7f9;
  --ink: #1f2733;
  --ink-soft: #3d4a5c;
  --mute: #6b7686;
  --line: #e3e7ee;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1180px;
  --radius: 4px;
  --shadow-card: 0 1px 3px rgba(22, 50, 79, .08);
  --shadow-hover: 0 8px 24px rgba(22, 50, 79, .16);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Accessibilità */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--orange); color: #fff; padding: 10px 18px; font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 2px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--navy-dark);
  color: #c8d3e0;
  font-size: 13px;
  border-bottom: 3px solid var(--orange);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; padding-bottom: 6px; gap: 16px; }
.topbar .tb-date { text-transform: capitalize; }
.topbar .tb-links { display: flex; gap: 18px; }
.topbar a { color: #c8d3e0; padding: 4px 2px; }
.topbar a:hover { color: #fff; }

/* ---------- Masthead ---------- */
.masthead { padding: 22px 0 18px; background: var(--paper); }
.masthead .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.masthead .logo { flex-shrink: 0; }
.masthead .logo img { width: min(300px, 58vw); }
.masthead .mh-right { display: flex; align-items: center; gap: 20px; }
.mh-tagline { font-size: 13px; color: var(--mute); max-width: 260px; line-height: 1.4; text-align: right; margin: 0; }
.btn {
  display: inline-block; background: var(--orange); color: #fff !important;
  font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  padding: 12px 22px; border-radius: var(--radius); border: 0; cursor: pointer;
  transition: background .15s ease;
  min-height: 44px;
}
.btn:hover { background: var(--orange-dark); }

/* ---------- Navigazione principale ---------- */
.mainnav {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(22, 50, 79, .03);
}
.mainnav .container { display: flex; align-items: center; }
.mainnav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; flex-wrap: wrap; }
.mainnav a {
  display: block; padding: 13px 14px; font-weight: 700; font-size: 13.5px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--navy);
  border-bottom: 3px solid transparent;
  transition: border-color .15s ease, color .15s ease;
  min-height: 44px;
}
.mainnav a:hover, .mainnav a[aria-current="page"] { color: var(--orange); border-bottom-color: var(--orange); }
.nav-toggle {
  display: none;
  align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 14px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--navy);
}
.nav-toggle .burger { display: inline-block; width: 22px; height: 2px; background: var(--navy); position: relative; }
.nav-toggle .burger::before, .nav-toggle .burger::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--navy);
}
.nav-toggle .burger::before { top: -7px; }
.nav-toggle .burger::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { top: 0; transform: rotate(-45deg); }

/* ---------- Ticker ultim'ora ---------- */
.ticker { background: var(--bg-soft); border-bottom: 1px solid var(--line); font-size: 14px; }
.ticker .container { display: flex; align-items: center; gap: 14px; padding-top: 8px; padding-bottom: 8px; }
.ticker-label {
  background: var(--orange); color: #fff; font-weight: 800; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 2px; white-space: nowrap;
}
.ticker-items { display: flex; gap: 32px; overflow: hidden; white-space: nowrap; }
.ticker-items a { color: var(--ink-soft); }
.ticker-items a::before { content: "›"; color: var(--orange); margin-right: 8px; font-weight: 700; }

/* ---------- Slot pubblicitari (dimensioni riservate, no CLS) ---------- */
.ad-slot {
  background: repeating-linear-gradient(45deg, #f6f7f9, #f6f7f9 12px, #eceff4 12px, #eceff4 24px);
  border: 1px dashed #c2ccd9;
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #8b96a6; text-align: center; margin: 0 auto;
}
.ad-slot .ad-tag { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; }
.ad-slot .ad-size { font-size: 12px; margin-top: 4px; color: #98a2b1; }
.ad-leaderboard { width: min(728px, 100%); min-height: 90px; margin-top: 22px; margin-bottom: 22px; }
.ad-rect { width: 300px; min-height: 250px; }
.ad-halfpage { width: 300px; min-height: 600px; }
.ad-mobile { width: 320px; min-height: 100px; }
.ad-inarticle { float: right; margin: 6px 0 20px 28px; }
.ad-footer { width: min(728px, 100%); min-height: 90px; margin: 26px auto; }

/* ---------- Hero (apertura home) ---------- */
.hero { padding: 26px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.hero-main { position: relative; }
.kicker {
  display: inline-block; color: var(--orange); font-weight: 800; font-size: 12.5px;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px;
}
.kicker::before { content: ""; display: inline-block; width: 22px; height: 3px; background: var(--orange); vertical-align: middle; margin-right: 8px; }
.cat-mini { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.hero-main h1, .hero-main .h-title { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; color: var(--navy); }
.hero-main .h-title a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; }
.hero-main p.standfirst { font-size: 19px; color: var(--ink-soft); margin: 12px 0 14px; }
.byline { font-size: 13.5px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.byline .b-author { font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; font-size: 12.5px; }
.hero-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 24px; }
.hero-side article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hero-side article:last-child { border-bottom: 0; }
.hero-side h3 { font-size: 19px; margin-bottom: 4px; }

/* ---------- Thumb grafiche CSS (segnaposto immagini per silo) ---------- */
.thumb {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--orange) 140%);
  color: #fff; display: flex; align-items: flex-end;
}
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 46px),
                    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 2px, transparent 2px 46px);
}
.thumb .thumb-label {
  position: relative; z-index: 1; font-family: var(--font-head); font-weight: 800;
  font-size: 15px; letter-spacing: .06em; text-transform: uppercase; padding: 12px 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.thumb.t-ristrutturazioni { background: linear-gradient(135deg, #2b1e14 0%, #8a5a2f 60%, #e8702a 140%); }
.thumb.t-serramenti { background: linear-gradient(135deg, #14202e 0%, #4a6a8a 60%, #9fc0dd 140%); }
.thumb.t-energia { background: linear-gradient(135deg, #0e3a4a 0%, #16708f 60%, #f4b942 140%); }
.thumb.t-materiali { background: linear-gradient(135deg, #33241a 0%, #7a5a3a 60%, #d8b08a 140%); }
.thumb.t-impianti { background: linear-gradient(135deg, #0f2a2e 0%, #1a6a70 60%, #7ad0d4 140%); }
.thumb.t-bonus { background: linear-gradient(135deg, #123524 0%, #1f6f43 60%, #e8b52a 140%); }
.thumb.t-tech { background: linear-gradient(135deg, #241a30 0%, #5c3a8a 60%, #c9a7e0 140%); }
.thumb.t-normative { background: linear-gradient(135deg, #16324f 0%, #274a70 60%, #8aa7e0 140%); }
.thumb.ar-16-9 { aspect-ratio: 16 / 9; }
.thumb.ar-3-2 { aspect-ratio: 3 / 2; }
.thumb.ar-1-1 { aspect-ratio: 1 / 1; }
.hero-main .thumb { margin-bottom: 16px; }
figure.thumb { margin: 0 0 1.6em; }

/* ---------- Sezioni ---------- */
.section { padding: 30px 0 10px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-bottom: 3px solid var(--navy); margin-bottom: 22px; padding-bottom: 8px;
}
.section-head h2 { font-size: 26px; margin: 0; text-transform: uppercase; letter-spacing: .02em; color: var(--navy); }
.section-head h2 span { color: var(--orange); }
.section-head a.more { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); white-space: nowrap; }
.section-head a.more:hover { color: var(--orange); }

/* ---------- Card articolo ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card-grid.cg-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cg-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card .card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card .cat-mini { margin-bottom: 8px; }
.card h3 { font-size: 20px; margin-bottom: 8px; color: var(--navy); }
.card p.card-excerpt { font-size: 14.5px; color: var(--mute); margin: 0 0 12px; flex: 1; }
.card .card-meta { font-size: 12.5px; color: var(--mute); border-top: 1px solid var(--line); padding-top: 10px; display: flex; justify-content: space-between; }

/* ---------- Lista "I più letti" ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank-list li { counter-increment: rank; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li::before {
  content: counter(rank); font-family: var(--font-head); font-size: 30px; font-weight: 800;
  color: var(--orange); line-height: 1; min-width: 34px;
}
.rank-list a { font-weight: 700; font-size: 15.5px; line-height: 1.35; color: var(--navy); }
.rank-list a:hover { color: var(--orange); }
.rank-list .rl-cat { display: block; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .1em; margin-top: 3px; }

/* ---------- Layout con sidebar ---------- */
.layout-main { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.sidebar { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 26px; }
.widget { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--paper); }
.widget h3.w-title {
  font-family: var(--font-body); font-size: 13px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--navy);
  border-bottom: 3px solid var(--orange); padding-bottom: 8px; margin: 0 0 6px;
}

/* ---------- Newsletter ---------- */
.newsletter { background: var(--navy); color: #dbe4ee; border: 0; }
.newsletter h3.w-title { color: #fff; border-bottom-color: var(--orange); }
.newsletter p { font-size: 13.5px; color: #b9c6d6; margin: 6px 0 12px; }
.newsletter input[type="email"] {
  width: 100%; padding: 11px 12px; border: 1px solid #33506e; background: var(--navy-dark); color: #fff;
  border-radius: var(--radius); font-size: 14px; margin-bottom: 10px; font-family: var(--font-body);
}
.newsletter input[type="email"]::placeholder { color: #8fa3bb; }
.newsletter .btn { width: 100%; }
.newsletter small { display: block; font-size: 11px; color: #8fa3bb; margin-top: 8px; }

/* ============================================================
   PAGINA ARTICOLO — componenti SEO/AEO
   ============================================================ */
.article-head { max-width: 860px; margin: 26px auto 0; }
.breadcrumbs { font-size: 12.5px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.breadcrumbs a { color: var(--mute); }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs .sep { margin: 0 8px; color: #b8c0cc; }
.breadcrumbs [aria-current] { color: var(--ink-soft); font-weight: 600; }
.article-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--navy); }
.article-head .standfirst { font-size: 20px; color: var(--ink-soft); line-height: 1.5; margin: 14px 0 18px; }
.article-meta-bar {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 0; font-size: 13.5px; color: var(--mute); margin-bottom: 22px;
}
.article-meta-bar .b-author { font-weight: 800; text-transform: uppercase; font-size: 12.5px; letter-spacing: .05em; }
.article-meta-bar .b-author a { color: var(--navy); }
.article-meta-bar .b-author a:hover { color: var(--orange); }

/* Layout contenuto + sidebar 300px */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
}

/* Corpo articolo: tipografia editoriale */
.article-body { font-size: 18.5px; line-height: 1.7; max-width: 720px; color: var(--ink); }
.article-body > p { margin: 0 0 1.3em; }
.article-body h2 { font-size: 28px; margin: 1.6em 0 .6em; padding-top: 12px; color: var(--navy); }
.article-body h3 { font-size: 22px; margin: 1.4em 0 .5em; color: var(--navy); }
.article-body ul, .article-body ol { margin: 0 0 1.3em; padding-left: 26px; }
.article-body li { margin-bottom: .5em; }
.article-body strong { color: var(--navy); }
.article-body a { color: var(--navy-light); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); }
.article-body a:hover { color: var(--orange); }
.article-body blockquote {
  margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--orange);
  background: var(--orange-soft); font-family: var(--font-head); font-size: 21px; font-style: italic;
  color: var(--navy);
}

/* Tabelle responsive */
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 560px; }
.article-body caption { caption-side: top; text-align: left; font-size: 13px; color: var(--mute); padding-bottom: 8px; font-style: italic; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--navy); color: #fff; font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.article-body tbody tr:nth-child(even) td { background: var(--bg-soft); }

/* Answer box "Risposta rapida" — target AEO / featured snippet */
.answer-box {
  background: var(--orange-soft);
  border: 1px solid #f3c9a8; border-left: 5px solid var(--orange);
  border-radius: var(--radius); padding: 18px 24px 18px 58px; margin: 0 0 1.6em;
  position: relative;
}
.answer-box::before {
  content: "⚡"; position: absolute; left: 18px; top: 16px; font-size: 24px; line-height: 1;
}
.answer-box .ab-title {
  display: block; font-family: var(--font-body); font-size: 13px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 8px;
}
.answer-box p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink); }

/* Indice dei contenuti (TOC) */
.article-toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px; margin: 0 0 1.8em; background: #fff; }
.article-toc .toc-title {
  display: block; font-family: var(--font-body); font-size: 13px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--navy); margin-bottom: 8px;
}
.article-toc ol { margin: 0; padding-left: 20px; font-size: 15px; columns: 2; column-gap: 32px; }
.article-toc li { margin-bottom: .35em; break-inside: avoid; }
.article-toc a { color: var(--ink-soft); }
.article-toc a:hover { color: var(--orange); }

/* FAQ con <details> */
.faq-section { margin: 2em 0; }
.faq-section details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
.faq-section summary {
  cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 17px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  color: var(--navy); min-height: 44px;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { content: "+"; font-size: 24px; color: var(--orange); font-weight: 400; flex-shrink: 0; }
.faq-section details[open] summary::after { content: "–"; }
.faq-section details .faq-a { padding: 0 18px 16px; font-size: 16.5px; color: var(--ink-soft); }
.faq-section details .faq-a p { margin: 0 0 .8em; }
.faq-section details .faq-a p:last-child { margin-bottom: 0; }

/* Box autore (E-E-A-T) */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin: 2em 0; background: var(--bg-soft);
}
.author-avatar {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 24px;
}
.author-box .ab-name { font-weight: 800; font-size: 17px; color: var(--navy); margin: 0 0 2px; }
.author-box .ab-name a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.author-box .ab-role { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--orange-dark); margin: 0 0 8px; }
.author-box .ab-bio { font-size: 14.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* Riga condivisione (testuale, nessuno script esterno) */
.share-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0; margin: 2em 0;
}
.share-row .sr-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); margin-right: 6px; }
.share-row a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 13.5px; font-weight: 700; color: var(--navy);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.share-row a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Fonti e note */
.sources { font-size: 13.5px; color: var(--mute); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2em; line-height: 1.6; }

/* Tag */
.tags { margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink-soft);
}
.tags a:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Articoli correlati */
.related { border-top: 3px solid var(--navy); margin-top: 40px; padding-top: 22px; }
.related h2 { font-size: 22px; text-transform: uppercase; color: var(--navy); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #b9c6d6; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; padding: 44px 0 30px; }
.site-footer .f-logo img { width: 240px; margin-bottom: 14px; }
.site-footer h4 {
  font-family: var(--font-body); color: #fff; font-size: 13px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b9c6d6; }
.site-footer a:hover { color: #fff; }
.site-footer .f-desc { font-size: 14px; line-height: 1.6; max-width: 340px; margin: 0 0 12px; }
.footer-bottom {
  border-top: 1px solid #24405e; padding: 16px 0 22px; font-size: 12.5px; color: #8fa3bb;
  display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between;
}
.footer-bottom a { color: #8fa3bb; }
.footer-bottom a:hover { color: #fff; }
.footer-legal { padding: 0 0 22px; font-size: 12px; line-height: 1.6; color: #7f93ab; }
.footer-legal p { margin: 0; }
.footer-legal a { color: #7f93ab; }
.footer-legal a:hover { color: #fff; }

/* ---------- Utility ---------- */
.mobile-only { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .card-grid.cg-4 { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .layout-main, .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .ad-halfpage { min-height: 250px; width: min(300px, 100%); }
  .hero-side { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-body { max-width: none; }
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .card-grid, .card-grid.cg-2, .card-grid.cg-4, .related-grid { grid-template-columns: 1fr; }
  .masthead .mh-tagline { display: none; }
  .topbar .tb-links { display: none; }
  .ad-leaderboard { display: none; }
  .mobile-only { display: flex; }
  .ad-inarticle { float: none; margin: 20px auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-body { font-size: 17.5px; }
  .article-toc ol { columns: 1; }
  .author-box { flex-direction: column; }

  /* Nav mobile: hamburger */
  .mainnav .container { flex-direction: column; align-items: stretch; padding: 0 20px; }
  .nav-toggle { display: flex; }
  .mainnav ul { display: none; flex-direction: column; gap: 0; padding-bottom: 10px; }
  .mainnav[data-open="true"] ul { display: flex; }
  .mainnav a { border-bottom: 1px solid var(--line); border-left: 3px solid transparent; padding: 12px 10px; }
  .mainnav a:hover, .mainnav a[aria-current="page"] { border-bottom-color: var(--line); border-left-color: var(--orange); }
}

/* pagine servizio */
.ad-infeed { width: min(728px, 100%); min-height: 120px; margin: 30px auto; }
.hero-side .hs-meta { font-size: 12.5px; color: var(--mute); }
.page-head { padding: 30px 0 4px; }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); color: var(--navy); margin: 8px 0 12px; }
.page-intro { font-size: 17.5px; line-height: 1.65; color: var(--ink-soft); max-width: 820px; margin: 0 0 8px; }
.page-body { font-size: 17px; line-height: 1.7; color: var(--ink); max-width: 820px; }
.page-body p { margin: 0 0 1.2em; }
.page-body h2 { font-size: 24px; color: var(--navy); margin: 1.5em 0 .5em; }
.page-body h3 { font-size: 19px; color: var(--navy); margin: 1.3em 0 .4em; }
.page-body ul, .page-body ol { margin: 0 0 1.2em; padding-left: 24px; }
.page-body li { margin-bottom: .45em; }
.page-body a { color: var(--navy-light); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); }
.page-body a:hover { color: var(--orange); }
.page-body table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 1.4em; }
.page-body th, .page-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.page-body th { background: var(--navy); color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.page-body tbody tr:nth-child(even) td { background: var(--bg-soft); }
.fake-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg-soft); max-width: 560px; margin-bottom: 1.4em; }
.fake-form label { display: block; font-weight: 700; font-size: 14px; color: var(--navy); margin: 12px 0 5px; }
.fake-form input, .fake-form textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font: inherit; background: #fff; box-sizing: border-box; }
.fake-form textarea { min-height: 120px; }
.fake-form .btn { margin-top: 14px; border: 0; cursor: pointer; }
.fake-form small { display: block; margin-top: 10px; color: var(--mute); font-size: 12.5px; }
.sitemap-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 40px; }
.sitemap-cols h2 { margin-top: 1.2em; }
@media (max-width: 720px) { .sitemap-cols { grid-template-columns: 1fr; } }

/* hero images */
.article-hero { margin: 0 0 1.5rem; border-radius: 12px; overflow: hidden; }
.article-hero img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
img.thumb-img { width: 100%; height: auto; display: block; aspect-ratio: 3 / 2; object-fit: cover; border-radius: inherit; }
/* wrapper delle card/hero: stesso border-radius + overflow dei thumb CSS sostituiti */
.card > a, .hero-main > a { display: block; border-radius: var(--radius); overflow: hidden; }
.hero-main > a { margin-bottom: 16px; }
.hero-main img.thumb-img { aspect-ratio: 16 / 9; }

/* ============================================================
   pagina cerca (/cerca/)
   ============================================================ */
#search-app { max-width: 820px; padding-bottom: 30px; }
.search-form { margin: 18px 0 8px; }
.search-form input[type="search"] {
  width: 100%; box-sizing: border-box;
  font: inherit; font-size: 19px; color: var(--ink);
  padding: 16px 20px;
  border: 2px solid var(--navy); border-radius: var(--radius);
  background: #fff;
}
.search-form input[type="search"]:focus {
  outline: 3px solid var(--orange); outline-offset: 2px;
  border-color: var(--navy);
}
.search-count { font-size: 14.5px; color: var(--mute); margin: 14px 0 6px; }
.search-results { list-style: none; margin: 0; padding: 0; }
.sr-item {
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.sr-item:last-child { border-bottom: 0; }
.sr-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px; line-height: 1.3; color: var(--navy); margin: 0 0 6px;
}
.sr-title a { color: inherit; text-decoration: none; }
.sr-title a:hover { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.sr-meta { font-size: 13px; color: var(--mute); margin: 0 0 8px; }
.sr-cat {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--orange-dark);
}
.sr-excerpt { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
@media (max-width: 720px) {
  .search-form input[type="search"] { font-size: 17px; padding: 14px 16px; }
  .sr-title { font-size: 20px; }
}

/* ============================================================
   cookie banner (barra fissa bottom, zero CLS, contrasto AA)
   ============================================================ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px 24px; padding: 16px 20px;
  background: var(--navy-dark); color: #fff;
  border-top: 3px solid var(--orange);
  box-shadow: 0 -4px 20px rgba(14, 34, 55, .35);
  transform: translateY(100%);
  transition: transform .3s ease-out;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner.is-hiding { transform: translateY(100%); }
.cookie-banner .cb-text {
  flex: 1 1 420px; margin: 0; font-size: 14.5px; line-height: 1.55; max-width: 720px;
}
.cookie-banner .cb-text a { color: #ffb985; text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner .cb-text a:hover { color: #fff; }
.cookie-banner .cb-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .cb-btn {
  font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
  padding: 11px 22px; border-radius: var(--radius); border: 2px solid #fff;
}
.cookie-banner .cb-accept { background: #fff; color: var(--navy-dark); }
.cookie-banner .cb-accept:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.cookie-banner .cb-reject { background: transparent; color: #fff; }
.cookie-banner .cb-reject:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 720px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-banner .cb-actions { justify-content: center; }
  .cookie-banner .cb-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; }
}
