/* =================================================================
   ĐỒ THỜ GIÁC BÀI — NEWS.CSS
   Dùng riêng cho news.html (danh sách) và news-detail.html (chi tiết)
   Yêu cầu: include chung với main.css (biến CSS, reset, header, footer...)
   ================================================================= */

/* ----------------------------------------------------------------
   Breadcrumb (.page-toolbar) — định nghĩa chung đặt tại main.css
   để dùng được cho mọi trang con (news, contact, products...)
   ---------------------------------------------------------------- */

/* ----------------------------------------------------------------
   NEWS LAYOUT — sidebar (trái) + nội dung (phải)
   ---------------------------------------------------------------- */
.news-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding-bottom: 60px;
}
.news-main { flex: 1; min-width: 0; }
.news-sidebar { width: 270px; flex-shrink: 0; }

/* ----------------------------------------------------------------
   NEWS GRID (trang danh sách) — card lớn hơn bản trang chủ, có excerpt
   ---------------------------------------------------------------- */
.news-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}
.news-list-card {
    display: flex;
    gap: 18px;
    background: var(--c-white);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.news-list-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.news-list-card__thumb { width: 180px; flex-shrink: 0; aspect-ratio: 4/3; overflow: hidden; display: block; }
.news-list-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-mid) var(--ease); }
.news-list-card:hover .news-list-card__thumb img { transform: scale(1.08); }
.news-list-card__body { padding: 16px 18px 16px 0; display: flex; flex-direction: column; min-width: 0; }
.news-list-card__date { font-size: 12px; color: var(--c-gold); font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.news-list-card__title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.news-list-card__title a { color: var(--c-ink); }
.news-list-card:hover .news-list-card__title a { color: var(--c-red); }
.news-list-card__excerpt {
    font-size: 13.3px; color: var(--c-muted); line-height: 1.6; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-list-card__more { font-size: 12.5px; font-weight: 700; color: var(--c-red); display: inline-flex; align-items: center; gap: 6px; margin-top: auto; }
.news-list-card__more i { font-size: 10.5px; transition: transform var(--t-fast); }
.news-list-card:hover .news-list-card__more i { transform: translateX(4px); }

/* ----------------------------------------------------------------
   SIDEBAR WIDGETS (dùng chung style với shop-widget của product.css,
   khai báo lại tên riêng để news.html không phụ thuộc product.css)
   ---------------------------------------------------------------- */
.news-widget { margin-bottom: 28px; }
.news-widget__title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--c-ink);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--c-gold-pale);
}
.news-cat-list > li { border-bottom: 1px solid var(--c-line); }
.news-cat-list > li:last-child { border-bottom: 0; }
.news-cat-list > li > a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 2px; font-size: 14px; color: var(--c-body);
}
.news-cat-list > li > a:hover { color: var(--c-red); }
.news-cat-list > li.is-active > a { color: var(--c-red); font-weight: 700; }
.news-cat-list > li > a .count { font-size: 12px; color: var(--c-muted); }

.news-mini-list > li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.news-mini-list > li:last-child { border-bottom: 0; }
.news-mini-list__thumb { width: 70px; height: 70px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--c-cream); }
.news-mini-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-mini-list__body { min-width: 0; }
.news-mini-list__date { font-size: 11.5px; color: var(--c-gold); font-weight: 700; margin-bottom: 4px; display: block; }
.news-mini-list__title {
    display: block; font-size: 13px; line-height: 1.4; color: var(--c-ink); font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-mini-list__title:hover { color: var(--c-red); }

.news-widget__banner { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.news-widget__banner img { width: 100%; height: auto; transition: transform var(--t-mid) var(--ease); }
.news-widget__banner:hover img { transform: scale(1.04); }

/* Pagination (giống shop-pagination, tên riêng cho news) */
.news-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.news-pagination a, .news-pagination span {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 13.5px; font-weight: 600; color: var(--c-body); border: 1px solid var(--c-line);
}
.news-pagination a:hover { border-color: var(--c-red); color: var(--c-red); }
.news-pagination .is-active { background: var(--c-red); color: var(--c-white); border-color: var(--c-red); }


/* ===================================================================
   NEWS DETAIL PAGE
   =================================================================== */
.article {
    max-width: 800px;
}
.article__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--c-muted);
    margin-bottom: 18px;
}
.article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.article__meta i { color: var(--c-gold); }
.article__title { font-size: 30px; font-weight: 800; line-height: 1.3; margin-bottom: 18px; }
.article__cover { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 30px; aspect-ratio: 16/9; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }

