/* ============================================
   BLOG POST PAGE STYLES
   ============================================ */

/* --- Hero --- */
.blog-hero {
  position: relative;
  text-align: center;
  padding: 170px 24px 0;
  overflow: hidden;
}

.blog-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 560px;
  background: linear-gradient(
    180deg,
    #fff3eb 0%,
    #ffe8d6 40%,
    var(--bg-color) 100%
  );
  z-index: 0;
}

.blog-hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary-text);
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.blog-back-link:hover {
  color: var(--brand-orange-primary);
}

.blog-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-orange-primary);
  background: #fff3eb;
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 20px;
}

.blog-hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary-text);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary-text);
}

.blog-meta wa-icon {
  color: var(--brand-orange-primary);
  font-size: 15px;
}

.blog-hero-image {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 44px auto 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.blog-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* --- Layout --- */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 40px 200px;
  align-items: start;
}

/* --- Article body --- */
.blog-content p {
  font-size: 16px;
  font-weight: 400;
  color: var(--secondary-text);
  line-height: 1.75;
  margin-bottom: 20px;
}

.blog-content h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--brand-orange-primary);
  line-height: 1.3;
  margin-top: 48px;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-text);
  line-height: 1.35;
  margin-top: 32px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.blog-content figure {
  margin: 8px 0 28px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.blog-content figure img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-content figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--secondary-text);
  background: var(--white-color);
}

.blog-table-wrapper {
  overflow-x: auto;
  margin: 8px 0 28px;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}

.blog-content table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 14.5px;
  background: var(--white-color);
}

.blog-content th,
.blog-content td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  color: var(--secondary-text);
  line-height: 1.5;
}

.blog-content th {
  background: #fff3eb;
  color: var(--primary-text);
  font-weight: 700;
  white-space: nowrap;
}

.blog-content tr:last-child td {
  border-bottom: none;
}

.blog-content ul {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-content ul li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  color: var(--secondary-text);
  line-height: 1.7;
}

.blog-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-orange-primary);
}

.blog-content ul li strong {
  color: var(--primary-text);
  font-weight: 700;
}

/* --- Table of contents card --- */
.blog-toc {
  background: var(--white-color);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 28px 32px;
  margin-bottom: 36px;
}

.blog-toc h4 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-text);
  margin-bottom: 16px;
}

.blog-toc ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-toc ol li {
  counter-increment: toc-counter;
}

.blog-toc ol li a {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--secondary-text);
  line-height: 1.5;
  transition: color 0.2s ease;
}

.blog-toc ol li a::before {
  content: counter(toc-counter);
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff3eb;
  color: var(--brand-orange-primary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-toc ol li a:hover {
  color: var(--brand-orange-primary);
}

/* --- Sidebar --- */
.blog-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: calc(112vh);
  overflow-y: auto;
  scrollbar-width: none;
}

.blog-sidebar::-webkit-scrollbar {
  display: none;
}

.blog-sidebar-card {
  background: var(--white-color);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 28px;
}

.blog-sidebar-card h3,
.blog-sidebar-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-text);
  margin-bottom: 10px;
}

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

.blog-sidebar-card .btn-primary,
.blog-sidebar-card .btn-secondary {
  width: 100%;
  justify-content: center;
}

.blog-app-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-related-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-related-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.blog-related-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
}

.blog-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-related-text {
  min-width: 0;
}

.blog-related-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-text);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.blog-related-item:hover .blog-related-title {
  color: var(--brand-orange-primary);
}

.blog-related-date {
  display: block;
  font-size: 12px;
  color: var(--secondary-text);
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .blog-hero {
    padding: 150px 24px 0;
  }

  .blog-hero-content h1 {
    font-size: 2.4rem;
  }

  .blog-layout {
    grid-template-columns: 1fr;
    padding: 48px 24px 90px;
    gap: 40px;
  }

  .blog-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .blog-sidebar-card {
    flex: 1 1 260px;
  }
}

@media (max-width: 575px) {
  .blog-hero {
    padding: 120px 16px 0;
  }

  .blog-hero-content h1 {
    font-size: 1.85rem;
  }

  .blog-category {
    font-size: 12px;
    padding: 5px 12px;
  }

  .blog-hero-image {
    margin-top: 28px;
    border-radius: 14px;
  }

  .blog-layout {
    padding: 36px 16px;
  }

  .blog-content h2 {
    font-size: 1.35rem;
    margin-top: 36px;
  }

  .blog-toc {
    padding: 22px 20px;
  }

  .blog-sidebar {
    flex-direction: column;
  }

  .blog-sidebar-card {
    padding: 22px;
  }
}
