/* ========================================================================
   BLOG TEMPLATE STYLES
   ======================================================================== */

/* ---------- Hero Section ---------- */
.blog-hero-section {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: #1a2d45;
}

.blog-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.1) 100%);
  z-index: 2;
}

.blog-hero-content {
  position: relative;
  z-index: 3;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 40px 50px;
}

.blog-hero-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 16px 0 0;
  max-width: 800px;
}

.blog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  flex-wrap: wrap;
}

.blog-breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-breadcrumb a:hover {
  color: #faa831;
}

.blog-breadcrumb-sep {
  color: rgba(255,255,255,0.4);
  font-size: 18px;
}

.blog-breadcrumb-current {
  color: #faa831;
  font-weight: 500;
}

/* ---------- Blog Layout ---------- */
.blog-layout {
  background-color: #f5f5f5;
  padding: 60px 0 80px;
}

.blog-layout-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* ---------- Sidebar / TOC ---------- */
.blog-sidebar {
  flex: 0 0 280px;
  position: sticky;
  top: 100px;
}

.blog-toc {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
}

.blog-toc-title {
  font-size: 16px;
  font-weight: 700;
  color: #2f4e78;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #faa831;
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-toc-list li a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
  text-decoration: none;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.blog-toc-list li a:hover {
  color: #2f4e78;
  background: #f0f4f8;
}

.blog-toc-list li.active a {
  color: #2f4e78;
  font-weight: 600;
  background: #edf2f7;
  border-left-color: #faa831;
}

/* ---------- Article ---------- */
.blog-article {
  flex: 1;
  min-width: 0;
}

.blog-featured-img {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.blog-featured-img img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 500px;
  object-fit: cover;
}

/* ---------- Blog Content Body ---------- */
.blog-content-body {
  background: #fff;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e8e8e8;
}

.blog-content-body h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: #2f4e78;
  margin: 48px 0 16px;
  padding-top: 16px;
  scroll-margin-top: 100px;
}

.blog-content-body h2:first-child {
  margin-top: 0;
}

.blog-content-body h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  color: #2f4e78;
  margin: 32px 0 12px;
}

.blog-content-body h4 {
  font-size: 18px;
  font-weight: 600;
  color: #373435;
  margin: 24px 0 10px;
}

.blog-content-body p {
  font-size: 16px;
  line-height: 1.75;
  color: #444;
  margin: 0 0 16px;
}

.blog-content-body a {
  color: #2f4e78;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.blog-content-body a:hover {
  color: #faa831;
}

.blog-content-body strong,
.blog-content-body b {
  font-weight: 600;
  color: #333;
}

.blog-content-body ul,
.blog-content-body ol {
  padding-left: 28px;
  margin: 12px 0 20px;
}

.blog-content-body li {
  font-size: 16px;
  line-height: 1.75;
  color: #444;
  margin-bottom: 6px;
}

.blog-content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}

.blog-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.blog-content-body table th,
.blog-content-body table td {
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.blog-content-body table th {
  background: #2f4e78;
  color: #fff;
  font-weight: 600;
}

.blog-content-body table tr:nth-child(even) {
  background: #f8f9fa;
}

.blog-content-body blockquote {
  border-left: 4px solid #faa831;
  margin: 24px 0;
  padding: 16px 24px;
  background: #fef9f0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

/* ---------- Tags ---------- */
.blog-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.blog-tags-label {
  font-size: 14px;
  font-weight: 600;
  color: #2f4e78;
  margin-right: 4px;
}

.blog-tag {
  display: inline-block;
  padding: 4px 14px;
  background: #edf2f7;
  color: #2f4e78;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  transition: all 0.2s;
}

.blog-tag:hover {
  background: #2f4e78;
  color: #fff;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 991px) {
  .blog-hero-section {
    min-height: 320px;
  }

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

  .blog-hero-content {
    padding: 40px 24px 36px;
  }

  .blog-layout-inner {
    flex-direction: column;
    padding: 0 20px;
  }

  .blog-sidebar {
    flex: none;
    width: 100%;
    position: static;
    order: -1;
  }

  .blog-toc {
    max-height: none;
  }

  .blog-content-body {
    padding: 28px 20px;
  }

  .blog-content-body h2 {
    font-size: 24px;
  }

  .blog-content-body h3 {
    font-size: 20px;
  }
}

@media screen and (max-width: 479px) {
  .blog-hero-section {
    min-height: 260px;
  }

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

  .blog-featured-img {
    border-radius: 12px;
    margin-bottom: 24px;
  }

  .blog-content-body {
    padding: 20px 16px;
    border-radius: 12px;
  }
}
