/* ============================================================
   notizie.it — Dizionario · shared theme
   Brand: notizie.it (rosso/nero), AdHub Media.
   Font: Figtree (workhorse + editorial heavy-italic display).
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  /* brand */
  --n-red:        #e1251b;
  --n-red-dark:   #b81810;
  --n-red-tint:   #fdecea;
  --n-ink:        #121212;   /* near-black text */
  --n-nav:        #0f0f0f;   /* black nav bar */
  --n-nav-2:      #1d1d1d;   /* letter chip on nav */
  --n-nav-3:      #2c2c2c;

  /* surfaces */
  --n-page:       #f1f1f1;   /* behind the white sheet */
  --n-sheet:      #ffffff;
  --n-hero:       #f7f7f7;
  --n-line:       #e6e6e6;
  --n-line-2:     #dcdcdc;

  /* text */
  --n-fg:         #161616;
  --n-fg-2:       #3a3a3a;
  --n-muted:      #9a9a9a;   /* definition grey */
  --n-meta:       #7a7a7a;

  /* ad slot */
  --n-ad-bg:      #fafafa;
  --n-ad-line:    #e2e2e2;
  --n-ad-label:   #b9b9b9;

  --n-radius:     6px;
  --n-radius-sm:  4px;
  --n-shadow:     0 1px 2px rgba(0,0,0,.05);
  --n-shadow-md:  0 6px 18px rgba(0,0,0,.08);

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max:  1040px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--n-fg);
  background: var(--n-page);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- the centered white sheet ---- */
.sheet {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--n-sheet);
  min-height: 100vh;
}
.wrap { padding-inline: 28px; }
@media (max-width: 720px){ .wrap { padding-inline: 16px; } }

/* ============================================================
   AD SLOTS — same logic as roma.notizie.it
   ============================================================
   In WP, the real AdHub container is `div[id^="adhub-"]` emitted by
   nl_ad_slot(). We give it the same look + reserved height as the
   design `.adv` placeholders. The `.adv` rules below still drive
   ?adsdebug=1 visible placeholders. Real slots: `.nl-ad-host`. */
.adv,
.nl-ad-host {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--n-ad-bg);
  border: 1px dashed var(--n-ad-line);
  border-radius: var(--n-radius-sm);
  position: relative;
  color: var(--n-ad-label);
  text-align: center;
  overflow: hidden;
  margin: 0 auto;
}
/* When a real creative is injected, drop the placeholder chrome. */
.nl-ad-host:not(:empty) {
  background: transparent;
  border: 0;
}
.adv::before {
  content: "Spazio pubblicitario";
  position: absolute;
  top: 8px; left: 0; right: 0;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--n-ad-label);
}
.adv .adv__size {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #c9c9c9;
}
.adv--billboard { height: 250px; margin: 0 auto; max-width: 970px; }
.adv--leaderboard { height: 90px; max-width: 728px; margin: 0 auto; }
.adv--incontent { height: 280px; margin: 0 auto; max-width: 728px; }
.adv--mpu { height: 250px; width: 100%; max-width: 300px; }
.adv--mpu-tall { height: 600px; width: 100%; max-width: 300px; }
.adv-band { background: var(--n-page); padding: 18px 0; }
.adv-band--top { padding-top: 22px; padding-bottom: 22px; }

/* Real AdHub host widths to match the design slot they replace. */
.nl-ad-host--billboard  { max-width: 970px; }
.nl-ad-host--incontent  { max-width: 728px; }
.nl-ad-host--mpu        { max-width: 300px; width: 100%; }
.nl-ad-host--mpu-tall   { max-width: 300px; width: 100%; }
.nl-ad-host--anchor     { max-width: 320px; width: 100%; }

/* ?adsdebug=1 visible placeholder (nl_ad_slot_debug_html) */
.nl-ad { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  background: var(--n-ad-bg); border:1px dashed var(--n-ad-line); border-radius: var(--n-radius-sm);
  color: var(--n-ad-label); margin: 0 auto; }
