/* =========================================================
   Blog Detail Page
   File: css/blog-detail.css
   ========================================================= */

.blog-detail-page {
  background: #fffdf8;
}

.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  z-index: 99999;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #d5ad58;
  transition: width 0.1s linear;
}

/* =========================================================
   Hero
   ========================================================= */

.blog-detail-hero-section {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: #021d13;
}

.blog-detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.blog-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 28%, rgba(213, 173, 88, 0.14), transparent 330px),
    linear-gradient(
      90deg,
      rgba(2, 29, 19, 0.18) 0%,
      rgba(2, 29, 19, 0.58) 45%,
      rgba(2, 29, 19, 0.94) 100%
    );
}

.blog-detail-hero-content {
  position: relative;
  z-index: 2;
  min-height: 460px;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  padding: 60px 0;
}

.blog-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.blog-detail-breadcrumb a {
  color: #ead28a;
  font-weight: 800;
}

.blog-detail-breadcrumb strong {
  color: rgba(255, 255, 255, 0.92);
}

.blog-detail-label,
.blog-detail-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d5ad58;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 8px;
}

.blog-detail-label::before,
.blog-detail-section-label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: #d5ad58;
}

.blog-detail-hero-content h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 46px;
  font-weight: 900;
  line-height: 1.55;
}

.blog-detail-hero-content p {
  max-width: 860px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 2.05;
}

.blog-detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.blog-detail-meta span {
  height: 36px;
  border: 1px solid rgba(213, 173, 88, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.90);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 800;
}

.blog-detail-meta i {
  color: #d5ad58;
}

/* =========================================================
   Layout
   ========================================================= */

.blog-detail-main-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(213, 173, 88, 0.08), transparent 430px),
    #fffdf8;
  padding: 58px 0 68px;
}

.blog-detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 30px;
  align-items: start;
}

.blog-detail-sidebar {
  position: sticky;
  top: 145px;
  display: grid;
  gap: 18px;
}

.blog-detail-sidebar-card,
.article-featured-image,
.article-body,
.article-tags-card,
.article-author-card,
.article-comments-card,
.article-related-grid article {
  border: 1px solid #e9dfc9;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.035);
}

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

.blog-detail-sidebar-card h2 {
  margin: 0 0 16px;
  color: #063522;
  font-size: 21px;
  font-weight: 900;
}

/* =========================================================
   Sidebar
   ========================================================= */

.article-toc {
  display: grid;
  gap: 8px;
}

.article-toc a {
  border-radius: 11px;
  background: #fffdf8;
  color: #063522;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 900;
  transition: 0.25s ease;
}

.article-toc a:hover,
.article-toc a.active {
  background: #07452e;
  color: #ffffff;
}

.article-share-list,
.article-font-actions {
  display: grid;
  gap: 10px;
}

.article-share-list button,
.article-share-list a,
.article-font-actions button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff7e4;
  color: #063522;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  transition: 0.25s ease;
}

.article-share-list button:hover,
.article-share-list a:hover,
.article-font-actions button:hover {
  background: #07452e;
  color: #ffffff;
}

.blog-detail-alert {
  display: none;
  margin-top: 12px;
  border-radius: 11px;
  background: rgba(7, 69, 46, 0.08);
  color: #07452e;
  padding: 11px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.8;
}

.blog-detail-alert.show {
  display: block;
}

.side-related-posts {
  display: grid;
  gap: 14px;
}

.side-related-posts a {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
}

.side-related-posts img {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  background: #fffdf8;
  object-fit: contain;
  border: 1px solid #eee4cf;
  padding: 7px;
}

.side-related-posts strong {
  color: #063522;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.8;
  display: block;
}

.side-related-posts span {
  color: #8a8a8a;
  font-size: 12px;
}

.blog-detail-newsletter {
  text-align: center;
}

.blog-detail-newsletter > i {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fff7e4;
  color: #9c762e;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 30px;
}

.blog-detail-newsletter p {
  margin: 0 0 14px;
  color: #626a63;
  font-size: 13px;
  line-height: 2;
}

