/* ====================================================
   ARTICLE PAGE SETUP
   ==================================================== */
.article-page {
  /* Ép padding trái phải bằng 4vw để gióng thẳng tắp với Logo Header */
  padding: 60px max(24px, 4vw) 80px max(24px, 4vw);
  background-color: var(--bg-primary);
}

/* ====================================================
   3-COLUMN LAYOUT (TOC - CONTENT - SHARE)
   ==================================================== */
.article-layout {
  display: flex;
  grid-template-columns: 160px minmax(0, 1320px) 140px;
  justify-content: space-between; /* Đẩy văng Mục lục và Chia sẻ ra 2 sát 2 mép */
  align-items: flex-start;
  width: 100%;
}

.article-sidebar--left {
  width: 180px;
  flex-shrink: 0;
}

.article-sidebar--right {
  width: 160px;
  flex-shrink: 0;
}

.article-content {
  flex: 1;
  max-width: 1320px; /* Ép bài viết nằm chính giữa, độ rộng chuẩn để đọc báo */
  margin: 0 40px;
}

.sticky-block {
  position: sticky;
  top: 100px; /* Ghim Sidebar khi cuộn trang */
}

/* ====================================================
   SIDEBARS (MỤC LỤC & CHIA SẺ)
   ==================================================== */
.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 12px;
  border-bottom: 1px solid #111;
  margin-bottom: 20px;
}

/* Gỡ dấu chấm tròn của list */
.toc-list, .share-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  transition: opacity 0.2s;
}

.toc-list a:hover { opacity: 0.7; }

.toc-num {
  font-family: var(--font-condensed);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-orange);
  line-height: 1;
  margin-bottom: 8px;
}

.toc-text {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  color: #333;
}

.share-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.share-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  color: #333;
}

.share-list a:hover { color: var(--accent-orange); }

.share-list .icon {
  width: 24px;
  height: 24px;
  background-color: #111;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
}

/* ====================================================
   ARTICLE HEADER (NẰM TRONG CỘT GIỮA)
   ==================================================== */
.article-header {
  margin-bottom: 50px;
  width: 100%;
}

.article-cat {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 20px;
}

.article-title {
  font-family: var(--font-condensed);
  font-size: clamp(48px, 6vw, 92px); /* Ép size chữ khổng lồ */
  font-weight: 700;
  line-height: 1.15; /* Khoảng cách các dòng cực khít */
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #111;
  margin-bottom: 30px;
}

