:root {
  --blog-primary: #00bcd4;
  --blog-accent: #7c4dff;
  --blog-dark: #111827;
  --blog-text: #1f2937;
  --blog-muted: #6b7280;
  --blog-bg: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body.blog-body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--blog-bg);
  color: var(--blog-text);
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Google Discover: large visual, mobile-first cards */
.blog-featured-image,
.blog-card img,
#post-hero-image {
  width: 100%;
  min-height: 220px;
  max-height: min(70vh, 630px);
  object-fit: cover;
  border-radius: 12px;
}

.blog-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.blog-card h3 {
  line-height: 1.35;
}

.blog-topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5e7eb;
}

.blog-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.blog-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
}

.blog-logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.blog-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.blog-nav a {
  color: #334155;
  text-decoration: none;
  font-weight: 600;
}

.blog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--blog-primary), var(--blog-accent));
}

.blog-hero {
  padding: 2rem 0 1.6rem;
}

.blog-hero-card {
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 45%, #7c3aed 100%);
  padding: 1.4rem;
}

.blog-hero-card h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
}

.blog-hero-card p {
  margin: 0.7rem 0 0;
  color: rgba(255, 255, 255, 0.92);
}

.blog-search-wrap {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
}

.blog-input,
.blog-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  font: inherit;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  padding-bottom: 3rem;
}

.blog-main-card,
.blog-side-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.blog-featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.blog-featured-body {
  padding: 1rem;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--blog-muted);
}

.blog-title-link {
  display: block;
  margin-top: 0.4rem;
  color: #0f172a;
  text-decoration: none;
}

.blog-title-link:hover {
  color: #2563eb;
}

.blog-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.blog-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.blog-card-body {
  padding: 0.9rem;
}

.tag {
  display: inline-block;
  margin-right: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.74rem;
  font-weight: 700;
}

.blog-sticky-share {
  position: sticky;
  top: 90px;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  text-decoration: none;
  font-weight: 700;
}

.blog-article {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
}

.blog-article-body {
  padding: 1rem;
}

.blog-article-body h2 {
  margin-top: 1.3rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.blog-article-body p {
  color: #334155;
  line-height: 1.8;
}

.toc-list a {
  display: block;
  color: #1d4ed8;
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.toc-list a:hover {
  text-decoration: underline;
}

.faq-item {
  border-top: 1px solid #e5e7eb;
  padding: 0.8rem 0;
}

.faq-item:first-child {
  border-top: 0;
}

.author-card {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.8rem;
  background: #f8fafc;
}

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.load-more-sentinel {
  height: 2px;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr 320px;
  }
}