.blog-detail-newsletter form {
  display: grid;
  gap: 10px;
}

.blog-detail-newsletter input {
  height: 44px;
  border: 1px solid #e0d5be;
  border-radius: 999px;
  background: #fffdf8;
  outline: 0;
  padding: 0 14px;
  color: #273027;
  font-size: 13px;
}

.blog-detail-newsletter button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #07452e;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

/* =========================================================
   Content / Article
   ========================================================= */

.blog-detail-content {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.article-featured-image {
  overflow: hidden;
  margin: 0;
}

.article-featured-image img {
  width: 100%;
  height: 470px;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 45%, rgba(213, 173, 88, 0.12), transparent 280px),
    #fffdf8;
  padding: 30px;
}

.article-featured-image figcaption {
  border-top: 1px solid #eee4cf;
  color: #626a63;
  font-size: 13px;
  line-height: 2;
  padding: 14px 20px;
  text-align: center;
}

.article-body {
  padding: 34px;
  font-size: var(--article-font-size, 16px);
}

.article-body section {
  scroll-margin-top: 150px;
  margin-bottom: 38px;
}

.article-body section:last-child {
  margin-bottom: 0;
}

.article-body h2 {
  margin: 0 0 16px;
  color: #063522;
  font-size: 1.75em;
  font-weight: 900;
  line-height: 1.55;
}

.article-body h3 {
  color: #063522;
  font-weight: 900;
}

.article-body p {
  margin: 0 0 15px;
  color: #4f5a53;
  font-size: 1em;
  line-height: 2.25;
}

.article-body ul,
.article-body ol {
  margin: 16px 0;
  padding-right: 22px;
}

.article-body li {
  color: #4f5a53;
  font-size: 1em;
  line-height: 2.15;
  margin-bottom: 6px;
}

.article-body blockquote {
  position: relative;
  margin: 24px 0;
  border-right: 4px solid #d5ad58;
  border-radius: 14px;
  background: #fff7e4;
  color: #063522;
  padding: 22px 24px;
  font-size: 1.08em;
  font-weight: 900;
  line-height: 2.1;
}

.article-highlight-box {
  border: 1px solid rgba(213, 173, 88, 0.32);
  border-radius: 16px;
  background: #fff7e4;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  margin: 24px 0;
}

.article-highlight-box > i {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #07452e;
  color: #d5ad58;
  display: grid;
  place-items: center;
  font-size: 26px;
  flex: 0 0 auto;
}

.article-highlight-box h3 {
  margin: 0 0 6px;
  font-size: 1.15em;
}

.article-highlight-box p {
  margin: 0;
}

.article-image-row {
  border: 1px solid #eee4cf;
  border-radius: 18px;
  background: #fffdf8;
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  margin: 24px 0;
}

.article-image-row img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.article-image-row > div {
  padding: 24px;
}

.article-image-row h3 {
  margin: 0 0 8px;
}

.article-image-row p {
  margin: 0;
}

.article-check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0;
}

.article-check-grid article {
  border: 1px solid #eee4cf;
  border-radius: 15px;
  background: #fffdf8;
  padding: 22px;
}

.article-check-grid i {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: #fff7e4;
  color: #9c762e;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 14px;
}

.article-check-grid h3 {
  margin: 0 0 8px;
  font-size: 1.1em;
}

.article-check-grid p {
  margin: 0;
  font-size: 0.95em;
}

.article-cta-box {
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 30%, rgba(213, 173, 88, 0.16), transparent 260px),
    linear-gradient(135deg, #021d13, #07452e);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  margin-top: 24px;
}

.article-cta-box span {
  color: #d5ad58;
  font-size: 13px;
  font-weight: 900;
}

.article-cta-box h3 {
  margin: 5px 0 8px;
  color: #ffffff;
  font-size: 1.35em;
}

