/* ============================================================
   Migliore Amico — pagine pubbliche (blog e guide)
   Stessi colori e caratteri della pagina principale.
   ============================================================ */
:root {
  --brand: #E8621A;
  --brand-dark: #B84A0E;
  --brand-strong: #BE5015;
  --brand-light: #FFE0C0;
  --brand-bg: #FFF8F0;
  --text-dark: #2C1A0E;
  --text-muted: #6B5544;
  --line: #EFE6DC;
}
@supports (color: color-mix(in srgb, red 50%, black)) {
  :root { --brand-strong: color-mix(in srgb, var(--brand) 82%, black); }
}
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body.pub { font-family: 'DM Sans', system-ui, sans-serif; color: var(--text-dark); background: #fff; line-height: 1.6; }
.pub h1, .pub h2, .pub h3, .pub h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; color: var(--text-dark); }
.pub a { color: var(--brand-strong); }
.pub a:hover { color: var(--brand-dark); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Menu */
.top-nav { border-bottom: 1px solid #F3F4F6; padding: 16px 0; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); background: rgba(255,255,255,0.94); }
.nav-brand { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 24px; color: var(--brand-strong) !important; text-decoration: none; display: inline-flex; align-items: center; }
.nav-links a { color: var(--text-dark); text-decoration: none; margin-left: 24px; font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-strong); }
.nav-links a.btn-brand, .nav-links a.btn-brand:hover { color: #fff; }
.btn-brand { background: var(--brand-strong); color: #fff !important; border: none; padding: 10px 22px; border-radius: 100px; font-weight: 600; text-decoration: none; display: inline-block; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-brand-outline { background: transparent; color: var(--brand-strong); border: 2px solid var(--brand); padding: 8px 20px; border-radius: 100px; font-weight: 600; text-decoration: none; display: inline-block; }
.btn-brand-outline:hover { background: var(--brand-strong); color: #fff; }
.nav-toggle { display: none; background: none; border: none; color: var(--text-dark); font-size: 24px; cursor: pointer; }
@media (max-width: 767.98px) {
  .nav-links { display: none !important; }
  .nav-links.open { display: flex !important; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 20px; border-bottom: 1px solid #F3F4F6; box-shadow: 0 8px 24px rgba(0,0,0,0.08); gap: 12px; }
  .nav-links a { margin: 0; padding: 8px 0; }
  .nav-links a.btn-brand { text-align: center; }
  .nav-toggle { display: block; }
}

/* Piede */
footer.site-footer { background: #2C1A0E; color: rgba(255,255,255,0.75); padding: 60px 0 30px; }
.site-footer .footer-h { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; font-weight: 700; }
.site-footer .footer-brand { font-family: 'Fraunces', Georgia, serif; font-size: 22px; color: #fff; display: flex; align-items: center; margin: 0; font-weight: 600; }
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-divider { border-top: 1px solid rgba(255,255,255,0.12); margin: 40px 0 20px; }
.footer-bottom { font-size: 13px; color: rgba(255,255,255,0.65); }

/* ---------------- Blog: elenco ---------------- */
.blog-hero { background: linear-gradient(135deg, #FFF8F0 0%, #FFE9D3 100%); padding: 56px 0 40px; }
.blog-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; margin-bottom: 12px; }
.blog-hero p { font-size: 18px; color: var(--text-muted); max-width: 640px; margin: 0; }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.blog-cats a { padding: 6px 14px; border-radius: 100px; background: #fff; border: 1px solid var(--line); color: var(--text-dark); text-decoration: none; font-size: 14px; font-weight: 500; }
.blog-cats a[aria-current="page"] { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.post-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; height: 100%; display: flex; flex-direction: column; background: #fff; transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: 0 12px 32px rgba(184,74,14,.12); transform: translateY(-2px); }
.post-card .ph { aspect-ratio: 16 / 9; background: var(--brand-bg); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-strong); }
.post-card h2 { font-size: 21px; line-height: 1.3; margin: 6px 0 8px; }
.post-card h2 a { color: var(--text-dark); text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 12px; }
.post-card .meta { margin-top: auto; font-size: 13px; color: var(--text-muted); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }

/* ---------------- Blog: articolo ---------------- */
.crumbs { font-size: 14px; color: var(--text-muted); padding: 20px 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #b3a497; }
.crumbs a { color: var(--text-muted); }
.article-wrap { max-width: 760px; margin: 0 auto; padding: 0 0 56px; }
.article-head h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.15; font-weight: 700; margin: 16px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14.5px; color: var(--text-muted); margin-bottom: 24px; }
.article-meta i { margin-right: 4px; }
.in-breve { background: var(--brand-bg); border: 1px solid var(--brand-light); border-left: 5px solid var(--brand); border-radius: 14px; padding: 18px 22px; margin: 0 0 28px; font-size: 17.5px; }
.in-breve .lbl { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-strong); margin-bottom: 6px; }
.in-breve p:last-child { margin-bottom: 0; }
.article-cover { margin: 0 0 28px; }
.article-cover img { width: 100%; height: auto; border-radius: 18px; display: block; }
.toc { border: 1px solid var(--line); border-radius: 14px; padding: 16px 22px; margin: 0 0 32px; background: #fff; }
.toc .lbl { font-weight: 700; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 3px 0; }
.toc li.l3 { margin-left: 16px; list-style: circle; font-size: 15px; }
.article-body { font-size: 18px; line-height: 1.75; }
.article-body h2 { font-size: 28px; margin: 40px 0 14px; line-height: 1.25; scroll-margin-top: 90px; }
.article-body h3 { font-size: 22px; margin: 28px 0 10px; scroll-margin-top: 90px; }
.article-body h4 { font-size: 19px; margin: 22px 0 8px; }
.article-body p, .article-body ul, .article-body ol { margin-bottom: 1.1em; }
.article-body li { margin: .3em 0; }
.article-body blockquote { border-left: 4px solid var(--brand-light); padding: 4px 0 4px 18px; color: var(--text-muted); font-style: italic; margin: 1.4em 0; }
.article-body figure { margin: 1.6em 0; }
.article-body figure img, .article-body p img { max-width: 100%; height: auto; border-radius: 14px; }
.article-body figcaption { font-size: 14px; color: var(--text-muted); margin-top: 6px; text-align: center; }
.article-body .table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 12px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 16px; }
.article-body th, .article-body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body thead th { background: var(--brand-bg); font-weight: 700; }
.article-body tbody tr:last-child td { border-bottom: 0; }
.article-body code { background: #F6F1EB; padding: 1px 6px; border-radius: 6px; font-size: .9em; color: var(--text-dark); }
.article-body hr { margin: 2em 0; opacity: .2; }
.article-section { margin-top: 44px; }
.article-section h2 { font-size: 26px; margin-bottom: 16px; }
.faq-item { border-top: 1px solid var(--line); padding: 16px 0; }
.faq-item h3 { font-size: 19px; margin: 0 0 6px; font-family: 'DM Sans', system-ui, sans-serif; font-weight: 700; }
.faq-item p { margin: 0; font-size: 17px; }
.sources { font-size: 15.5px; padding-left: 20px; }
.sources li { margin: 6px 0; word-break: break-word; }
.author-box { display: flex; gap: 16px; align-items: flex-start; background: #FBF7F2; border-radius: 16px; padding: 20px; margin-top: 40px; }
.author-box .av { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; flex-shrink: 0; }
.author-box p { margin: 0; font-size: 15.5px; color: var(--text-muted); }
.author-box .nm { color: var(--text-dark); font-weight: 700; font-size: 16px; }
.health-note { font-size: 14.5px; color: var(--text-muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 28px; }
.article-cta { background: linear-gradient(135deg, #2C1A0E, #5A3418); color: #fff; border-radius: 20px; padding: 28px; margin-top: 40px; }
.article-cta h2 { color: #fff !important; font-size: 24px; margin: 0 0 8px; }
.article-cta p { color: rgba(255,255,255,.85); margin: 0 0 16px; }
.article-cta .btn-brand { background: #fff; color: var(--brand-strong) !important; }
.related { background: #FBF7F2; padding: 48px 0; }
.related h2 { font-size: 26px; margin-bottom: 20px; }
.preview-bar { background: #FFF3CD; color: #664D03; text-align: center; padding: 8px 16px; font-size: 14px; }
.empty-blog { text-align: center; padding: 64px 16px; color: var(--text-muted); }
