/* ═══════════════════════════════════════════════════════════
   MinhTamCoconut — news.css
   Trang danh sách & chi tiết tin tức
═══════════════════════════════════════════════════════════ */

/* ── FILTER BAR ─────────────────────────────────────────── */
.news-filter-bar {
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 0 8%;
    position: sticky; top: 70px; z-index: 50;
    box-shadow: 0 2px 12px rgba(58,170,86,0.06);
}

.news-filter-tabs {
    display: flex; gap: 0;
    overflow-x: auto; scrollbar-width: none;
}

.news-filter-tabs::-webkit-scrollbar { display: none; }

.nft {
    display: flex; align-items: center; gap: 7px;
    padding: 16px 22px;
    border-bottom: 2px solid transparent;
    color: var(--muted); font-size: 0.84rem; font-weight: 500;
    text-decoration: none; white-space: nowrap;
    transition: all 0.25s;
}

.nft:hover  { color: var(--g5); }
.nft.active { color: var(--g5); border-bottom-color: var(--g5); font-weight: 600; }

/* ── NEWS PAGE LAYOUT ───────────────────────────────────── */
.news-page { padding: 48px 8% 80px; background: white; }

/* ── FEATURED POST ──────────────────────────────────────── */
.news-featured {
    display: grid; grid-template-columns: 1.1fr 1fr;
    gap: 0; border-radius: 28px; overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 56px;
    transition: box-shadow 0.3s;
}

.news-featured:hover {
    box-shadow: 0 20px 60px rgba(58,170,86,0.13);
}

.nf-img {
    min-height: 380px;
    background: linear-gradient(150deg, var(--g1), var(--g2));
    display: flex; align-items: center; justify-content: center;
    font-size: 8rem; position: relative; overflow: hidden;
}

.nf-img img {
    width: 100%; height: 100%;
    object-fit: cover; position: absolute; inset: 0;
}

.nf-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(255,255,255,0.05));
}

.nf-body {
    padding: 48px 44px;
    display: flex; flex-direction: column; justify-content: center;
    background: white;
}

.nf-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 20px;
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
    margin-bottom: 18px; width: fit-content;
}

.nf-eyebrow {
    font-size: 0.68rem; letter-spacing: 3px;
    text-transform: uppercase; color: var(--g5);
    font-weight: 700; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}

.nf-eyebrow::before {
    content: ''; width: 18px; height: 2px; background: var(--g4);
}

.nf-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 400; line-height: 1.25;
    color: var(--ink); margin-bottom: 16px;
}

.nf-excerpt {
    font-size: 0.9rem; color: var(--ink-soft);
    line-height: 1.8; margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-meta {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px;
}

.nf-author {
    display: flex; align-items: center; gap: 7px;
}

.nf-author-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--g4), var(--g6));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: white; font-weight: 700;
    flex-shrink: 0;
}

.nf-author-name { font-size: 0.78rem; font-weight: 600; color: var(--ink-mid); }
.nf-sep  { width: 3px; height: 3px; border-radius: 50%; background: var(--g3); }
.nf-date { font-size: 0.75rem; color: var(--muted); }

.nf-read {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px; border-radius: 50px;
    background: linear-gradient(135deg, var(--g5), var(--g6));
    color: white; text-decoration: none;
    font-weight: 600; font-size: 0.88rem;
    box-shadow: 0 4px 16px var(--shadow-g);
    transition: all 0.3s; width: fit-content;
}

.nf-read:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-g);
    color: white;
}

/* ── SECTION DIVIDER ────────────────────────────────────── */
.news-section-hd {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 28px;
}

.news-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem; font-weight: 400; color: var(--ink);
}

.news-section-title em { font-style: italic; color: var(--g5); }

/* ── NEWS GRID ──────────────────────────────────────────── */
.news-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── NEWS CARD ──────────────────────────────────────────── */
.news-card-v {
    background: white; border: 1px solid var(--line);
    border-radius: 22px; overflow: hidden;
    transition: all 0.35s ease;
    display: flex; flex-direction: column;
}

.news-card-v:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(58,170,86,0.12);
    border-color: var(--g2);
}

