/* BLOG LIST PAGE  */

/* Page spacing */
.blog-hero {
  background: #f7f8fa;
  padding: 40px 20px 40px;
  text-align: center;
}

.blog-hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.blog-hero h1 {
  font-size: 42px;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
}

.blog-hero p {
  font-size: 18px;
  color: #555;
  line-height: 1.6;
}

/* Main container */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Blog card */
.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.blog-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-card .blog-content {
  padding: 20px 20px 20px;
}

.blog-card .blog-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.blog-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #e60000;
  margin-bottom: 10px;
}

.blog-excerpt {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 16px;
}

.blog-date {
  font-size: 13px;
  color: #888;
}

/* BLOG DETAIL */

/* Back link */
.blog-back-top {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.blog-back-top a {
  font-size: 14px;
  font-weight: 600;
  color: #e60000;
  text-decoration: none;
}

/* Hero background */
.blog-hero-detail {
  background: #f7f8fa;
  padding: 50px 0 50px;
}

.blog-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Intro layout */
.blog-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.blog-intro-left .blog-title {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.blog-intro-left .blog-excerpt {
  font-size: 18px;
  color: #555;
  margin-bottom: 20px;
}

.blog-meta {
  font-size: 14px;
  color: #777;
}

.blog-intro-right img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}

/* Body + TOC */
.blog-body {
  background: #fff;
  padding: 50px 0;
}

.blog-body-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;

  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 60px;
}

/* Left column wrapper */
.blog-main {
  display: flex;
  flex-direction: column;
}

.blog-content {
  font-size: 17px;
  line-height: 1.9;
  color: #222;
}

.blog-content h2,
.blog-content h3 {
  margin-top: 10px;
  margin-bottom: 16px;
}

/* spacing between headings and lists */
.blog-content h2 + ul,
.blog-content h3 + ul,
.blog-content h2 + ol,
.blog-content h3 + ol {
  margin-top: 12px;
}

.blog-content ul,
.blog-content ol {
  margin-left: 18px;
  margin-bottom: 18px;
  padding-left: 0;
  list-style-position: inside;
}

/* Blog content tables */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.blog-content th,
.blog-content td {
  border: 1px solid #ddd;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.blog-content th {
  background: #f7f8fa;
  font-weight: 600;
}

/* TOC */
.blog-toc {
  position: sticky;
  top: 120px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 24px;
  height: fit-content;
}

.blog-toc h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.blog-toc ul {
  list-style: none;
  padding: 0;
}

.blog-toc li {
  margin-bottom: 10px;
}

.blog-toc a {
  font-size: 14px;
  color: #444;
  text-decoration: none;
}

.blog-toc a:hover {
  color: #e60000;
}

/* Author box */
.blog-author {
  background: #f7f8fa;
  padding: 32px;
  margin-top: 40px;
  border-radius: 12px;
}

/* CTA */
.blog-cta {
  background: #111;
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}

.blog-cta-inner {
  max-width: 800px;
  margin: 0 auto;
}

.blog-cta h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.blog-cta p {
  font-size: 17px;
  color: #ccc;
  margin-bottom: 24px;
}

.blog-cta .cta-btn {
  display: inline-block;
  background: #e60000;
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

/* RESPONSIVE */

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-intro,
  .blog-body-inner {
    grid-template-columns: 1fr;
  }

  .blog-toc {
    position: relative;
    top: 0;
    order: 1;
    margin-bottom: 32px;
  }
   .blog-main {
    order: 2;
  }
}

@media (max-width: 640px) {
  .blog-hero h1,
  .blog-intro-left .blog-title {
    font-size: 32px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* Author inner layout*/
.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.author-info h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.author-info p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.blog-category-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.category-btn {
  background: #f3f3f3;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.category-btn.active {
  background: #e60000;
  color: #fff;
}