.article-cta-box p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.article-cta-box a {
  height: 46px;
  border-radius: 999px;
  background: #d5ad58;
  color: #021d13;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}

/* =========================================================
   Tags / Author
   ========================================================= */

.article-tags-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.article-tags-card span {
  color: #063522;
  font-size: 14px;
  font-weight: 900;
}

.article-tags-card a {
  height: 34px;
  border-radius: 999px;
  background: #fff7e4;
  color: #9c762e;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.article-tags-card a:hover {
  background: #07452e;
  color: #ffffff;
}

.article-author-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.article-author-card img {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.article-author-card span {
  color: #9c762e;
  font-size: 13px;
  font-weight: 900;
}

.article-author-card h3 {
  margin: 4px 0 6px;
  color: #063522;
  font-size: 22px;
  font-weight: 900;
}

.article-author-card p {
  margin: 0;
  color: #626a63;
  font-size: 14px;
  line-height: 2;
}

/* =========================================================
   Comments
   ========================================================= */

.article-comments-card {
  padding: 26px;
}

.article-comments-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.article-comments-head h2 {
  margin: 0;
  color: #063522;
  font-size: 28px;
  font-weight: 900;
}

.article-comments-head > span {
  height: 34px;
  border-radius: 999px;
  background: #fff7e4;
  color: #9c762e;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.article-comment-list {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.article-comment-list article {
  border: 1px solid #eee4cf;
  border-radius: 15px;
  background: #fffdf8;
  padding: 18px;
  display: flex;
  gap: 14px;
}

.comment-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #07452e;
  color: #ffffff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.comment-head strong {
  color: #063522;
  font-size: 14px;
  font-weight: 900;
}

.comment-head span {
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 700;
}

.comment-body p {
  margin: 0;
  color: #5c665f;
  font-size: 14px;
  line-height: 2;
}

.article-comment-form {
  border-top: 1px solid #eee4cf;
  padding-top: 24px;
  display: grid;
  gap: 16px;
}

.article-comment-form h3 {
  margin: 0;
  color: #063522;
  font-size: 22px;
  font-weight: 900;
}

.comment-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.comment-form-group {
  display: grid;
  gap: 8px;
}

.comment-form-group label {
  color: #063522;
  font-size: 14px;
  font-weight: 900;
}

.comment-form-group label span {
  color: #999;
  font-size: 12px;
  font-weight: 500;
}

.comment-form-group input,
.comment-form-group textarea {
  width: 100%;
  border: 1px solid #e0d5be;
  border-radius: 12px;
  background: #fffdf8;
  color: #273027;
  outline: 0;
  font-size: 14px;
  transition: 0.22s ease;
}

.comment-form-group input {
  height: 50px;
  padding: 0 14px;
}

.comment-form-group textarea {
  resize: vertical;
  min-height: 130px;
  padding: 14px;
  line-height: 2;
}

.comment-form-group input:focus,
.comment-form-group textarea:focus {
  border-color: #d5ad58;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(213, 173, 88, 0.12);
}

.comment-form-group small {
  display: none;
  color: #9d2a24;
  font-size: 12px;
}

.comment-form-group.has-error small {
  display: block;
}

.comment-form-group.has-error input,
.comment-form-group.has-error textarea {
  border-color: #9d2a24;
  background: #fff8f7;
}

.article-comment-form button {
  width: fit-content;
  min-width: 170px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #07452e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 900;
  transition: 0.25s ease;
}

.article-comment-form button:hover {
  background: #d5ad58;
  color: #021d13;
}

/* =========================================================
   Related Articles
   ========================================================= */

.article-related-section {
  background: #fffdf8;
  padding: 0 0 70px;
}

.article-related-head {
  text-align: center;
  margin-bottom: 28px;
}

.article-related-head .blog-detail-label {
  justify-content: center;
}

.article-related-head .blog-detail-label::after {
  content: "";
  width: 34px;
  height: 1px;
  background: #d5ad58;
}

.article-related-head h2 {
  margin: 0;
  color: #063522;
  font-size: 34px;
  font-weight: 900;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-related-grid article {
  overflow: hidden;
  transition: 0.25s ease;
}

.article-related-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(4, 53, 35, 0.12);
}

.related-article-image {
  position: relative;
  height: 250px;
  background: #fffdf8;
  display: grid;
  place-items: center;
  padding: 18px;
}

.related-article-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.related-article-image span {
  position: absolute;
  right: 16px;
  top: 16px;
  height: 32px;
  border-radius: 999px;
  background: #d5ad58;
  color: #021d13;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
}

.article-related-grid article > div {
  border-top: 1px solid #eee4cf;
  padding: 22px;
}

.article-related-grid h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.65;
}

