/* ======================================================
   📰 news.css — สไตล์ระบบข่าว 7mLiveScore
   เข้าชุดกับธีมหลัก: พื้นเขียว #2E7D32 / การ์ดขาว / แดง #D32F2F / ทอง #FFD700
   โหมดมืดใช้คลาส body.dark-mode (พื้น #1B5E20 / การ์ด #2D0A0A)
   Desktop Only — กริด 4 คอลัมน์คงที่
   ====================================================== */

:root {
    --nz-red:      #D32F2F;
    --nz-red-dark: #B71C1C;
    --nz-gold:     #FFD700;
    --nz-card:     #ffffff;
    --nz-card-bd:  #FFCDD2;
    --nz-ink:      #1A1A1A;
    --nz-sub:      #666666;
}

/* ---------- ระยะหน้า ---------- */
.news-wrap { padding: 6px 0 30px; }

/* ---------- หัวข้อหน้า (อยู่บนพื้นเขียว -> ตัวอักษรขาว/ทอง) ---------- */
.news-pagehead,
.home-news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 20px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--nz-gold);
}
.news-pagehead h1,
.home-news-head h2 {
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0,0,0,.3);
}
.news-pagehead h1 { font-size: 28px; font-weight: 900; }
.home-news-head h2 { font-size: 22px; font-weight: 900; }

.news-badge,
.home-news-all {
    background: linear-gradient(135deg, var(--nz-red), var(--nz-red-dark));
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 25px;
    border: 2px solid var(--nz-gold);
    white-space: nowrap;
    text-decoration: none;
}
.home-news-all:hover { background: var(--nz-gold); color: var(--nz-red); }

/* ---------- กริดข่าว 4 คอลัมน์ (คงที่ — Desktop Only) ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ---------- การ์ดข่าว ---------- */
.news-card {
    background: var(--nz-card);
    border: 3px solid var(--nz-card-bd);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(211,47,47,.2);
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--nz-red);
    box-shadow: 0 10px 28px rgba(211,47,47,.35);
}
.news-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }

.news-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #D32F2F, #8B0000);
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.news-card:hover .news-thumb img { transform: scale(1.06); }
.news-thumb.placeholder {
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 44px;
}
.news-thumb .news-tag {
    position: absolute; top: 10px; left: 10px;
    background: var(--nz-gold); color: var(--nz-red);
    font-size: 11px; font-weight: 900; padding: 4px 10px;
    border-radius: 20px; letter-spacing: .3px;
}

.news-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.news-title {
    font-size: 16px; line-height: 1.5; font-weight: 800; color: var(--nz-ink); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover .news-title { color: var(--nz-red); }
.news-excerpt {
    font-size: 13px; color: var(--nz-sub); line-height: 1.6; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-meta {
    margin-top: auto; display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--nz-sub); padding-top: 8px; border-top: 1px dashed var(--nz-card-bd);
}
.news-meta .dot { color: var(--nz-red); }

/* ---------- ไม่มีข่าว ---------- */
.news-empty {
    text-align: center; padding: 50px 20px; color: var(--nz-ink);
    background: var(--nz-card); border: 3px dashed var(--nz-card-bd); border-radius: 16px;
}

/* ---------- เพจิเนชัน ---------- */
.news-pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.news-pager a, .news-pager span {
    min-width: 42px; text-align: center; padding: 10px 14px; border-radius: 25px;
    border: 2px solid var(--nz-card-bd); background: #fff; color: var(--nz-red);
    text-decoration: none; font-weight: 800; font-size: 14px;
}
.news-pager a:hover { background: var(--nz-gold); border-color: var(--nz-gold); color: var(--nz-red); }
.news-pager .current { background: linear-gradient(135deg, var(--nz-red), var(--nz-red-dark)); color: #fff; border-color: var(--nz-gold); }
.news-pager .disabled { opacity: .45; pointer-events: none; }

/* ======================================================
   หน้าอ่านข่าว (Single article)
   ====================================================== */
.article-wrap { max-width: 900px; margin: 0 auto; padding: 16px 0 40px; }

/* breadcrumb อยู่บนพื้นเขียว -> ตัวอักษรขาว/ทอง */
.article-breadcrumb { font-size: 14px; color: #ffffff; margin-bottom: 16px; opacity: .95; }
.article-breadcrumb a { color: var(--nz-gold); text-decoration: none; font-weight: 700; }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-breadcrumb span { color: #ffffff; }

.article-card {
    background: var(--nz-card);
    border: 3px solid var(--nz-card-bd);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(211,47,47,.2);
    overflow: hidden;
}
.article-hero {
    width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block;
    background: linear-gradient(135deg, #D32F2F, #8B0000);
}
.article-inner { padding: 34px 40px 40px; }
.article-inner h1 {
    font-size: 34px; line-height: 1.4; font-weight: 900; margin: 0 0 16px;
    background: linear-gradient(135deg, #D32F2F, #FF6B35);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.article-info {
    display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--nz-sub);
    padding-bottom: 18px; margin-bottom: 24px; border-bottom: 3px solid var(--nz-gold);
}
.article-info .pill {
    background: linear-gradient(135deg, var(--nz-red), var(--nz-red-dark));
    color: #fff; font-weight: 800; padding: 4px 14px; border-radius: 20px; font-size: 12px;
}

/* เนื้อหา — ให้ตรงกับ .content-h2 / .content-h3 เดิมของเว็บ */
.article-content p { font-size: 17px; line-height: 1.9; color: var(--nz-ink); margin: 0 0 20px; }
.article-content h2 {
    font-size: 26px; font-weight: 800; color: var(--nz-red); line-height: 1.4;
    margin: 36px 0 18px; padding-bottom: 14px; border-bottom: 3px solid var(--nz-gold);
}
.article-content h3 { font-size: 21px; font-weight: 700; color: var(--nz-red); margin: 26px 0 12px; }
.article-content a { color: var(--nz-red); font-weight: 700; text-decoration: underline; }
.article-content strong { color: var(--nz-red); font-weight: 900; }
.article-content ul, .article-content ol { margin: 0 0 20px 26px; }
.article-content li { font-size: 17px; line-height: 1.8; color: var(--nz-ink); margin-bottom: 8px; }
.article-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0; }

.article-back {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
    padding: 12px 24px; border-radius: 25px; text-decoration: none; font-weight: 800; font-size: 15px;
    background: linear-gradient(135deg, var(--nz-red), var(--nz-red-dark));
    color: #fff; border: 2px solid var(--nz-gold);
}
.article-back:hover { background: var(--nz-gold); color: var(--nz-red); }

/* ======================================================
   🌙 โหมดมืด — body.dark-mode (พื้น #1B5E20 / การ์ด #2D0A0A / ทอง)
   ====================================================== */
body.dark-mode {
    --nz-card:    #2D0A0A;
    --nz-card-bd: #5D1F1F;
    --nz-ink:     #EEEEEE;
    --nz-sub:     #BBBBBB;
}
body.dark-mode .news-title { color: #FFFFFF; }
body.dark-mode .news-card:hover .news-title { color: var(--nz-gold); }
body.dark-mode .news-thumb .news-tag { background: var(--nz-gold); color: var(--nz-red); }
body.dark-mode .article-inner h1 {
    background: linear-gradient(135deg, #FFD700, #FF6B35);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.dark-mode .article-content h2,
body.dark-mode .article-content h3 { color: var(--nz-gold); }
body.dark-mode .article-content a,
body.dark-mode .article-content strong { color: var(--nz-gold); }
body.dark-mode .news-pager a, body.dark-mode .news-pager span { background: #2D0A0A; color: var(--nz-gold); }
