/* ===== NewsBin Design System ===== */
:root {
    --nb-primary: #ef4444;
    --nb-primary-dark: #dc2626;
    --nb-dark: #0f172a;
    --nb-text: #1e293b;
    --nb-muted: #94a3b8;
    --nb-border: #e2e8f0;
    --nb-bg: #f8fafc;
    --nb-surface: #ffffff;
    --nb-radius: 16px;
    --nb-radius-sm: 10px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--nb-text);
    background: var(--nb-bg);
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.nb-header {
    background: var(--nb-surface);
    backdrop-filter: blur(20px);
    border-bottom: none;
}
.nb-brand {
    font-weight: 900;
    font-size: 1.6rem;
    color: var(--nb-dark);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.nb-brand:hover { color: var(--nb-dark); }
.nb-brand span { color: var(--nb-primary); }

.nb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef2f2;
    color: var(--nb-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
}
.nb-pill-dot {
    width: 7px;
    height: 7px;
    background: var(--nb-primary);
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.nb-countdown {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--nb-dark);
    font-variant-numeric: tabular-nums;
}
.nb-countdown-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--nb-muted);
    font-weight: 600;
}

/* ===== NAV PILLS ===== */
.nb-nav-wrap {
    background: var(--nb-surface);
    border-top: 1px solid var(--nb-border);
    border-bottom: 1px solid var(--nb-border);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.nb-nav-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.nb-nav-scroll::-webkit-scrollbar { display: none; }
.nb-nav-pills {
    display: flex;
    gap: 6px;
    padding: 10px 0;
    white-space: nowrap;
}
.nb-nav-pills a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--nb-text);
    text-decoration: none;
    background: transparent;
    transition: all 0.15s;
    flex-shrink: 0;
}
.nb-nav-pills a:hover {
    background: var(--nb-bg);
    color: var(--nb-primary);
}
.nb-nav-pills a.active {
    background: var(--nb-dark);
    color: #fff;
}

/* Mobile offcanvas */
.offcanvas-header { border-bottom: 1px solid var(--nb-border); }
.nb-mobile-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--nb-text);
    border-radius: var(--nb-radius-sm);
    margin: 2px 0;
}
.nb-mobile-nav .nav-link:hover,
.nb-mobile-nav .nav-link.active {
    background: #fef2f2;
    color: var(--nb-primary);
}
.nb-mobile-nav .nav-link i { font-size: 1.1rem; width: 24px; text-align: center; }

/* ===== LEAD STORY ===== */
.nb-lead {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--nb-radius);
    padding: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.nb-lead::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(239, 68, 68, 0.15), transparent 70%);
    pointer-events: none;
}
.nb-lead h2 {
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1.3;
    letter-spacing: -0.3px;
}
.nb-lead p {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}
.nb-lead .btn-discuss,
.btn-discuss {
    background: var(--nb-primary);
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 10px 28px;
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-block;
}
.btn-discuss:hover {
    background: var(--nb-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

@media (min-width: 768px) {
    .nb-lead { padding: 2.5rem; }
    .nb-lead h2 { font-size: 2rem; }
}

/* ===== SECTION HEADERS ===== */
.nb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.nb-section-title {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nb-section-title i {
    font-size: 1rem;
    color: var(--nb-primary);
}
.nb-view-all {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nb-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nb-view-all:hover { text-decoration: underline; }

/* ===== ARTICLE CARDS ===== */
.nb-card {
    background: var(--nb-surface);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    transition: all 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.nb-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.nb-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.nb-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.nb-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 100px;
}
.nb-badge-ms {
    background: #eff6ff;
    color: #2563eb;
}
.nb-badge-ind {
    background: #faf5ff;
    color: #7c3aed;
}
.nb-card-source {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nb-muted);
}
.nb-card h3 {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nb-card h3 a {
    color: var(--nb-text);
    text-decoration: none;
}
.nb-card h3 a:hover { color: var(--nb-primary); }
.nb-card-desc {
    font-size: 0.83rem;
    color: var(--nb-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
}
.nb-card-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--nb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}
.nb-card-time { color: var(--nb-muted); }
.nb-card-comments {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--nb-muted);
    font-weight: 600;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--nb-bg);
    transition: all 0.15s;
}
.nb-card-comments:hover {
    background: #fef2f2;
    color: var(--nb-primary);
}

/* ===== LIVE COMMENTS ===== */
.nb-comments-wrap {
    background: var(--nb-surface);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    overflow: hidden;
}
.nb-comment {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--nb-border);
    transition: background 0.15s;
}
.nb-comment:last-child { border-bottom: none; }
.nb-comment:hover { background: var(--nb-bg); }
.nb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.nb-comment-text {
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nb-comment-ref {
    font-size: 0.72rem;
    color: var(--nb-primary);
    text-decoration: none;
    font-weight: 500;
}
.nb-comment-ref:hover { text-decoration: underline; }
.nb-comments-footer {
    padding: 10px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--nb-muted);
    background: var(--nb-bg);
    font-weight: 500;
}

/* ===== INLINE CATEGORY CHIPS ===== */
.nb-cat-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--nb-surface);
    border: 1px solid var(--nb-border);
    border-radius: 100px;
    text-decoration: none;
    color: var(--nb-text);
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.15s;
    white-space: nowrap;
}
.nb-cat-inline i { color: var(--nb-muted); transition: color 0.15s; }
.nb-cat-inline:hover {
    border-color: var(--nb-primary);
    color: var(--nb-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}
.nb-cat-inline:hover i { color: var(--nb-primary); }

/* ===== ABOUT BOX ===== */
.nb-about-box {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    padding: 1.5rem;
}

/* ===== CONTENT CARD (article page, about page) ===== */
.nb-content-card {
    background: var(--nb-surface);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    padding: 2rem;
}

/* ===== COMMENT FORM ===== */
.nb-comment-form {
    background: var(--nb-bg);
    border-radius: var(--nb-radius-sm);
    padding: 1.5rem;
}
.nb-comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    transition: border-color 0.15s;
}
.nb-comment-form textarea:focus {
    outline: none;
    border-color: var(--nb-primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ===== TRENDING ITEM ===== */
.nb-trending-item {
    background: var(--nb-surface);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    padding: 1.5rem;
    transition: all 0.2s;
}
.nb-trending-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.nb-rank {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}
.nb-rank-top {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
}
.nb-rank-normal {
    background: var(--nb-bg);
    color: var(--nb-muted);
}

/* ===== STAT CARD ===== */
.nb-stat-card {
    background: var(--nb-surface);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    padding: 1.5rem;
    text-align: center;
}
.nb-stat-value {
    font-weight: 800;
    font-size: 2rem;
    line-height: 1;
}
.nb-stat-label {
    font-size: 0.82rem;
    color: var(--nb-muted);
    margin-top: 0.5rem;
}

/* ===== FOOTER ===== */
.nb-footer {
    background: var(--nb-dark);
    color: rgba(255,255,255,0.5);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}
.nb-footer h6 {
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}
.nb-footer a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.nb-footer a:hover { color: #fff; }
.nb-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.75rem;
}

/* ===== MOBILE TWEAKS ===== */
@media (max-width: 767.98px) {
    .nb-brand { font-size: 1.3rem; }
    .nb-lead { padding: 1.5rem; }
    .nb-lead h2 { font-size: 1.25rem; }
    .nb-card-body { padding: 1rem; }
    .nb-section-title { font-size: 1rem; }
    .nb-nav-wrap { top: 0; }
    .nb-content-card { padding: 1.25rem; }
}
