/* ============================================================
   Blog My Meals — estende styles.css
   ============================================================ */

.blog main { max-width: 100%; }

/* ---------- breadcrumbs ---------- */

.crumbs {
  max-width: 720px;
  margin: 18px auto 0;
  padding: 0 20px;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- article ---------- */

.post article { max-width: 720px; margin: 0 auto; padding: 24px 20px 40px; }

.post-head { margin-bottom: 28px; }

.post-cat {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}

.post-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.12; }

.post-byline { margin-top: 16px; color: var(--ink-2); font-size: 0.92rem; }
.post-byline a { color: inherit; text-underline-offset: 3px; }

.post-figure {
  margin: 8px 0 30px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 720 / 400;
  background: var(--surface-alt);
}
.post-figure img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }

/* ---------- corpo articolo ---------- */

.post-body { font-size: 1.06rem; line-height: 1.75; color: var(--ink); }

.post-body h2 {
  font-size: 1.55rem;
  margin: 44px 0 14px;
  line-height: 1.2;
}
.post-body h3 { font-size: 1.18rem; margin: 30px 0 10px; }

.post-body p { margin: 0 0 18px; }
.post-body p, .post-body li { color: #3D3129; }

.post-body a { color: var(--primary-dark); font-weight: 600; text-underline-offset: 3px; }
.post-body a:hover { color: var(--primary); }

.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 26px; }
.post-body li { margin-bottom: 8px; }
.post-body li::marker { color: var(--primary); font-weight: 700; }

.post-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px 20px;
  margin: 0 0 20px;
  color: var(--ink-2);
}
.post-body blockquote p:last-child { margin: 0; }

.post-body strong { color: var(--ink); }

/* tabelle: scroll orizzontale su mobile */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  white-space: normal;
}
.post-body table thead { background: var(--surface-alt); }
.post-body th, .post-body td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  min-width: 110px;
}
.post-body th { font-weight: 700; color: var(--ink); }
.post-body tr:last-child td { border-bottom: none; }
.post-body tbody tr:hover { background: rgba(222, 91, 52, 0.04); }

/* ---------- CTA box ---------- */

.post-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--primary-soft), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px 28px;
  margin: 40px 0;
}
.post-cta-title { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.post-cta p { color: var(--ink-2); font-size: 0.98rem; max-width: 46ch; }
.post-cta .btn { flex: none; }

/* ---------- FAQ articolo ---------- */

.post-faq { margin-top: 8px; }
.post-faq h2 { font-size: 1.55rem; margin-bottom: 16px; }
.post-faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
}
.post-faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: 16px 48px 16px 20px;
  position: relative;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  translate: 0 -50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 50%;
  font-weight: 700;
}
.post-faq details[open] summary::after { content: "–"; }
.post-faq details p { padding: 0 20px 18px; color: var(--ink-2); }

/* ---------- related / card grid ---------- */

.post-related { max-width: 980px; margin: 0 auto; padding: 30px 20px 80px; }
.post-related h2 { text-align: center; margin-bottom: 26px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, translate 0.25s ease;
}
.post-card:hover { box-shadow: var(--shadow-md); translate: 0 -4px; }
.post-card .post-cat { margin-bottom: 0; align-self: flex-start; }
.post-card h3 { font-size: 1.08rem; line-height: 1.25; }
.post-card p {
  color: var(--ink-2);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .post-meta { margin-top: auto; font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }

/* ---------- blog index ---------- */

.blog-index { max-width: var(--max); margin: 0 auto; padding: 30px 20px 80px; }

.blog-hero { text-align: center; max-width: 640px; margin: 20px auto 50px; }
.blog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.blog-hero h1 em { font-style: normal; color: var(--primary); }

.blog-cat { margin-bottom: 48px; }
.blog-cat h2 {
  font-size: 1.35rem;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-soft);
}

@media (max-width: 640px) {
  .post-cta { padding: 22px; }
  .post-cta .btn { width: 100%; }
  .post-body { font-size: 1rem; }
}
