/* ============================================================
   VISA24H NEWS — CSS riêng cho trang danh mục & tin tức
   Load sau visa24h-ui.css
============================================================ */

/* ===================== VARIABLES (đồng bộ trang chủ) ===================== */
:root {
    --navy:        #0E2040;
    --navy-2:      #1A3561;
    --gold:        #C09A4A;
    --gold-lt:     #E8D49A;
    --gold-pale:   #FAF5E8;
    --cream:       #FDFBF7;
    --white:       #FFFFFF;
    --muted:       #6B7280;
    --border:      rgba(14,32,64,.10);
    --border-gold: rgba(192,154,74,.25);
    --ff-serif:    'Be Vietnam Pro', sans-serif;
    --ff-sans:     'Inter', 'Be Vietnam Pro', sans-serif;
    --shadow-sm:   0 2px 12px rgba(14,32,64,.06);
    --shadow-md:   0 6px 30px rgba(14,32,64,.10);
    --radius:      10px;
    --radius-lg:   16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--ff-sans); background: var(--cream); color: var(--navy); }

/* ===================== PAGE HERO ===================== */
.nl-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    padding: 48px 24px 52px; position: relative; overflow: hidden;
}
.nl-hero::after {
    content: '';
    position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
    width: 400px; height: 400px; border-radius: 50%;
    background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 24px 24px;
}
.nl-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.nl-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    list-style: none; margin-bottom: 16px; padding: 0;
    font-size: 13px; color: rgba(255,255,255,.5);
}
.nl-breadcrumb li a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s; }
.nl-breadcrumb li a:hover { color: var(--gold-lt); }
.nl-breadcrumb li + li::before { content: '/'; margin-right: 8px; opacity: .4; }
.nl-hero h1 {
    font-family: var(--ff-serif); font-size: clamp(24px, 3vw, 36px);
    font-weight: 700; color: var(--white); line-height: 1.25; margin-bottom: 10px;
}
.nl-hero-meta { font-size: 14px; color: rgba(255,255,255,.55); }
.nl-hero-meta strong { color: var(--gold-lt); }

/* ===================== LAYOUT ===================== */
.nl-layout {
    max-width: 1200px; margin: 0 auto;
    padding: 44px 24px 60px;
    display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start;
}

/* ===================== MAIN CONTENT ===================== */
/* Featured first post */
.nl-featured {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    margin-bottom: 32px; text-decoration: none; color: inherit;
    transition: box-shadow .25s, transform .2s;
}
.nl-featured:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.nl-featured-thumb {
    aspect-ratio: 4/3; object-fit: cover; width: 100%; display: block;
    background: var(--gold-pale);
}
.nl-featured-thumb-fallback {
    aspect-ratio: 4/3; background: var(--gold-pale);
    display: flex; align-items: center; justify-content: center; font-size: 52px;
}
.nl-featured-body {
    padding: 32px 28px; display: flex; flex-direction: column; justify-content: center;
}
.nl-featured-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--gold);
    margin-bottom: 14px;
}
.nl-featured-badge::before { content: ''; width: 20px; height: 2px; background: var(--gold); border-radius: 1px; }
.nl-featured-title {
    font-family: var(--ff-serif); font-size: 22px; font-weight: 700;
    color: var(--navy); line-height: 1.35; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nl-featured-summary {
    font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 20px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nl-featured-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.nl-featured-readmore {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--gold); margin-top: 16px;
    transition: gap .2s;
}
.nl-featured:hover .nl-featured-readmore { gap: 10px; }

/* Grid list */
.nl-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}

.nl-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    text-decoration: none; color: inherit; display: block;
    transition: box-shadow .25s, transform .2s; position: relative;
}
.nl-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.nl-card:hover::before { transform: scaleX(1); }
.nl-card-thumb {
    width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
    background: var(--gold-pale);
}
.nl-card-thumb-fallback {
    width: 100%; aspect-ratio: 16/9; background: var(--gold-pale);
    display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.nl-card-body { padding: 18px 16px; }
.nl-card-cat {
    font-size: 11px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--gold);
    margin-bottom: 8px; display: block;
}
.nl-card-title {
    font-size: 15px; font-weight: 600; color: var(--navy);
    line-height: 1.45; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nl-card-summary {
    font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nl-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--muted);
}
.nl-card-meta-left { display: flex; align-items: center; gap: 12px; }
.nl-card-meta svg { vertical-align: -2px; }

