/* ==========================================================================
   Page: News Article — Từ tay trắng thành chủ trang trại 3.000 gà đẻ
   Values trích từ src/Wihub-v1.1/src/newsarticle.html (frame Desktop ≥1280)
   ========================================================================== */

/* --- ARTICLE HEADER ------------------------------------------------------- */
.article-header {
  padding-top: calc(var(--navbar-height) + var(--space-12));
  padding-bottom: var(--space-10);
  background-color: var(--color-white);
}

/* Breadcrumb */
.article-breadcrumb {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-10);
}
.article-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color .2s ease;
  &:hover { color: var(--color-brand-default); }
}
.article-breadcrumb__icon { flex-shrink: 0; }

/* Header info: category + title + date */
/* Header căn GIỮA (badge + title + date) — v1.1 desktop */
.article-header__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  max-width: 800px;
  margin: 0 auto;
}

/* Category badge — id #News_Category / #Category_Name (v1.1) */
.article-category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px;
  background-color: #e5e5f5;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  color: #14146b;
}
.article-category__icon { display: inline-flex; }

/* Title — id #Article_title (v1.1): 40px / 700 / 120% */
.article-header__title {
  margin: 0;
  font-family: var(--font-family);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-main);
}

.article-header__date {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-tertiary);
}

@media (min-width: 992px) {
  .article-header__title { font-size: 40px; }
}

/* --- ARTICLE CONTENT ------------------------------------------------------ */
.article-content {
  padding-top: var(--space-10);
  padding-bottom: var(--space-20);
  background-color: var(--color-white);
}

/* Hero image — phủ ĐỦ chiều rộng container (canh đều với hàng author+body dưới) */
.article-hero {
  margin: 0 0 var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.article-hero__image {
  width: 100%;
  aspect-ratio: 1.95;         /* v1.1 #Article_image */
  height: auto;
  border-radius: 16px;
  display: block;
  object-fit: cover;
}
.article-hero__caption {
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-tertiary);
  margin: 0;
}

/* --- BODY: PROSE -----------------------------------------------------------
   Đăng bài chi tiết chỉ cần HTML THUẦN trong .article-prose (h2 / p / figure)
   → tự động style đúng v1.1, KHÔNG cần class cho từng phần tử.
   Giá trị: subheading #Subtitle 26/700/1.5; paragraph #Paragraph 18/400/1.6;
   màu Text-Main; gap 24 (v1.1 #Content_block row-gap). */
.article-prose > * { margin: 0; }
.article-prose > * + * { margin-top: var(--space-6); }   /* 24px giữa các phần tử */
.article-prose > h2 { margin-top: var(--space-12); }      /* 48px — ngăn cách section */
.article-prose > h2:first-child { margin-top: 0; }

.article-prose h2 {
  font-family: var(--font-family);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text-main);
}
.article-prose p {
  font-family: var(--font-family);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-main);
}
.article-prose figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.article-prose figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  object-fit: cover;
}
.article-prose figcaption {
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-tertiary);
}
@media (min-width: 992px) {
  .article-prose h2 { font-size: 26px; }
  .article-prose p { font-size: 18px; }
}

/* --- AUTHOR SIDEBAR ------------------------------------------------------- */
/* Author + share: card trắng cột TRÁI (v1.1 #Author_image_and_info: border #e5edf5, radius 16, drop-shadow) */
.article-author__card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-btn);
  padding: var(--space-5);          /* v1.1 padding 20 */
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* Hàng tác giả: avatar + thông tin (v1.1 #Author_details_container row, gap 16) */
.article-author__person {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.article-author__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
/* Desktop: author DÍNH (sticky) khi cuộn — đặt trên .article-author (con của col cao = full bài),
   KHÔNG đặt trên __card (aside chỉ cao bằng card → không có khoảng để dính) */
@media (min-width: 992px) {
  .article-author {
    position: sticky;
    top: calc(var(--navbar-height) + var(--space-4));
  }
}
.article-author__info { display: flex; flex-direction: column; gap: var(--space-2); }

/* Author name — id #Author_name (v1.1): 18px / 600 / 140% */
.article-author__name {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-main);
}
/* Author title — id #Author_title: 14px / 400 / 150% */
.article-author__title {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-tertiary);
}
/* Bio — id #Author_bio: 16px / 400 / 150% */
.article-author__bio {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.article-author__divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* Share — v1.1 #Social_share_section: CĂN GIỮA, title 16/600 tertiary, icon 24px logo (không nền tròn) */
.article-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.article-share__title {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);   /* 16 (v1.1 #Social_share_title) */
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text-tertiary);
  text-align: center;
}
.article-share__icons { display: inline-flex; align-items: center; gap: var(--space-3); }
/* Nút share: vòng tròn xám 48px (v1.1 #social_icon: Section-Background-icon, radius 24), icon 24px */
.article-share__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-bg-icon);   /* #f3f3f3 */
  color: var(--color-brand-dark);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
  text-decoration: none;
  &:hover {
    background-color: var(--color-brand-default);
    color: var(--color-white);
    transform: translateY(-2px);
  }
}
.article-share__link svg { width: 24px; height: 24px; }

/* --- RELEVANT NEWS -------------------------------------------------------- */
.relevant-news {
  padding-top: var(--space-16);
  padding-bottom: var(--space-20);
  background-color: var(--color-bg-blue);
}
.relevant-news__header { margin-bottom: var(--space-10); }
.relevant-news__title {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-brand-dark);
  background: linear-gradient(90deg, #141240 0%, #0d50a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (min-width: 992px) {
  .relevant-news__title { font-size: var(--font-size-4xl); }
}

/* News card CSS → main.css (shared, 1 nguồn cho index/news/news-article) */

/* Contact section CSS → main.css (shared, 1 nguồn) */
