/* File: sdf.css
   Versione: 1.0
   Quel poco che aggiungiamo a Editorial: cose che il template non prevede
   (briciole, skip link, voce di menu attiva) e gli aggiustamenti necessari
   a un sito fatto di testi lunghi e senza una sola immagine. */

:root {
  --cobalto: #1f4aa6;         /* l'accento, gia' sostituito dentro main.css */
  --cobalto-cupo: #16346f;
  --oro: #9c7b34;
}

/* ── le due icone del template ──────────────────────────────────
   Editorial le prende da Font Awesome (2,9 MB di webfont per due glifi).
   Le abbiamo tolte: la lente diventa un SVG inline, la freccia del
   sottomenu un carattere che c'e' in qualunque font. */
#search form:before {
  font-family: inherit !important;
  content: "" !important;
  transform: none !important;
  width: 1.1em; height: 1.1em;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f888f' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") no-repeat center / contain;
}
/* anche il chevron e' disegnato: il carattere ▾ non c'e' in tutti i font e
   dove manca resta un puntino */
#menu ul a.opener:before,
#menu ul span.opener:before {
  font-family: inherit !important;
  content: "" !important;
  width: .85em; height: .85em;
  top: .55em;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fa3a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E") no-repeat center / contain;
}
#menu ul a.opener:hover:before,
#menu ul span.opener:hover:before,
#menu ul span.opener.active:before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4aa6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
}

/* Il pulsante che apre la sidebar sugli schermi stretti: e' inserito da main.js
   e anche lui usava un glifo di Font Awesome. Diventa un hamburger disegnato. */
#sidebar .toggle:before {
  font-family: inherit !important;
  content: "" !important;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%237f888f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E") no-repeat center;
  background-size: 1.6rem;
}

/* ── accessibilita' ─────────────────────────────────────────── */
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.salta {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cobalto); color: #fff; padding: .7rem 1.2rem;
}
.salta:focus { left: 0; }

/* ── colonna di lettura ─────────────────────────────────────────
   Editorial lascia il contenuto a tutta larghezza: su un articolo da
   ottomila parole significa righe da centoventi caratteri, illeggibili.
   Qui si torna a una misura da libro. */
#main .inner > p,
#main .inner > ul,
#main .inner > ol,
#main .inner > blockquote,
#main .inner > h2,
#main .inner > h3,
#main .inner > h4,
#main .inner > .briciole,
#main .inner > table {
  max-width: 38rem;
}
/* il display di Editorial e' tarato su titoli di due parole: i nostri sono lunghi
   e a quel corpo andrebbero a capo male */
#main .inner > h1 {
  max-width: 42rem;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
}

#main .inner > h2 {
  margin-top: 2.75em;
  padding-top: .6em;
  border-top: solid 1px rgba(210, 215, 217, .75);
}
#main .inner > h1 + h2,
#main .inner > .briciole + h1 { border-top: 0; padding-top: 0; }

/* prima riga in evidenza, come l'occhiello di un articolo */
#main .inner > h1 + p { font-size: 1.1em; color: #4a4f54; }