.ncv-img {
    height: 200px; position: relative;
    overflow: hidden; background: var(--g1);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}

.ncv-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card-v:hover .ncv-img img { transform: scale(1.04); }

.ncv-img::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(242,250,244,0.5));
    pointer-events: none;
}

.ncv-cat {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 4px 10px; border-radius: 20px;
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
}

.ncv-body {
    padding: 22px 22px 24px;
    display: flex; flex-direction: column; flex: 1;
}

.ncv-meta {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
}

.ncv-date   { font-size: 0.72rem; color: var(--muted); }
.ncv-dot    { width: 3px; height: 3px; border-radius: 50%; background: var(--g3); }
.ncv-author { font-size: 0.72rem; color: var(--g5); font-weight: 600; }

.ncv-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem; font-weight: 600; color: var(--ink);
    line-height: 1.35; margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ncv-excerpt {
    font-size: 0.81rem; color: var(--ink-soft);
    line-height: 1.7; margin-bottom: 16px; flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ncv-read {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.78rem; color: var(--g5); font-weight: 700;
    text-decoration: none; transition: gap 0.25s;
    margin-top: auto;
}

.ncv-read:hover { gap: 10px; }

/* ── EMPTY STATE ────────────────────────────────────────── */
.news-empty {
    text-align: center; padding: 60px 20px; grid-column: 1 / -1;
}

.news-empty-icon  { font-size: 3.5rem; display: block; margin-bottom: 14px; }
.news-empty-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--ink); margin-bottom: 8px; }
.news-empty-desc  { font-size: 0.86rem; color: var(--muted); }

/* ── PAGINATION (tái dùng từ product.css) ───────────────── */
/* (đã có trong product.css, không cần viết lại) */

/* ══════════════════════════════════════════════════════════
   NEWS DETAIL PAGE
══════════════════════════════════════════════════════════ */
.detail-page {
    padding: 48px 8% 80px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
    background: white;
}

/* ── Article ────────────────────────────────────────────── */
.article {}

.article-header { margin-bottom: 32px; }

.article-cats {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}

.article-cat {
    padding: 5px 14px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
}

.article-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300; line-height: 1.15;
    color: var(--ink); margin-bottom: 18px;
}

.article-meta {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap; padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.article-author {
    display: flex; align-items: center; gap: 8px;
}

.article-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--g4), var(--g6));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: white; font-weight: 700;
}

.article-author-name { font-size: 0.82rem; font-weight: 600; color: var(--ink-mid); }
.article-date        { font-size: 0.78rem; color: var(--muted); }
.article-read-time   { font-size: 0.78rem; color: var(--muted); }
.article-meta-sep    { width: 4px; height: 4px; border-radius: 50%; background: var(--g3); }

/* Hero image bài viết */
.article-hero-img {
    width: 100%; aspect-ratio: 16/7;
    border-radius: 20px; overflow: hidden;
    margin-bottom: 32px;
    background: linear-gradient(150deg, var(--g1), var(--g2));
    display: flex; align-items: center; justify-content: center;
    font-size: 8rem;
}

.article-hero-img img {
    width: 100%; height: 100%; object-fit: cover;
}

/* Nội dung bài viết */
.article-body {
    font-size: 1rem; color: var(--ink-soft);
    line-height: 1.9; max-width: 720px;
}

.article-body h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.7rem; font-weight: 600;
    color: var(--ink); margin: 36px 0 14px;
}

.article-body h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem; font-weight: 600;
    color: var(--ink); margin: 28px 0 10px;
}

.article-body p { margin-bottom: 18px; }

.article-body strong { color: var(--ink-mid); font-weight: 700; }

.article-body ul, .article-body ol {
    margin: 0 0 18px 24px;
}

.article-body li { margin-bottom: 8px; }

.article-body blockquote {
    border-left: 3px solid var(--g4);
    padding: 14px 20px; margin: 24px 0;
    background: var(--g0); border-radius: 0 12px 12px 0;
    font-style: italic; color: var(--ink-mid);
}

.article-body img {
    width: 100%; border-radius: 16px; margin: 16px 0;
}