/* Pagination */
.nl-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 36px; flex-wrap: wrap;
}
.nl-pagination a, .nl-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px;
    font-size: 14px; font-weight: 500; text-decoration: none;
    border: 1px solid var(--border); color: var(--navy);
    transition: all .2s;
}
.nl-pagination a:hover { background: var(--gold-pale); border-color: var(--border-gold); color: var(--gold); }
.nl-pagination .active, .nl-pagination .current {
    background: var(--gold); border-color: var(--gold); color: var(--white);
}
/* Override CI pagination default links */
.nl-pagination-wrap .pagination { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; justify-content: center; padding: 0; margin-top: 36px; }
.nl-pagination-wrap .pagination li a,
.nl-pagination-wrap .pagination li span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 10px;
    border-radius: 8px; font-size: 14px; font-weight: 500;
    text-decoration: none; border: 1px solid var(--border); color: var(--navy);
    transition: all .2s;
}
.nl-pagination-wrap .pagination li a:hover { background: var(--gold-pale); border-color: var(--border-gold); color: var(--gold); }
.nl-pagination-wrap .pagination li.active a,
.nl-pagination-wrap .pagination li.active span { background: var(--gold); border-color: var(--gold); color: var(--white); }
/* paging class từ CI */
.nl-pagination-wrap .paging { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 36px; }
.nl-pagination-wrap .paging a,
.nl-pagination-wrap .paging span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 10px;
    border-radius: 8px; font-size: 14px; text-decoration: none;
    border: 1px solid var(--border); color: var(--navy); transition: all .2s;
}
.nl-pagination-wrap .paging a:hover { background: var(--gold-pale); color: var(--gold); }

/* ===================== SIDEBAR ===================== */
.nl-sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 24px; }

.nl-sidebar-box {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.nl-sidebar-box-head {
    padding: 14px 20px;
    background: var(--navy); 
    display: flex; align-items: center; gap: 8px;
}
.nl-sidebar-box-head h3 {
    font-size: 13px; font-weight: 600; color: var(--white);
    text-transform: uppercase; letter-spacing: .08em;
}
.nl-sidebar-box-head::before {
    content: ''; width: 3px; height: 14px; background: var(--gold); border-radius: 2px; flex-shrink: 0;
}
.nl-sidebar-box-body { padding: 16px 20px; }

/* Sidebar menu links (module render) */
.nl-sidebar-box-body ul { list-style: none; padding: 0; margin: 0; }
.nl-sidebar-box-body ul li { border-bottom: 1px solid var(--border); }
.nl-sidebar-box-body ul li:last-child { border-bottom: none; }
.nl-sidebar-box-body ul li a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; font-size: 14px; color: var(--navy);
    text-decoration: none; transition: color .2s;
}
.nl-sidebar-box-body ul li a::after { content: '→'; font-size: 12px; color: var(--border-gold); transition: all .2s; }
.nl-sidebar-box-body ul li a:hover { color: var(--gold); }
.nl-sidebar-box-body ul li a:hover::after { color: var(--gold); transform: translateX(3px); }
.nl-sidebar-box-body ul li a.active,
.nl-sidebar-box-body ul li.active > a { color: var(--gold); font-weight: 600; }

/* Sidebar ads */
.nl-sidebar-ads img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; margin-bottom: 12px; }
.nl-sidebar-ads a:last-child img { margin-bottom: 0; }

/* CTA box */
.nl-sidebar-cta {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    border-radius: var(--radius-lg); padding: 24px 20px; text-align: center;
}
.nl-sidebar-cta p {
    font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.6; margin-bottom: 16px;
}
.nl-sidebar-cta strong { color: var(--white); font-size: 16px; display: block; margin-bottom: 8px; }
.nl-sidebar-cta a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; background: var(--gold); color: var(--white);
    font-size: 14px; font-weight: 600; border-radius: 50px;
    text-decoration: none; transition: all .2s;
}
.nl-sidebar-cta a:hover { background: #A8832E; transform: translateY(-2px); }

/* Empty state */
.nl-empty {
    text-align: center; padding: 60px 20px;
    background: var(--white); border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.nl-empty-icon { font-size: 48px; margin-bottom: 16px; }
.nl-empty h3 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.nl-empty p { font-size: 14px; color: var(--muted); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .nl-layout { grid-template-columns: 1fr; gap: 32px; }
    .nl-sidebar { position: static; }
}
@media (max-width: 768px) {
    .nl-layout { padding: 28px 16px 48px; }
    .nl-featured { grid-template-columns: 1fr; }
    .nl-featured-body { padding: 20px 18px; }
    .nl-featured-title { font-size: 18px; }
    .nl-grid { grid-template-columns: 1fr; }
    .nl-hero { padding: 32px 16px 36px; }
    .nl-hero h1 { font-size: 22px; }
}