.article__body h2 { font-size: 22px; font-weight: 800; margin: 34px 0 16px; }
.article__body h3 { font-size: 18px; font-weight: 800; margin: 28px 0 14px; color: var(--c-maroon); }
.article__body p { color: var(--c-body); line-height: 1.9; margin-bottom: 18px; font-size: 15.5px; }
.article__body img { width: 100%; border-radius: var(--radius-sm); margin: 26px 0; }
.article__body ul { margin: 18px 0; padding-left: 4px; }
.article__body ul li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--c-body); line-height: 1.75; font-size: 15px; }
.article__body ul li::before { content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-gold); }
.article__body ul li strong { color: var(--c-ink); }
.article__body blockquote {
    margin: 26px 0;
    padding: 20px 26px;
    background: var(--c-cream);
    border-left: 4px solid var(--c-red);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--c-maroon);
    font-size: 15.5px;
}

.article__tags {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    margin: 34px 0 8px; padding-top: 24px; border-top: 1px solid var(--c-line);
}
.article__tags span { font-size: 13px; color: var(--c-muted); font-weight: 700; margin-right: 4px; }
.article__tags a {
    font-size: 12.5px; padding: 6px 14px; border-radius: 20px;
    background: var(--c-cream); color: var(--c-body); border: 1px solid var(--c-line);
}
.article__tags a:hover { background: var(--c-red); color: var(--c-white); border-color: var(--c-red); }

.article__share { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; }
.article__share span { font-size: 13px; color: var(--c-muted); margin-right: 4px; }
.article__share a {
    width: 36px; height: 36px; border-radius: 50%; background: var(--c-cream-2); color: var(--c-ink);
    display: flex; align-items: center; justify-content: center; font-size: 13.5px;
}
.article__share a:hover { background: var(--c-red); color: var(--c-white); }

/* Tác giả box */
.article__author {
    display: flex; gap: 16px; align-items: center;
    margin-top: 32px; padding: 22px; background: var(--c-cream); border-radius: var(--radius-sm);
}
.article__author img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.article__author h4 { font-size: 15px; margin: 0 0 4px; }
.article__author p { font-size: 13px; color: var(--c-muted); margin: 0; }

/* Điều hướng bài trước/sau */
.article__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--c-line);
}
.article__nav-item {
    display: flex; flex-direction: column; gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.article__nav-item:hover { border-color: var(--c-red); background: var(--c-cream); }
.article__nav-item--next { text-align: right; align-items: flex-end; }
.article__nav-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--c-muted); font-weight: 700; }
.article__nav-title { font-size: 14px; color: var(--c-ink); font-weight: 600; line-height: 1.4; }

/* Layout 2 cột cho trang chi tiết: nội dung + sidebar */
.article-layout { display: flex; gap: 30px; align-items: flex-start; padding-bottom: 50px; }
.article-layout .article { flex: 1; min-width: 0; }
.article-layout .news-sidebar { width: 270px; flex-shrink: 0; }

/* Bài viết liên quan (cuối trang detail) */
.related-news { margin-top: 10px; padding-top: 6px; }
.related-news .section-head { text-align: left; margin-bottom: 24px; }
.related-news .section-head h2 { font-size: 22px; }
.related-news .section-head__divider { margin-left: 0; }

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 991px) {
    .news-layout, .article-layout { flex-direction: column; }
    .news-sidebar { width: 100%; order: 2; }
    .news-main, .article-layout .article { order: 1; }
}
@media (max-width: 650px) {
    .news-list-card { flex-direction: column; }
    .news-list-card__thumb { width: 100%; }
    .news-list-card__body { padding: 14px; }
    .news-list-grid { grid-template-columns: 1fr; }
    .article__title { font-size: 23px; }
    .article__nav { grid-template-columns: 1fr; }
    .article__nav-item--next { text-align: left; align-items: flex-start; }
}