/* ── briciole ───────────────────────────────────────────────── */
.briciole { margin: 0 0 1.5rem; }
.briciole ol {
  display: flex; flex-wrap: wrap; gap: .4rem;
  list-style: none; margin: 0; padding: 0;
}
.briciole li { font-size: .8rem; color: #7f888f; }
.briciole li + li::before { content: "›"; margin-right: .4rem; color: #bbb; }
.briciole a { border-bottom: 0; color: #7f888f; }
.briciole a:hover { color: var(--cobalto); }

/* ── menu: voce attiva e sezione aperta ─────────────────────── */
#menu ul a.attiva {
  color: var(--cobalto);
  font-weight: 600;
}
#menu .opener.active { color: var(--cobalto); }

/* ── le sezioni in home ─────────────────────────────────────── */
.sezioni {
  list-style: none; margin: 0 0 3rem; padding: 0;
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
/* le linee stanno sulle celle: cosi' l'ultima riga incompleta
   non lascia un rettangolo colorato a vuoto */
.sezioni > li {
  background: #fff; padding: 1.6rem 1.5rem 1.7rem;
  box-shadow: 0 0 0 1px rgba(210, 215, 217, .9);
  margin: 0;
}
.sezioni .rom {
  font-family: "Roboto Slab", serif; font-weight: 700;
  font-size: .7rem; letter-spacing: .25em; color: var(--oro);
  margin: 0 0 .8rem; padding-bottom: .5rem;
  border-bottom: solid 1px rgba(210, 215, 217, .75);
}
.sezioni h2 {
  font-size: 1.1rem; margin: 0 0 .55rem; letter-spacing: .1em;
  border: 0; padding: 0;
}
.sezioni h2 a { border-bottom: 0; }
.sezioni h2 a:hover { border-bottom: dotted 1px; }
.sezioni p { margin: 0; font-size: .9rem; line-height: 1.6; color: #6b7379; }

/* ── elenchi di pagine ──────────────────────────────────────── */
.elenco { list-style: none; margin: 0 0 2rem; padding: 0; max-width: 42rem; }
.elenco > li {
  padding: 1.1rem 0;
  border-bottom: solid 1px rgba(210, 215, 217, .75);
}
.elenco h2, .elenco h3 {
  font-size: 1.05rem; margin: 0 0 .3rem; border: 0; padding: 0; letter-spacing: .05em;
}
.elenco h2 a, .elenco h3 a { border-bottom: 0; }
.elenco h2 a:hover, .elenco h3 a:hover { border-bottom: dotted 1px; }
.elenco p { margin: 0; font-size: .92rem; color: #6b7379; }

.lista { columns: 2 15rem; column-gap: 2.5rem; list-style: none; margin: 0 0 2rem; padding: 0; }
.lista li { margin-bottom: .45rem; break-inside: avoid; padding-left: 0; }

/* ── navigazione fra pagine sorelle ─────────────────────────── */
.paginazione {
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  margin: 3rem 0 0; padding-top: 1.2rem;
  border-top: solid 1px rgba(210, 215, 217, .75);
  max-width: 38rem;
}
.paginazione a { font-size: .9rem; border-bottom: 0; max-width: 48%; }
.paginazione a:hover { border-bottom: dotted 1px; }
.paginazione .succ { margin-left: auto; text-align: right; }

/* ── piede della sidebar ────────────────────────────────────── */
#footer .nota {
  font-size: .72rem; line-height: 1.7; color: #7f888f; margin: 0 0 .8rem;
}
#footer .copyright { font-size: .72rem; margin: 0; }

/* ── directory farmacie / BuonoSconto ─────────────────────── */
.sdb-eyebrow {
  margin: 0 0 .45rem !important; color: var(--oro); font-family: "Roboto Slab", serif;
  font-size: .72rem !important; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.sdb-lead { font-size: 1.08rem; color: #5b646b; max-width: 46rem !important; }
.sdb-home { margin: 3.25rem 0 1rem; padding: 1.7rem; border: 1px solid rgba(31,74,166,.22); background: #f7f9fd; }
.sdb-home > h2 { margin: 0 0 .7rem; border: 0; padding: 0; }
.sdb-home > p { max-width: 44rem; }
.sdb-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; margin: 1.2rem 0; }
.sdb-mini-grid a { display: flex; flex-direction: column; padding: .9rem; border: 1px solid #d8dde1; background: #fff; text-decoration: none; }
.sdb-mini-grid strong { color: var(--cobalto-cupo); font-family: "Roboto Slab", serif; }
.sdb-mini-grid span { color: #7f888f; font-size: .78rem; margin-top: .25rem; }
.sdb-directory, .sdb-detail { max-width: 70rem; }
.sdb-stats { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0; }
.sdb-stats span { padding: .55rem .75rem; background: #f4f6f7; border-radius: 3px; color: #5b646b; }
.sdb-stats strong { color: var(--cobalto-cupo); }
.sdb-filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: .75rem; align-items: end; padding: 1rem; margin: 1.5rem 0; background: #f4f6f7; border: 1px solid #d8dde1; }
.sdb-filters label { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .04em; }
.sdb-filters input, .sdb-filters select { margin-top: .35rem; background: #fff; }
.sdb-filters .button { margin: 0; height: 3.25rem; }
.sdb-reset { align-self: center; font-size: .8rem; white-space: nowrap; }
.sdb-results { margin: 0 0 1rem !important; color: #7f888f; }
.sdb-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.sdb-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #d8dde1; background: #fff; border-radius: 3px; overflow: hidden; }
.sdb-logo-link { border: 0; }
.sdb-card-logo { height: 9rem; display: grid; place-items: center; padding: .8rem; overflow: hidden; background: #f7f8f9; }
.sdb-card-logo img {
  display: block; width: auto !important; height: auto !important;
  max-width: 100% !important; max-height: 7.4rem !important; object-fit: contain;
}
.sdb-card-logo span, .sdb-detail-logo span { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--cobalto); color: #fff; font: 700 1.6rem "Roboto Slab", serif; }
.sdb-card-body { display: flex; flex: 1; flex-direction: column; padding: 1rem; }
.sdb-kicker { margin: 0 0 .45rem !important; color: var(--oro); font-size: .68rem !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sdb-card h3 { margin: 0 0 .65rem; font-size: 1.05rem; line-height: 1.35; letter-spacing: .02em; }
.sdb-card h3 a, .sdb-card-link { border: 0; }
.sdb-card-body > p:not(.sdb-kicker):not(.sdb-summary) { color: #687077; font-size: .86rem; line-height: 1.55; }
.sdb-summary { margin-top: auto !important; color: #7f888f; font-size: .75rem !important; }
.sdb-card-link { font-size: .82rem; font-weight: 600; }
.sdb-disclaimer { max-width: 50rem !important; margin-top: 1.5rem !important; color: #7f888f; font-size: .8rem; }
.sdb-detail-head { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 1.5rem; }
.sdb-detail-head h1 { margin: 0 0 .45rem; }
.sdb-detail-head .button { flex: 0 0 auto; }
.sdb-overview { display: grid; grid-template-columns: 13rem 1fr; gap: 1.5rem; padding: 1.3rem; background: #f7f9fd; border: 1px solid rgba(31,74,166,.22); }
.sdb-detail-logo { min-height: 9rem; display: grid; place-items: center; padding: .8rem; background: #fff; }
.sdb-detail-logo img { max-width: 100%; max-height: 9rem; object-fit: contain; }
.sdb-overview h2 { margin: 0 0 .8rem; padding: 0; border: 0; }
.sdb-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin: 0; }
.sdb-facts div { padding: .65rem; background: #fff; }
.sdb-facts dt { color: #7f888f; font-size: .72rem; text-transform: uppercase; }
.sdb-facts dd { margin: .15rem 0 0; color: var(--cobalto-cupo); font-weight: 600; }
.sdb-copy { max-width: 46rem; margin-top: 2rem; }
.sdb-deal-list { display: grid; gap: .65rem; }
.sdb-deal-list article { padding: .9rem 1rem; border-left: 3px solid var(--oro); background: #f7f8f9; }
.sdb-deal-list article > span { color: var(--oro); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sdb-deal-list h3 { margin: .25rem 0; font-size: 1rem; }
.sdb-deal-list h3 a { border: 0; }
.sdb-deal-list small { color: #7f888f; }
.sdb-cta { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; margin-top: 2.5rem; padding: 1.25rem; background: var(--cobalto-cupo); color: #fff; }
.sdb-cta h2 { margin: 0 0 .35rem; color: #fff; border: 0; padding: 0; }
.sdb-cta p { margin: 0; color: rgba(255,255,255,.82); }
.sdb-cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.sdb-cta .button { margin: 0; background: #fff; box-shadow: none; color: var(--cobalto-cupo) !important; }
.sdb-official { color: #fff !important; border-color: rgba(255,255,255,.5); font-size: .7rem; }
.sdb-cta small { color: rgba(255,255,255,.68); font-size: .65rem; }

@media (max-width: 64rem) {
  .sdb-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sdb-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 44rem) {
  .sdb-mini-grid, .sdb-grid, .sdb-filters, .sdb-overview { grid-template-columns: 1fr; }
  .sdb-detail-head, .sdb-cta { align-items: stretch; flex-direction: column; }
  .sdb-detail-head .button { align-self: flex-start; }
  .sdb-facts { grid-template-columns: 1fr; }
}

/* ── stampa ─────────────────────────────────────────────────── */
@media print {
  #sidebar, .briciole, .paginazione, #header { display: none !important; }
  #wrapper, #main { display: block; }
  #main .inner > * { max-width: none !important; }
  body { background: #fff; }
}
