/* ===========================================
   KinPatch Blog Styles
   ALL STYLES SCOPED UNDER .blog-page
   =========================================== */

/* ===========================================
   Hero Section
   =========================================== */
.blog-hero {
  background: linear-gradient(160deg, #FFFCFA 0%, #FFF8F2 100%);
  padding: 80px 24px 60px;
  text-align: center;
}

.blog-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.blog-hero-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 16px;
}

.blog-hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===========================================
   Blog Content / Grid
   =========================================== */
.blog-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

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

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

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

/* ===========================================
   Blog Card
   =========================================== */
.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 20px;
}

.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.blog-card-meta {
  font-size: 13px;
  color: var(--text-light);
}

.blog-card-meta-sep {
  margin: 0 6px;
}

/* ===========================================
   Blog Empty State
   =========================================== */
.blog-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-secondary);
  font-size: 18px;
}

/* ===========================================
   Blog Post Hero (Show Page)
   =========================================== */
.blog-post-hero {
  position: relative;
  height: 320px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-post-hero--no-image {
  background: linear-gradient(160deg, #FFFCFA 0%, #FFF8F2 100%);
}

.blog-post-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  text-align: center;
}

.blog-post-hero--no-image .blog-post-hero-overlay {
  background: none;
}

.blog-post-hero-title {
  max-width: 900px;
  margin: 0 auto;
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

.blog-post-hero--no-image .blog-post-hero-title {
  color: var(--text);
}

/* ===========================================
   Blog Article (Show Page)
   =========================================== */
.blog-article-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}

/* ===========================================
   Article Body (Markdown Content)
   =========================================== */
.blog-article-body {
  font-size: 17px;
  color: var(--text);
  line-height: 1.75;
}

.blog-article-body h1 {
  font-size: 32px;
  font-weight: 800;
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.blog-article-body h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.blog-article-body h3 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-article-body p {
  margin-bottom: 20px;
}

.blog-article-body a {
  color: var(--primary);
  text-decoration: underline;
}

.blog-article-body a:hover {
  color: var(--primary-dark);
}

.blog-article-body strong {
  font-weight: 700;
}

.blog-article-body ul,
.blog-article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.blog-article-body ul {
  list-style-type: disc;
}

.blog-article-body ol {
  list-style-type: decimal;
}

.blog-article-body li {
  margin-bottom: 6px;
}

.blog-article-body blockquote {
  border-left: 4px solid var(--primary-light);
  padding: 12px 20px;
  margin: 24px 0;
  background: #FFFBF7;
  color: var(--text-secondary);
  font-style: italic;
}

.blog-article-body blockquote p {
  margin-bottom: 0;
}

.blog-article-body code {
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.blog-article-body pre {
  background: #1F2937;
  color: #F9FAFB;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.blog-article-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 14px;
  color: inherit;
}

.blog-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
  display: block;
}

.blog-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.blog-article-body th,
.blog-article-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.blog-article-body th {
  background: var(--surface);
  font-weight: 600;
}

.blog-article-body hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 40px 0;
}

/* ===========================================
   Blog CTA
   =========================================== */
.blog-cta {
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #FFF5EB 50%, #FFFBF7 100%);
  text-align: center;
}

.blog-cta-inner {
  max-width: 900px;
  margin: 0 auto;
}

.blog-cta h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 20px;
}

.blog-cta-body {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.blog-cta-body:last-of-type {
  margin-bottom: 32px;
}

.blog-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  padding: 18px 36px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(245, 132, 31, 0.25);
  transition: all 0.2s ease;
}

.blog-cta-button:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(245, 132, 31, 0.35);
  transform: translateY(-2px);
}

.blog-cta-button .mdi {
  font-size: 22px;
  transition: transform 0.2s ease;
}

.blog-cta-button:hover .mdi {
  transform: translateX(4px);
}


/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 640px) {
  .blog-hero {
    padding: 60px 20px 40px;
  }

  .blog-hero-title {
    font-size: 32px;
  }

  .blog-hero-subtitle {
    font-size: 16px;
  }

  .blog-post-hero {
    height: 240px;
  }

  .blog-post-hero-title {
    font-size: 28px;
  }

  .blog-article-body {
    font-size: 16px;
  }

  .blog-article-body h1 {
    font-size: 26px;
  }

  .blog-article-body h2 {
    font-size: 22px;
  }

  .blog-article-body h3 {
    font-size: 19px;
  }

  .blog-cta {
    padding: 60px 20px;
  }
}