.article-related-grid h3 a {
  color: #063522;
}

.article-related-grid p {
  margin: 0 0 14px;
  color: #626a63;
  font-size: 14px;
  line-height: 2;
}

.article-related-grid article > div > a {
  color: #07452e;
  font-size: 13px;
  font-weight: 900;
}

.blog-detail-bottom-cta {
  background: #fffdf8;
  padding: 0;
}

/* =========================================================
   Responsive
   ========================================================= */

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

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

  .article-check-grid,
  .article-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-featured-image img {
    height: 390px;
  }
}

@media (max-width: 767px) {
  .blog-detail-hero-section,
  .blog-detail-hero-content {
    min-height: 520px;
  }

  .blog-detail-hero-content {
    text-align: center;
    padding: 44px 0;
  }

  .blog-detail-breadcrumb {
    justify-content: center;
    flex-wrap: wrap;
  }

  .blog-detail-label,
  .blog-detail-section-label {
    justify-content: center;
  }

  .blog-detail-label::after,
  .blog-detail-section-label::after {
    content: "";
    width: 34px;
    height: 1px;
    background: #d5ad58;
  }

  .blog-detail-hero-content h1 {
    font-size: 30px;
  }

  .blog-detail-hero-content p {
    font-size: 14px;
  }

  .blog-detail-meta {
    justify-content: center;
  }

  .blog-detail-main-section {
    padding: 38px 0 48px;
  }

  .article-featured-image img {
    height: 310px;
    padding: 18px;
  }

  .article-body,
  .article-comments-card {
    padding: 20px;
  }

  .article-body {
    font-size: 15px;
  }

  .article-body h2 {
    font-size: 1.45em;
  }

  .article-highlight-box,
  .article-author-card,
  .article-cta-box {
    flex-direction: column;
    text-align: center;
  }

  .article-highlight-box > i {
    margin: 0 auto;
  }

  .article-image-row,
  .article-check-grid,
  .comment-form-row,
  .article-related-grid {
    grid-template-columns: 1fr;
  }

  .article-image-row img {
    height: 220px;
  }

  .article-cta-box a,
  .article-comment-form button {
    width: 100%;
    justify-content: center;
  }

  .article-comments-head {
    flex-direction: column;
  }

  .article-comment-list article {
    flex-direction: column;
  }

  .comment-head {
    flex-direction: column;
  }

  .article-related-head h2 {
    font-size: 26px;
  }
}

/* =========================================================
   Print
   ========================================================= */

@media print {
  .site-header,
  .mobile-menu-canvas,
  .reading-progress,
  .blog-detail-sidebar,
  .article-comments-card,
  .article-related-section,
  .blog-detail-bottom-cta,
  .footer-section,
  .back-to-top {
    display: none !important;
  }

  .blog-detail-hero-section {
    min-height: auto;
    background: #ffffff !important;
  }

  .blog-detail-hero-bg,
  .blog-detail-hero-overlay {
    display: none !important;
  }

  .blog-detail-hero-content {
    min-height: auto;
    color: #000000;
    padding: 20px 0;
  }

  .blog-detail-hero-content h1,
  .blog-detail-hero-content p,
  .blog-detail-breadcrumb,
  .blog-detail-breadcrumb a,
  .blog-detail-breadcrumb strong {
    color: #000000 !important;
  }

  .blog-detail-layout {
    display: block;
  }

  .blog-detail-main-section {
    padding: 0;
    background: #ffffff;
  }

  .article-body,
  .article-featured-image,
  .article-tags-card,
  .article-author-card {
    box-shadow: none;
    break-inside: avoid;
  }
}