/* Blog Primo Atto — editoriale, leggibile, coerente con il catalogo */
.top {
  padding-left: max(24px, calc((100vw - 1180px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1180px) / 2 + 24px));
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.blog-nav a {
  padding: 8px 11px;
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.blog-nav a:hover,
.blog-nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }

.blog-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 48px;
  align-items: end;
  padding: clamp(54px, 8vw, 92px) 0 44px;
  border-bottom: 1px solid var(--line);
}
.blog-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}
.blog-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}
.blog-hero h1 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(48px, 6.4vw, 78px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
}
.blog-hero > div > p:last-child {
  max-width: 62ch;
  margin: 24px 0 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
}
.blog-hero-aside {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.blog-hero-aside strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
}
.blog-hero-aside span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.blog-hero-aside p {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.blog-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 44px 0 20px;
}
.blog-section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.03em;
}
.blog-section-head span { color: var(--muted); font-size: 12px; }

.blog-tools {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) minmax(180px, .8fr) minmax(160px, .7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.blog-tools label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.blog-tools input,
.blog-tools select {
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}
.blog-tools input:focus,
.blog-tools select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(158, 47, 37, .13);
}
.blog-tools .text-button {
  justify-self: start;
  padding-bottom: 12px;
  white-space: nowrap;
}
.blog-results {
  margin: 16px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 264px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.blog-card[hidden]{display:none}
.blog-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.blog-card .tag {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}
.blog-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 2.5vw, 31px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted);
  font-size: 11px;
}
.blog-card::after {
  content: "→";
  position: absolute;
  right: 26px;
  bottom: 24px;
  color: var(--muted-2);
  font-size: 18px;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.blog-card:hover::after { color: var(--accent); transform: translateX(3px); }

.blog-card[data-featured="true"] {
  grid-column: 1 / -1;
  min-height: 300px;
  padding: 34px;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.blog-card[data-featured="true"] .tag {
  background: rgba(255, 255, 255, .1);
  color: #f0c7bd;
}
.blog-card[data-featured="true"] h3 {
  max-width: 22ch;
  font-size: clamp(34px, 4.5vw, 52px);
}
.blog-card[data-featured="true"] p {
  max-width: 64ch;
  color: rgba(247, 244, 236, .72);
  font-size: 14px;
}
.blog-card[data-featured="true"] .blog-meta { color: rgba(247, 244, 236, .58); }
.blog-card[data-featured="true"]::after { color: rgba(247, 244, 236, .5); }
.blog-card[data-featured="true"]:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.blog-empty {
  margin-bottom: 48px;
  padding: 40px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.blog-empty[hidden] { display: none; }
.blog-empty strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
}
.blog-empty p { margin: 6px 0 4px; }

/* Pagine articolo */
.article-shell {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 46px 24px 84px;
}
.breadcrumb {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span { margin: 0 7px; color: var(--muted-2); }

.article-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
}
.article-deck {
  max-width: 68ch;
  margin: 22px 0 0;
  color: var(--body);
  font-size: 19px;
  line-height: 1.65;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 28px 0 38px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.article-meta strong { color: var(--ink); font-weight: 600; }

.article-body {
  color: var(--body);
  font-size: 17px;
  line-height: 1.82;
}
.article-body p { margin: 0 0 22px; }
.article-body h2 {
  margin: 48px 0 16px;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.12;
}
.article-body h3 {
  margin: 32px 0 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.article-body ul,
.article-body ol { margin: 0 0 24px; padding-left: 22px; }
.article-body li { margin-bottom: 9px; }
.article-body a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body .lead { font-size: 19px; line-height: 1.75; }
.article-body blockquote {
  margin: 26px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  color: var(--body);
  font-size: 15px;
  line-height: 1.7;
}

.table-scroll {
  margin: 24px 0 30px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.article-body table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}
.article-body th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}
.article-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article-body tr:last-child td { border-bottom: 0; }

.article-callout {
  margin: 30px 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--green-soft);
  color: var(--body);
  font-size: 15px;
  line-height: 1.7;
}
.article-callout strong { color: var(--green); }

.article-cta {
  margin: 46px 0 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.article-cta h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.article-cta p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.article-cta .primary { display: inline-flex; min-width: 250px; }

.sources {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.sources h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.sources p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.sources ul { padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.sources a { color: var(--accent); }

@media (max-width: 900px) {
  .blog-hero { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .blog-hero-aside { max-width: 320px; }
  .blog-tools { grid-template-columns: 1fr 1fr; }
  .blog-tools .blog-search { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .top { padding-left: 18px; padding-right: 18px; }
  .blog-main { padding: 0 18px; }
  .blog-hero { padding: 44px 0 34px; }
  .blog-hero h1 { font-size: clamp(44px, 13vw, 58px); }
  .blog-hero > div > p:last-child { font-size: 16px; }
  .blog-list { grid-template-columns: 1fr; }
  .blog-card[data-featured="true"] { grid-column: auto; padding: 26px; }
  .blog-card[data-featured="true"] h3 { font-size: 34px; }
  .article-shell { padding: 32px 18px 64px; }
  .article-deck { font-size: 17px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 29px; }
}

@media (max-width: 520px) {
  .top .beta { display: none; }
  .blog-nav a[href="/rss.xml"] { display: none; }
  .blog-nav a { padding: 8px; font-size: 12px; }
  .blog-tools { grid-template-columns: 1fr; padding: 15px; }
  .blog-tools .text-button { padding-bottom: 0; }
  .blog-card { padding: 22px; }
  .blog-card::after { right: 22px; bottom: 20px; }
  .article-cta { padding: 22px; }
  .article-cta .primary { width: 100%; min-width: 0; }
}