.nl-ad__kicker { font-size:10px; letter-spacing:.14em; text-transform:uppercase; font-weight:700; }
.nl-ad__label  { font-size:13px; font-weight:700; color:#777; }
.nl-ad__size   { font-size:11px; color:#aaa; }

/* ============================================================
   HEADER
   ============================================================ */
.masthead {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--n-line);
  background: var(--n-sheet);
}
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand__logo { display: flex; align-items: baseline; }
.brand__logo-img { height: 30px; width: auto; }
.brand__sep {
  width: 1px; height: 26px; background: #d2d2d2; margin: 0 2px;
}
.brand__section {
  font-weight: 800; font-style: italic; font-size: 21px;
  letter-spacing: -.01em; color: var(--n-ink);
}
.masthead__search { margin-left: auto; display: flex; max-width: 380px; flex: 1; }
.searchbar { display: flex; width: 100%; }
.searchbar input {
  flex: 1; min-width: 0;
  border: 1px solid var(--n-line-2);
  border-right: none;
  border-radius: var(--n-radius) 0 0 var(--n-radius);
  padding: 10px 14px;
  font: inherit; font-size: 14px;
  background: var(--n-sheet);
  color: var(--n-fg);
}
.searchbar input::placeholder { color: var(--n-muted); }
.searchbar input:focus { outline: none; border-color: var(--n-red); }
.searchbar button {
  border: none;
  background: var(--n-red);
  color: #fff;
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 0 20px;
  border-radius: 0 var(--n-radius) var(--n-radius) 0;
  cursor: pointer;
  transition: background .15s;
}
.searchbar button:hover { background: var(--n-red-dark); }

/* notizie.it logo (SVG globe inline) — kept for fallback */
.nlogo { display: flex; align-items: baseline; font-weight: 800; }
.nlogo svg { width: 1.05em; height: 1.05em; transform: translateY(.12em); }
.nlogo .nlogo__word { font-size: 30px; letter-spacing: -.02em; color: #111; }
.nlogo .nlogo__tld { font-size: 17px; font-weight: 800; color: #111; margin-left: 1px; }

/* ============================================================
   NAV — black bar with A-Z chips
   ============================================================ */
.nav {
  background: var(--n-nav);
  color: #fff;
  padding: 14px 28px 6px;
}
.nav__row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 30px; padding: 0 9px;
  background: var(--n-nav-2);
  color: #e9e9e9;
  border-radius: var(--n-radius-sm);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
  user-select: none;
}
.chip:hover { background: var(--n-nav-3); color: #fff; }
.chip.is-active, .chip[aria-current="true"] {
  background: #fff; color: #111;
}
.chip--all { padding: 0 16px; }
.nav__index {
  border-top: 1px solid #262626;
  margin-top: 12px;
  padding: 12px 0 4px;
}
.nav__index a {
  font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: #cdcdcd;
}
.nav__index a:hover { color: #fff; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--n-hero);
  border-bottom: 3px solid var(--n-red);
  padding: 40px 32px 34px;
  text-align: center;
  margin: 0;
}
.hero h1 {
  font-style: italic; font-weight: 800;
  font-size: 34px; letter-spacing: -.02em;
  margin: 0 0 8px;
}
.hero p { color: var(--n-meta); font-size: 15px; margin: 0 auto 22px; }
.hero p strong { color: var(--n-fg); font-weight: 700; }
.hero .searchbar { max-width: 660px; margin: 0 auto; }
.hero .searchbar input { padding: 15px 18px; font-size: 16px; }
.hero .searchbar button { padding: 0 30px; font-size: 15px; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section { padding: 30px 0 6px; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 3px solid var(--n-red);
  padding-bottom: 8px; margin-bottom: 20px;
}
.section__head h2 {
  font-style: italic; font-weight: 800; font-size: 23px;
  letter-spacing: -.01em; margin: 0;
}
.section__head a {
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--n-red);
  white-space: nowrap; padding-bottom: 2px;
}
.section__head a:hover { color: var(--n-red-dark); }

/* browse letters (light) */
.browse { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.lchip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  background: #fff; color: #1a1a1a;
  border: 1px solid var(--n-line-2);
  border-radius: var(--n-radius-sm);
  font-weight: 700; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.lchip:hover { border-color: #111; }
.lchip.is-active { background: #111; color: #fff; border-color: #111; }
.lchip--all { padding: 0 16px; }

/* ============================================================
   ENTRY CARDS
   ============================================================ */
.cards { display: grid; gap: 16px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px){ .cards--2, .cards--3 { grid-template-columns: 1fr; } }

.ecard {
  background: #fff;
  border: 1px solid var(--n-line);
  border-left: 4px solid var(--n-red);
  border-radius: var(--n-radius-sm);
  padding: 16px 18px;
  transition: box-shadow .15s, transform .15s;
  display: block;
}
.ecard:hover { box-shadow: var(--n-shadow-md); }
.ecard h3 {
  font-weight: 700; font-size: 17px; margin: 0 0 7px;
  color: var(--n-ink); letter-spacing: -.01em;
}
.ecard p {
  margin: 0; font-size: 13.5px; line-height: 1.5;
  color: var(--n-muted);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ecard--lg p { -webkit-line-clamp: 6; }

/* ============================================================
   LAYOUT WITH RIGHT RAIL
   ============================================================ */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: start; }
@media (max-width: 880px){ .layout { grid-template-columns: 1fr; } }
.rail { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 16px; }
@media (max-width: 880px){ .rail { position: static; } }

.railbox { border: 1px solid var(--n-line); border-radius: var(--n-radius-sm); background: #fff; }
.railbox__head {
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #555; padding: 12px 14px; border-bottom: 1px solid var(--n-line);
}
.railbox__body { padding: 12px 14px; }
.railbox__links { display:flex; flex-direction:column; gap:10px; }
.railbox__links a { font-size: 14px; color: var(--n-fg-2); }
.railbox__links a:hover { color: var(--n-red); }
.letters-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.letters-grid .lchip { min-width: 0; width: 100%; height: 32px; font-size: 13px; padding: 0; }

/* ============================================================
   VOCE (single entry) PAGE
   ============================================================ */
.breadcrumb { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--n-red); padding-top: 26px; }
.breadcrumb a:hover { color: var(--n-red-dark); }
.breadcrumb .sep { color: #c4c4c4; margin: 0 7px; }
.breadcrumb .cur { color: var(--n-meta); }
.voce__title { font-style: italic; font-weight: 900; font-size: 46px; letter-spacing: -.025em; margin: 14px 0 16px; line-height: 1.05; }
.voce__lead { font-size: 20px; line-height: 1.5; color: var(--n-fg-2); margin: 0 0 18px; max-width: 60ch; }
.voce__meta { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.pill { background: var(--n-red-tint); color: var(--n-red-dark); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: var(--n-radius-sm); }
.voce__meta .time { font-size: 13px; color: var(--n-meta); }
.voce__rule { border: none; border-top: 1px solid var(--n-line); margin: 0 0 22px; }
.voce__body { font-size: 17px; line-height: 1.7; color: var(--n-fg-2); max-width: 62ch; }
.voce__body p { margin: 0 0 18px; }
.voce__body h2,
.voce__body h3,
.voce__body h4 { font-style: italic; font-weight: 800; font-size: 19px; margin: 28px 0 10px; color: var(--n-ink); }
.voce__body ul, .voce__body ol { margin: 0 0 18px; padding-left: 22px; }
.voce__body a { color: var(--n-red); text-decoration: underline; }
/* in-content ad inside the article body */
.voce__body .nl-ad-host,
.voce__body .nl-ad { margin: 22px auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.subfoot { background: #fff; border-top: 1px solid var(--n-line); padding: 28px 28px 30px; }
.subfoot__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 640px){ .subfoot__grid { grid-template-columns: 1fr; } }
.subfoot__links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; }
.subfoot__links a { font-size: 13.5px; color: var(--n-fg-2); }
.subfoot__links a:hover { color: var(--n-red); }
.subfoot__note { font-size: 13.5px; color: var(--n-meta); line-height: 1.6; }
.subfoot__note a { color: var(--n-red); }

.footer { background: var(--n-nav); color: #c9c9c9; }
.footer__inner { max-width: var(--max); margin: 0 auto; padding: 36px 28px 30px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 640px){ .footer__cols { grid-template-columns: 1fr; gap: 22px; } }
.footer h5 { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #8a8a8a; margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer a { font-size: 14px; color: #d6d6d6; }
.footer a:hover { color: #fff; }
.footer__legal { border-top: 1px solid #272727; margin-top: 28px; padding-top: 20px; font-size: 12.5px; color: #8c8c8c; line-height: 1.7; }
.footer__legal em { color: #6f6f6f; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #272727; padding: 14px 28px; max-width: var(--max); margin: 0 auto; font-size: 12px; color: #6f6f6f; }

.is-hidden { display: none !important; }
.no-results { padding: 30px 4px; color: var(--n-meta); font-size: 15px; }

/* pagination (archive) */
.pagination, .nl-pagination { padding: 26px 0 8px; }
.pagination .nav-links,
.nl-pagination .nav-links { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.pagination .page-numbers,
.nl-pagination .page-numbers {
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border:1px solid var(--n-line-2); border-radius: var(--n-radius-sm);
  font-weight:700; font-size:14px; color:#1a1a1a; background:#fff;
}
.pagination .page-numbers.current,
.nl-pagination .page-numbers.current { background:#111; color:#fff; border-color:#111; }
.pagination .page-numbers:hover,
.nl-pagination .page-numbers:hover { border-color:#111; }
.pagination .screen-reader-text { position:absolute; clip:rect(1px,1px,1px,1px); }

.screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.skip-link:focus { position:fixed; left:8px; top:8px; width:auto; height:auto; clip:auto; background:#fff; padding:8px 14px; z-index:1000; }

/* ============================================================
   MOBILE ADV — sticky bottom anchor (320x50)
   ============================================================ */
.adv-anchor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; justify-content: center; align-items: flex-end;
  padding: 7px 10px 9px;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--n-line);
  box-shadow: 0 -3px 12px rgba(0,0,0,.06);
}
.adv-anchor .adv--anchor,
.adv-anchor .nl-ad-host { height: 50px; width: 100%; max-width: 320px; }
.adv-anchor__x {
  position: absolute; top: -13px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--n-line-2); background: #fff;
  color: #888; font-size: 12px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--n-shadow);
}

/* ============================================================
   RESPONSIVE — tablet
   ============================================================ */
@media (max-width: 880px){
  .wrap { padding-inline: 22px; }
}

/* ============================================================
   RESPONSIVE — phone
   ============================================================ */
@media (max-width: 640px){
  .wrap { padding-inline: 15px; }

  /* header stacks: brand row, then full-width search */
  .masthead { flex-wrap: wrap; gap: 12px; padding: 13px 15px; }
  .brand { gap: 10px; }
  .brand__logo-img { height: 26px; }
  .nlogo .nlogo__word { font-size: 25px; }
  .nlogo .nlogo__tld { font-size: 14px; }
  .brand__section { font-size: 18px; }
  .brand__sep { height: 22px; }
  .masthead__search { margin-left: 0; max-width: none; flex: 0 0 100%; }
  .searchbar input { font-size: 16px; }       /* 16px stops iOS zoom */

  /* nav A-Z */
  .nav { padding: 12px 15px 5px; }
  .nav__row { gap: 6px; }
  .chip { min-width: 32px; height: 32px; font-size: 13px; }

  /* hero */
  .hero { padding: 26px 16px 24px; border-bottom-width: 3px; }
  .hero h1 { font-size: 25px; }
  .hero p { font-size: 14px; }
  .hero .searchbar input { padding: 13px 14px; font-size: 16px; }
  .hero .searchbar button { padding: 0 18px; font-size: 14px; }

  /* sections */
  .section { padding-top: 24px; }
  .section__head { margin-bottom: 16px; }
  .section__head h2 { font-size: 20px; }
  .section__head a { font-size: 11px; }
  .browse { gap: 7px; }
  .lchip { min-width: 36px; height: 36px; font-size: 14px; }

  /* layout / rail */
  .layout { gap: 24px; }
  .rail { gap: 16px; }
  .adv--mpu-tall,
  .nl-ad-host--mpu-tall { display: none; }   /* drop the heavy 300x600 skyscraper on phone */

  /* voce */
  .breadcrumb { padding-top: 20px; }
  .voce__title { font-size: 31px; }
  .voce__lead { font-size: 17px; }
  .voce__body { font-size: 16px; }
  .voce__body h2, .voce__body h3, .voce__body h4 { font-size: 18px; }

  /* footer */
  .footer__inner { padding: 28px 16px 24px; }
  .footer__bottom { padding: 14px 16px; flex-direction: column; gap: 6px; align-items: flex-start; }
  .subfoot { padding: 24px 15px 26px; }

  /* leave room for the sticky anchor ad */
  body.has-anchor-ad { padding-bottom: 66px; }
  .adv-anchor { display: flex; }
}

/* ad slots: become a mobile-friendly 300x250 box on small screens.
   IMPORTANT: do NOT branch min-height on UA server-side (page cache); the
   reserved desktop height is set inline by nl_ad_slot(), and we shrink it
   here for real small viewports to keep CLS minimal both ways. */
@media (max-width: 720px){
  .adv--billboard,
  .adv--incontent,
  .nl-ad-host--billboard,
  .nl-ad-host--incontent { height: auto; min-height: 250px !important; max-width: 300px; }
  .adv-band--top { padding: 14px 0 12px; }
  .adv-band { padding: 14px 0; }
}
