/* ═══════════════════════════════════════════════════════════════
   blog-detail.css — Blog article detail page
   ═══════════════════════════════════════════════════════════════ */

/* ── Page ── */
.blog-detail-page {
  min-height: 100vh;
  padding-bottom: 3rem;
}

/* ── Hero ── */
.blog-detail-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
}

.blog-detail-hero__cats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.blog-detail-hero__cats a {
  background: rgba(65, 109, 109, 0.08);
  color: #416d6d;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.dark .blog-detail-hero__cats a {
  background: rgba(65, 109, 109, 0.2);
  color: #e0c87a;
}
.blog-detail-hero__cats a:hover { background: rgba(207, 164, 52, 0.15); color: #cfa434; }

.blog-detail-hero__title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #2d2d2d;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.dark .blog-detail-hero__title { color: #e8e8e8; }

.blog-detail-hero__info {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: #7a7a7a;
  flex-wrap: wrap;
}
.dark .blog-detail-hero__info { color: #809898; }

.blog-detail-hero__info span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.blog-detail-hero__info svg {
  width: 0.875rem;
  height: 0.875rem;
  color: #cfa434;
}

/* ── Accent bar ── */
.blog-detail-accent {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
}

.blog-detail-accent__bar {
  height: 3px;
  background: linear-gradient(90deg, #cfa434, #416d6d, transparent);
  border-radius: 2px;
}

/* ── Main content area ── */
.blog-detail-main {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── Sidebar ── */
.blog-detail-sidebar {
  position: sticky;
  top: 100px;
}

.blog-detail-cover {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(207, 164, 52, 0.12);
  margin-bottom: 1rem;
}
.dark .blog-detail-cover {
  background: #1a2e2e;
  border-color: rgba(207, 164, 52, 0.2);
}

.blog-detail-cover__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
}
.dark .blog-detail-cover__image {
  background: linear-gradient(145deg, #1f2937, #152626);
}

.blog-detail-cover__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-detail-cover__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-detail-cover__placeholder svg { width: 3rem; height: 3rem; color: rgba(0,0,0,0.15); }

.blog-detail-cover__progress {
  height: 3px;
  background: #e5e7eb;
}
.dark .blog-detail-cover__progress { background: rgba(255,255,255,0.06); }

.blog-detail-cover__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #cfa434, #416d6d);
  width: 0%;
  transition: width 0.1s linear;
}

.blog-detail-cover__info {
  padding: 0.625rem 0.875rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #7a7a7a;
  background: #fff;
}
.dark .blog-detail-cover__info {
  color: #809898;
  background: #1a2e2e;
}
.blog-detail-cover__info span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.blog-detail-cover__info svg { width: 0.75rem; height: 0.75rem; color: #cfa434; }

/* ── Summary box ── */
.blog-detail-summary {
  background: rgba(207, 164, 52, 0.04);
  border-right: 3px solid #cfa434;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #7a7a7a;
}
.dark .blog-detail-summary {
  background: rgba(207, 164, 52, 0.06);
  color: #809898;
}

.blog-detail-summary h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2d2d2d;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.dark .blog-detail-summary h4 { color: #e8e8e8; }
.blog-detail-summary h4 svg { width: 0.875rem; height: 0.875rem; color: #cfa434; }

.blog-detail-summary p { margin: 0; text-align: justify; }

/* ── Content area ── */
.blog-detail-content {
  min-width: 0;
}

/* ── TOC ── */
.blog-detail-toc {
  background: #fff;
  border: 1px solid rgba(207, 164, 52, 0.12);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.dark .blog-detail-toc {
  background: #1a2e2e;
  border-color: rgba(207, 164, 52, 0.2);
}

.blog-detail-toc__header {
  font-weight: 700;
  color: #2d2d2d;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid rgba(207, 164, 52, 0.2);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.dark .blog-detail-toc__header { color: #e8e8e8; }
.blog-detail-toc__header svg { width: 1rem; height: 1rem; color: #cfa434; }

.blog-detail-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-detail-toc__list li { margin: 0.375rem 0; }

.blog-detail-toc__list a {
  color: #7a7a7a;
  text-decoration: none;
  font-size: 0.8rem;
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.dark .blog-detail-toc__list a { color: #809898; }

.blog-detail-toc__list a:hover,
.blog-detail-toc__list a.active {
  color: #cfa434;
  font-weight: 600;
  background: rgba(207, 164, 52, 0.06);
}

.toc-h3 { padding-right: 1rem; }
.toc-h4 { padding-right: 1.5rem; }

/* ── Article body ── */
.blog-detail-article {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 2.5rem;
  border: 1px solid rgba(207, 164, 52, 0.12);
  line-height: 2.1;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #2d2d2d;
  min-width: 0;
}
.dark .blog-detail-article {
  background: #1a2e2e;
  border-color: rgba(207, 164, 52, 0.2);
  color: #e8e8e8;
}

.blog-detail-article h2 {
  color: #2d2d2d;
  margin: 2rem 0 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(207, 164, 52, 0.1);
}
.dark .blog-detail-article h2 { color: #e8e8e8; }

.blog-detail-article h3 {
  color: #2d2d2d;
  margin: 1.5rem 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.dark .blog-detail-article h3 { color: #e8e8e8; }

.blog-detail-article p { margin-bottom: 1rem; }

.blog-detail-article img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.blog-detail-article blockquote {
  border-right: 3px solid #cfa434;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  background: rgba(207, 164, 52, 0.04);
  border-radius: 8px;
  color: #7a7a7a;
  font-style: italic;
}
.dark .blog-detail-article blockquote {
  background: rgba(207, 164, 52, 0.06);
  color: #809898;
}

.blog-detail-article ul,
.blog-detail-article ol { margin-bottom: 1rem; padding-right: 1.5rem; }
.blog-detail-article li { margin-bottom: 0.375rem; }
.blog-detail-article a { color: #cfa434; text-decoration: underline; }

/* ── Tags & Share ── */
.blog-detail-tags {
  background: #fff;
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid rgba(207, 164, 52, 0.12);
}
.dark .blog-detail-tags {
  background: #1a2e2e;
  border-color: rgba(207, 164, 52, 0.2);
}

.blog-detail-tags__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: wrap;
}
.dark .blog-detail-tags__row { border-color: rgba(255,255,255,0.06); }

.blog-detail-tags__row:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.blog-detail-tags__label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  color: #7a7a7a;
}
.dark .blog-detail-tags__label { color: #809898; }
.blog-detail-tags__label svg { width: 1rem; height: 1rem; color: #cfa434; }

.blog-detail-tags__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.blog-detail-tags__items span {
  background: rgba(65, 109, 109, 0.08);
  color: #416d6d;
  padding: 0.2rem 0.625rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}
.dark .blog-detail-tags__items span {
  background: rgba(65, 109, 109, 0.2);
  color: #e0c87a;
}

.blog-detail-tags__share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}
.dark .blog-detail-tags__share { border-color: rgba(255,255,255,0.06); }

.blog-detail-tags__share button,
.blog-detail-tags__share a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border: 1.5px solid #e5e7eb;
  background: transparent;
  border-radius: 9999px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: #7a7a7a;
  text-decoration: none;
}
.dark .blog-detail-tags__share button,
.dark .blog-detail-tags__share a {
  border-color: rgba(255,255,255,0.1);
  color: #809898;
}

.blog-detail-tags__share button:hover,
.blog-detail-tags__share a:hover {
  background: linear-gradient(135deg, #416d6d, #146262);
  color: #fff;
  border-color: transparent;
}

.blog-detail-tags__share svg { width: 0.875rem; height: 0.875rem; }

/* ── Back link ── */
.blog-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: #cfa434;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  border-radius: 10px;
}
.blog-detail-back svg { width: 1rem; height: 1rem; }

.blog-detail-back:hover {
  background: rgba(207, 164, 52, 0.06);
  gap: 0.75rem;
}

/* ── Responsive: Tablet ── */
@media (max-width: 991px) {
  .blog-detail-main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-detail-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .blog-detail-cover { margin-bottom: 0; }

  .blog-detail-toc { position: static; }
}

@media (max-width: 767px) {
  .blog-detail-sidebar { grid-template-columns: 1fr; }

  .blog-detail-main { padding: 0 0.75rem; }
  .blog-detail-hero { padding: 1rem 0.75rem 0; }

  .blog-detail-article { padding: 1.25rem; }
  .blog-detail-hero__info { gap: 0.75rem; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .blog-detail-hero__title { font-size: 1.2rem; }
  .blog-detail-article { padding: 1rem; border-radius: 16px; }
  .blog-detail-article h2 { font-size: 1.1rem; }
  .blog-detail-article h3 { font-size: 1rem; }
  .blog-detail-tags { padding: 1rem; }
}