.article-body a { color: var(--g5); }
.article-body a:hover { text-decoration: underline; }

/* Share buttons */
.article-share {
    display: flex; align-items: center; gap: 12px;
    margin-top: 40px; padding-top: 28px;
    border-top: 1px solid var(--line); flex-wrap: wrap;
}

.share-label {
    font-size: 0.8rem; font-weight: 700; color: var(--ink-mid);
}

.share-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 20px; border: none;
    font-size: 0.78rem; font-weight: 600;
    font-family: 'DM Sans', sans-serif; cursor: pointer;
    transition: all 0.25s; text-decoration: none;
}

.share-fb { background: #e8f0fe; color: #1a73e8; }
.share-fb:hover { background: #1a73e8; color: white; }
.share-zl { background: var(--g1); color: var(--g6); }
.share-zl:hover { background: var(--g5); color: white; }
.share-cp { background: var(--g0); color: var(--ink-soft); border: 1px solid var(--line); }
.share-cp:hover { background: var(--ink); color: white; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.news-sidebar { position: sticky; top: 90px; }

.sidebar-block {
    background: var(--g0); border: 1px solid var(--line);
    border-radius: 20px; padding: 24px 22px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem; font-weight: 600; color: var(--ink);
    margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

/* Recent posts list */
.recent-list { display: flex; flex-direction: column; gap: 14px; }

.recent-item {
    display: flex; gap: 12px; text-decoration: none;
    align-items: flex-start; transition: opacity 0.2s;
}

.recent-item:hover { opacity: 0.75; }

.recent-thumb {
    width: 60px; height: 60px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(150deg, var(--g1), var(--g2));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; overflow: hidden;
}

.recent-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}

.recent-title {
    font-size: 0.82rem; font-weight: 600; color: var(--ink);
    line-height: 1.35; margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-date { font-size: 0.7rem; color: var(--muted); }

/* Category list in sidebar */
.cat-list { display: flex; flex-direction: column; gap: 8px; }

.cat-item {
    display: flex; justify-content: space-between;
    align-items: center; text-decoration: none;
    padding: 10px 14px; border-radius: 12px;
    background: white; border: 1px solid var(--line);
    transition: all 0.25s;
}

.cat-item:hover {
    border-color: var(--g3); background: var(--g1);
}

.cat-item-name { font-size: 0.84rem; font-weight: 500; color: var(--ink-soft); }
.cat-item-count {
    font-size: 0.68rem; font-weight: 700; color: var(--g6);
    background: var(--g1); padding: 2px 8px; border-radius: 10px;
}

.cat-item:hover .cat-item-count { background: var(--g5); color: white; }

/* ── RELATED POSTS ──────────────────────────────────────── */
.related-news-sec {
    padding: 56px 8%;
    background: var(--ivory);
    border-top: 1px solid var(--line);
}

.related-news-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    margin-top: 32px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
    .news-grid-3      { grid-template-columns: 1fr 1fr; }
    .related-news-grid{ grid-template-columns: 1fr 1fr; }
    .news-featured    { grid-template-columns: 1fr; }
    .nf-img           { min-height: 240px; }
}

@media (max-width: 900px) {
    .detail-page { grid-template-columns: 1fr; }
    .news-sidebar{ position: static; }
}

@media (max-width: 768px) {
    .news-page        { padding: 36px 5% 60px; }
    .news-filter-bar  { padding: 0 5%; }
    .news-grid-3      { grid-template-columns: 1fr; }
    .detail-page      { padding: 36px 5% 60px; }
    .related-news-sec { padding: 48px 5%; }
    .related-news-grid{ grid-template-columns: 1fr; }
    .nf-body          { padding: 28px 24px; }
}


/* V7 — mobile news filter tabs visibility */
@media (max-width: 768px) {
    .news-filter-bar {
        top: 64px;
        padding: 0 4%;
    }
    .news-filter-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
        padding-bottom: 6px;
    }
    .news-filter-tabs::-webkit-scrollbar {
        display: block;
        height: 4px;
    }
    .nft {
        flex: 0 0 auto;
        white-space: nowrap;
        scroll-snap-align: start;
        padding: 14px 16px;
    }
}
