/* ============================================================
   BLOG — shared + all-blogs page + single post
============================================================ */

/* ── Blog Hero ── */
.blog-hero {
  background: linear-gradient(155deg, #FFFFFF 50%, #FFFBEB 100%);
  padding: 120px 0 64px;
  border-bottom: 1px solid var(--border);
}
.blog-hero-inner { max-width: 680px; }
.blog-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 14px;
}
.blog-hero p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Category Filters ── */
.blog-filters-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 70px;
  z-index: 50;
}
.blog-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.blog-filters::-webkit-scrollbar { display: none; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
  flex-shrink: 0;
}
.filter-btn:hover {
  border-color: var(--amber);
  color: var(--amber-h);
  background: var(--amber-p);
}
.filter-btn.active {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--white);
}

/* ── Blog Section & Layout ── */
.blog-section { padding: 64px 0 100px; background: var(--white); }

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 48px;
  align-items: start;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ── Blog Card ── */
.blog-card {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  transition: box-shadow .22s, transform .22s, border-color .22s;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
}
.blog-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
  transform: translateY(-4px);
  border-color: var(--amber);
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.blog-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--amber-p);
  flex-shrink: 0;
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--amber-h);
  background: var(--amber-bg);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.blog-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 20px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
  flex-wrap: wrap;
}
.blog-card-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Skeleton Loading Cards ── */
.blog-skeleton {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
}
.skeleton-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, var(--border) 25%, #f0f0f0 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-body { padding: 24px; }
.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--border) 25%, #f0f0f0 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 10px;
}
.skeleton-line:last-child { margin-bottom: 0; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty State ── */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}
.blog-empty-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--amber-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
}
.blog-empty h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.blog-empty p {
  font-size: 15px;
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto;
}

/* ── Sidebar (blog list + single post) ── */
.blog-sidebar,
.post-sidebar {
  position: sticky;
  top: 90px;
}

/* ── Sidebar Demo Card ── */
.sidebar-demo-card {
  background: var(--dark);
  border-radius: 20px;
  padding: 32px 26px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-demo-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,.2) 0%, transparent 65%);
  pointer-events: none;
}
.sidebar-demo-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--amber);
  margin-bottom: 4px;
}
.sidebar-demo-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.sidebar-demo-card p {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  line-height: 1.65;
}
.sidebar-demo-card .btn-primary {
  width: 100%;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   SINGLE BLOG POST
══════════════════════════════════════ */

/* ── Post Hero ── */
.post-hero {
  background: linear-gradient(155deg, #FFFFFF 50%, #FFFBEB 100%);
  padding: 108px 0 56px;
  border-bottom: 1px solid var(--border);
}
.post-hero-inner { max-width: 760px; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 24px;
  transition: color .18s, gap .18s;
}
.post-back:hover { color: var(--amber-d); gap: 10px; }

.post-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--amber-h);
  background: var(--amber-bg);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.post-hero h1 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}
.post-meta-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.post-author { font-weight: 600; color: var(--text); }

/* ── Post Cover ── */
.post-cover-wrap { padding: 40px 0 0; }
.post-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

/* ── Post Body ── */
.post-body { padding: 64px 0 100px; }

.post-layout {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 64px;
  align-items: start;
}

.post-article {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.8;
  color: #374151;
}

/* Prose styles for dynamically injected HTML content */
.post-article h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  line-height: 1.25;
}
.post-article h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  line-height: 1.3;
}
.post-article h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 8px;
}
.post-article p { margin-bottom: 22px; }
.post-article p:last-child { margin-bottom: 0; }
.post-article a { color: var(--amber-h); text-decoration: underline; }
.post-article a:hover { color: var(--amber-d); }
.post-article strong { font-weight: 700; color: var(--text); }
.post-article em { font-style: italic; }
.post-article ul, .post-article ol {
  margin: 0 0 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-article ul li { list-style: disc; }
.post-article ol li { list-style: decimal; }
.post-article li { font-size: 17px; line-height: 1.7; }
.post-article blockquote {
  border-left: 3px solid var(--amber);
  padding: 16px 20px;
  margin: 28px 0;
  background: var(--amber-p);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #92400E;
}
.post-article blockquote p { margin-bottom: 0; color: #92400E; }
.post-article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.post-article img {
  width: 100%;
  border-radius: 14px;
  margin: 24px 0;
  display: block;
}
.post-article pre {
  background: var(--dark);
  color: #e5e7eb;
  padding: 20px 24px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 24px 0;
}
.post-article code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 14px;
  font-family: ui-monospace, monospace;
}
.post-article pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* ── Post Error / Not Found ── */
.post-error {
  text-align: center;
  padding: 100px 20px;
}
.post-error h2 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.post-error p { color: var(--muted); margin-bottom: 28px; }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .blog-layout  { grid-template-columns: 1fr; }
  .post-layout  { grid-template-columns: 1fr; }
  .blog-sidebar,
  .post-sidebar { position: static; }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-filters-wrap { top: 70px; }
  .post-hero { padding: 100px 0 48px; }
  .post-hero h1 { font-size: 1.8rem; }
  .post-article { font-size: 16px; }
  .post-article h2 { font-size: 1.4rem; }
}