.article-meta {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.article-meta .sep {
  margin: 0 16px;
  opacity: 0.3;
}

.article-meta .author { color: #111; }

.article-lead {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
  color: #222;
}

/* ====================================================
   ARTICLE CONTENT (NỘI DUNG CHÍNH)
   ==================================================== */
.article-featured-img {
  margin-bottom: 50px;
}

.article-featured-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-body {
  max-width: 1320px; /* Ép lề văn bản thon lại để dễ đọc */
}

/* Dropcap chữ cái đầu to */
.article-body .has-dropcap::first-letter {
  float: left;
  font-family: var(--font-condensed);
  font-size: 110px;
  line-height: 0.75;
  padding-right: 16px;
  padding-top: 8px;
  color: #111;
  font-weight: 700;
}

.article-body p {
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  margin-bottom: 24px;
}

.article-body h2 {
  font-family: var(--font-condensed);
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  color: #111;
  margin: 50px 0 20px 0;
  line-height: 1.2;
}

.article-quote {
  background-color: #111;
  color: #fff;
  padding: 40px 50px;
  margin: 40px 0;
  position: relative;
}

.quote-icon {
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: var(--font-hand);
  font-size: 80px;
  line-height: 1;
  color: rgba(255,255,255,0.15);
}

.article-quote p {
  font-size: 22px;
  line-height: 1.5;
  color: #fff;
  margin: 0;
  position: relative;
  z-index: 2;
  font-weight: 500;
}

.article-quote .highlight { color: var(--accent-orange); }

.article-figure { margin: 40px 0; }
.article-figure img { width: 100%; height: auto; }
.article-figure figcaption {
  margin-top: 12px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  display: flex;
  justify-content: space-between;
}
.article-figure .credit { color: #999; }
.end-mark { font-size: 10px; color: #111; margin-left: 4px; }

/* ====================================================
   AUTHOR BOX
   ==================================================== */
.article-author {
  max-width: 1320px;
  margin: 80px auto 0 auto; /* Đẩy khối tác giả vào chính giữa trục trang */
  background-color: #EBE8E1;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.author-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #dcd9d2;
  flex-shrink: 0;
}

.author-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.author-info { flex: 1; }
.author-name { font-size: 16px; font-weight: 700; color: #111; margin-bottom: 4px; }
.author-role { font-size: 12px; color: #555; margin-bottom: 12px; }
.author-bio { font-size: 13px; line-height: 1.6; color: #333; margin-bottom: 16px; }

.author-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 700;
}
.author-links .sep { opacity: 0.3; }

/* ====================================================
   RELATED POSTS
   ==================================================== */
.related-posts {
  max-width: 1320px;
  margin: 80px auto 0 auto; /* Đẩy vào chính giữa trục trang */
}

.section-heading {
  text-align: center;
  position: relative;
  margin-bottom: 40px;
}

.section-heading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--border-light);
  z-index: 1;
}

.section-heading span {
  font-size: 13px;
  font-weight: 700;
  background-color: var(--bg-primary);
  padding: 0 20px;
  position: relative;
  z-index: 2;
  color: #111;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Style cho các card bài viết liên quan (Row Layout) */
.related-posts .post-card--row {
  display: flex;
  gap: 20px;
}

.related-posts .post-media {
  width: 45%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.related-posts .post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-posts .post-content {
  width: 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.related-posts .post-meta {
  font-size: 11px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.related-posts .post-title {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-condensed);
  margin-bottom: 8px;
  line-height: 1.3;
  text-transform: uppercase;
}

.related-posts .post-exc {
  font-size: 13px;
  color: #444;
  margin-bottom: 12px;
  line-height: 1.5;
}

.related-posts .read-more {
  font-size: 11px;
  font-weight: 700;
  color: #111;
}

.related-posts .read-more:hover {
  color: var(--accent-orange);
}

/* MẶC ĐỊNH TRÊN PC: ẨN TUYỆT ĐỐI THANH NÀY ĐI */
.mobile-share-bar {
  display: none;
}

/* ====================================================
   TỐI ƯU RESPONSIVE CHO MOBILE & TABLET
   ==================================================== */
@media (max-width: 1024px) {
  .article-page {
    padding: 30px 20px 50px 20px; /* Thu nhỏ lề trên mobile để tiết kiệm diện tích */
  }

  /* Chuyển Grid 3 cột thành 1 cột dọc thẳng hàng */
  .article-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  /* Ẩn bớt Mục lục và Nút chia sẻ rườm rà trên mobile (hoặc bạn có thể cho nó hiện dạng ẩn/hiện tùy ý) */
  .article-sidebar--left, 
  .article-sidebar--right {
    display: none; 
  }

  /* Ép toàn bộ khung chứa nội dung rộng 100% màn hình điện thoại */
  .article-content, 
  .article-header, 
  .article-author, 
  .related-posts {
    max-width: 100% !important;
    margin: 0 !important;
    width: 100%;
  }

  .article-header {
    margin-bottom: 30px !important;
  }

  /* Thu nhỏ cỡ chữ tiêu đề khủng trên mobile để không bị tràn viền */
  .article-title {
    font-size: 38px !important;
    line-height: 1.1;
  }

  .article-lead {
    font-size: 15px;
  }

  /* Box tác giả trên mobile chuyển về dạng xếp dọc cho gọn */
  .article-author {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
    gap: 20px;
  }

  .author-img {
    margin: 0 auto;
  }

  .author-links {
    justify-content: center;
  }

  /* Lưới bài viết liên quan chuyển thành 1 cột */
  .related-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .related-posts .post-card--row {
    flex-direction: column; /* Đưa ảnh lên trên, chữ xuống dưới */
  }

  .related-posts .post-media, 
  .related-posts .post-content {
    width: 100% !important;
  }
  
  .related-posts .post-media {
    height: 200px;
  }
  /* Mặc định trên PC thì ẩn thanh chia sẻ ngang này đi */
  .mobile-share-bar {
    display: none;
  }
  /* Thanh chia sẻ hàng ngang cho Mobile */
.mobile-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #EBE8E1; /* Màu nền tệp với box tác giả bên dưới */
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border-light);
}

.mobile-share-bar .share-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #111;
}

.mobile-share-icons {
  display: flex;
  gap: 12px;
}

.mobile-share-icons a .icon {
  width: 32px;
  height: 32px;
  background-color: #111;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.mobile-share-icons a:hover .icon {
  background-color: var(--accent-orange);
}
}