/* Knowledge & News Page Specific Styles */

/* Layout */
.news-layout {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
    margin-bottom: 3rem;
}
@media (max-width: 1400px) {
    .news-layout {
        grid-template-columns: 220px 1fr 260px;
    }
}
@media (max-width: 991px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
}

/* Common Widget */
.n-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.n-widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Left Sidebar */
.newsletter-box {
    text-align: center;
    padding: 1.5rem 1rem;
}
.newsletter-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}
.newsletter-input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    background: #f8fafc;
}

.saved-topics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.saved-topics-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}
.saved-topics-list li:last-child {
    border-bottom: none;
}
.st-name {
    font-size: 0.8rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.st-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Main Content - Hero */
.n-hero-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.n-hero-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}
.n-hero-img-box {
    width: 40%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-color);
    font-size: 4rem;
    position: relative;
}
.n-hero-dots {
    position: absolute;
    bottom: 1rem;
    display: flex;
    gap: 0.3rem;
}
.n-hero-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}
.n-hero-dot.active {
    background: var(--text-main);
}
.n-hero-tag {
    display: inline-block;
    background: #f1f5f9;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
}
.n-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}
.n-hero-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.n-hero-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.n-hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* Tabs */
.n-tabs-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 1.5rem;
}
.n-tabs-scroll::-webkit-scrollbar { display: none; }
.n-tabs {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
}
.n-tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: var(--bg-surface);
    text-decoration: none;
    transition: all 0.2s;
}
.n-tab.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* news.php ?cat= — filter cards by category */
.n-content-grid.n-content-grid--filter-market .n-card:not(.n-card--market),
.n-content-grid.n-content-grid--filter-trip .n-card:not(.n-card--trip),
.n-content-grid.n-content-grid--filter-guide .n-card:not(.n-card--guide),
.n-content-grid.n-content-grid--filter-news .n-card:not(.n-card--news),
.n-content-grid.n-content-grid--filter-video .n-card:not(.n-card--video) {
    display: none !important;
}

.n-hero-card.is-hidden-by-news-cat {
    display: none;
}

/* Content Grid — 3-up at desktop, collapsing to 2 / 1 at smaller widths.
 * Cards are wider than the legacy 4-up layout, so the cover image gets a
 * taller box (see `.n-card-icon-box` below). */
.n-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}
@media (max-width: 991px) {
    .n-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .n-content-grid {
        grid-template-columns: 1fr;
    }
}
.n-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.n-card-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.n-card-icon-box {
    width: 100%;
    /* 3-up grid → wider cards, so a taller cover reads better. */
    height: 180px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    overflow: hidden;
}
.n-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.n-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    margin-top: auto;
}
.n-card-actions {
    display: flex;
    gap: 0.5rem;
}
.n-card-btn {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.n-card-btn i {
    margin-left: 0.25rem;
}

/* Downloadable Reports */
.n-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.n-dl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 991px) {
    .n-dl-grid {
        grid-template-columns: 1fr;
    }
}
.n-dl-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.n-dl-format {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.n-dl-info {
    flex: 1;
}
.n-dl-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}
.n-dl-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.n-dl-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
}

/* Success Cases Slider */
.n-cases-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.n-case-card {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    gap: 1rem;
}
.n-case-img {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-light);
    flex-shrink: 0;
}
.n-case-info {
    flex: 1;
}
.n-case-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.n-case-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.n-case-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
}
.slider-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
}

/* Right Sidebar */
.trending-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}
.trending-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}
.trending-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.t-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    width: 15px;
}
.t-title {
    font-size: 0.8rem;
    font-weight: 500;
    flex: 1;
}
.t-views {
    font-size: 0.65rem;
    background: #f1f5f9;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    color: var(--text-muted);
}

.most-read-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}
.most-read-list li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.mr-img {
    width: 60px;
    height: 45px;
    background: #f1f5f9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-light);
    flex-shrink: 0;
    position: relative;
}
.mr-num {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 0.6rem;
    background: var(--bg-surface);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.mr-info {
    flex: 1;
}
.mr-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.mr-views {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Event Calendar Widget */
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.cal-title {
    font-size: 0.85rem;
    font-weight: 700;
}
.cal-nav {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.2rem;
    text-align: center;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}
.cal-day-name {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
}
.cal-day {
    padding: 0.25rem 0;
    color: var(--text-main);
    border-radius: 4px;
}
.cal-day.active {
    background: var(--brand-primary);
    color: white;
    font-weight: 700;
}
.cal-day.empty {
    color: transparent;
}
.event-item {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}
.e-date {
    text-align: center;
}
.e-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}
.e-month {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.e-info {
    flex: 1;
}
.e-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.e-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ───────── Article detail page (`/news/[id]`) ─────────
 * Magazine-style layout: full-bleed cover hero with title overlay,
 * sticky sidebar with related/latest, and a polished prose body.
 */

/* Hero ────────────────────────────────────────────────── */
.nd-hero {
    position: relative;
    width: 100%;
    min-height: clamp(320px, 46vw, 520px);
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, #0b1f4d 0%, #1d3b8b 50%, #2563eb 100%);
    color: #fff;
    isolation: isolate;
}
.nd-hero-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.nd-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nd-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(8, 15, 35, 0.05) 0%, rgba(8, 15, 35, 0.55) 55%, rgba(8, 15, 35, 0.92) 100%);
}
.nd-hero--no-image .nd-hero-overlay {
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 80% 90%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}
.nd-hero-fallback-icon {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(5rem, 16vw, 12rem);
    color: rgba(255, 255, 255, 0.18);
}
.nd-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    gap: 0.85rem;
}
.nd-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.nd-crumbs a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.nd-crumbs a:hover { color: #fff; text-decoration: underline; }
.nd-crumbs .sep { opacity: 0.55; font-size: 0.65rem; }
.nd-crumbs .current {
    color: #fff;
    max-width: 38ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nd-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.nd-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 0.32rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.nd-tag.is-featured {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border-color: transparent;
}

.nd-hero-title {
    font-size: clamp(1.6rem, 3.6vw, 2.85rem);
    font-weight: 800;
    line-height: 1.18;
    margin: 0;
    color: #fff;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    max-width: 32ch;
}
.nd-hero-excerpt {
    font-size: clamp(0.92rem, 1.4vw, 1.05rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    max-width: 60ch;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nd-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.25rem;
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.82rem;
    font-weight: 600;
}
.nd-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.nd-hero-meta-item i { opacity: 0.85; }
.nd-hero-meta-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

/* Author byline chip inside the hero meta */
.nd-byline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.65rem 0.25rem 0.3rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.nd-avatar {
    position: relative;
    overflow: hidden;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    color: var(--brand-primary, #1d3b8b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}
.nd-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nd-avatar-initial {
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
}
.nd-byline-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
    gap: 1px;
}
.nd-byline-name {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-size: 0.85rem;
}
.nd-byline-company {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}
a.nd-byline.nd-byline--link {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
a.nd-byline.nd-byline--link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}
a.nd-byline.nd-byline--link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

/* "About the author" card under the article body */
.nd-author-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 1.1rem;
    align-items: start;
    margin: 2.5rem 0 1.25rem;
    padding: 1.25rem 1.4rem;
    background: linear-gradient(135deg,
        rgba(37, 99, 235, 0.06) 0%,
        rgba(56, 189, 248, 0.04) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-primary, #1d3b8b);
    border-radius: 14px;
}
.nd-author-card-avatar {
    position: relative;
    overflow: hidden;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary, #1d3b8b) 0%, #38bdf8 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(29, 59, 139, 0.22);
}
.nd-author-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nd-author-card-initial {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.nd-author-card-body { min-width: 0; }
.nd-author-card-eyebrow {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--brand-primary, #1d3b8b);
    margin-bottom: 0.15rem;
}
.nd-author-card-name {
    margin: 0 0 0.3rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
}
.nd-author-card-company {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}
.nd-author-card-bio {
    margin: 0;
    color: var(--text-secondary, #475569);
    font-size: 0.92rem;
    line-height: 1.55;
}
a.nd-author-card.nd-author-card--link {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
a.nd-author-card.nd-author-card--link:hover {
    box-shadow: 0 10px 28px rgba(29, 59, 139, 0.12);
    border-color: rgba(37, 99, 235, 0.35);
}
a.nd-author-card.nd-author-card--link:focus-visible {
    outline: 2px solid var(--brand-primary, #1d3b8b);
    outline-offset: 3px;
}
@media (max-width: 575px) {
    .nd-author-card {
        grid-template-columns: 1fr;
        text-align: left;
        padding: 1.1rem 1rem;
    }
    .nd-author-card-avatar {
        width: 64px;
        height: 64px;
    }
    .nd-author-card-initial { font-size: 1.5rem; }
}

/* Top toolbar: back link + share button */
.nd-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.nd-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}
.nd-back:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.06);
}

/* Layout: article + sticky sidebar ────────────────────── */
.news-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: start;
}
@media (max-width: 991px) {
    .news-detail-layout {
        grid-template-columns: 1fr;
    }
}

.nd-article {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 2.6vw, 2.25rem) clamp(1.25rem, 2.6vw, 2.5rem);
}

.nd-lede {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.65;
    color: var(--text-main);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid var(--brand-primary);
    padding: 1rem 1.25rem;
    border-radius: 0 12px 12px 0;
    margin: 0 0 1.75rem;
    font-weight: 500;
}

/* Inline action toolbar (above the body) */
.nd-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}
.nd-stats {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}
.nd-stats i { margin-right: 0.3rem; }

/* Share row ───────────────────────────────────────────── */
.nd-share {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 2.25rem;
    padding: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border-color);
}
.nd-share-label {
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 700;
    margin-right: 0.5rem;
}
.nd-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 140ms ease, background-color 140ms ease,
                color 140ms ease, border-color 140ms ease;
    text-decoration: none;
}
.nd-share-btn:hover {
    transform: translateY(-2px);
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}
.nd-share-btn[data-net="facebook"]:hover { background: #1877f2; border-color: #1877f2; }
.nd-share-btn[data-net="twitter"]:hover { background: #0f172a; border-color: #0f172a; }
.nd-share-btn[data-net="linkedin"]:hover { background: #0a66c2; border-color: #0a66c2; }
.nd-share-btn[data-net="email"]:hover { background: #ef4444; border-color: #ef4444; }

/* Sticky right sidebar ────────────────────────────────── */
.nd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
@media (min-width: 992px) {
    .nd-sidebar {
        position: sticky;
        top: calc(72px + 1rem);
        align-self: start;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        padding-right: 0.25rem;
        scrollbar-width: thin;
    }
    .nd-sidebar::-webkit-scrollbar { width: 6px; }
    .nd-sidebar::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 99px;
    }
}

.nd-related-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: transform 140ms ease;
}
.nd-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.nd-related-item:hover { transform: translateX(2px); }
.nd-related-item:hover .nd-related-title { color: var(--brand-primary); }

.nd-related-thumb {
    width: 76px;
    height: 60px;
    flex-shrink: 0;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.05rem;
    border: 1px solid var(--border-color);
}
.nd-related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nd-related-info { min-width: 0; flex: 1; }
.nd-related-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
    transition: color 140ms ease;
}
.nd-related-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Newsletter sidebar widget */
.nd-newsletter {
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 40%),
        linear-gradient(135deg, #0b1f4d 0%, #1d3b8b 100%);
    color: #fff;
    border: none;
    text-align: center;
}
.nd-newsletter .n-widget-title {
    color: #fff;
    justify-content: center;
}
.nd-newsletter p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1rem;
    line-height: 1.5;
}
.nd-newsletter input {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.nd-newsletter input::placeholder { color: rgba(255, 255, 255, 0.6); }
.nd-newsletter input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.18);
}
.nd-newsletter button {
    width: 100%;
    background: #fff;
    color: var(--brand-primary, #1d3b8b);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 120ms ease;
}
.nd-newsletter button:hover { background: #f1f5f9; }

/* Bottom related grid + CTA banner ────────────────────── */
.nd-more-section {
    margin-top: 1.5rem;
    margin-bottom: 4rem;
}
.nd-more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.nd-more-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.nd-more-title i { color: var(--brand-primary); }
.nd-more-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.nd-more-link:hover { color: var(--brand-primary); }

.nd-more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 991px) {
    .nd-more-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .nd-more-grid { grid-template-columns: 1fr; }
}
.nd-more-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.nd-more-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-primary);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}
.nd-more-card:hover .nd-more-card-title { color: var(--brand-primary); }
.nd-more-card-thumb {
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2.25rem;
    overflow: hidden;
}
.nd-more-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nd-more-card-body {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}
.nd-more-card-tag {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}
.nd-more-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    transition: color 140ms ease;
}
.nd-more-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.nd-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}

/* Article body typography ────────────────────────────── */
.prose-busy {
    color: var(--text-main);
    font-size: 1.02rem;
    line-height: 1.8;
    max-width: 72ch;
}
.prose-busy > *:first-child { margin-top: 0; }
.prose-busy p { margin: 0 0 1.15rem; }
/* Drop cap on the first paragraph for a magazine-style intro. */
.prose-busy.has-dropcap > p:first-of-type::first-letter {
    float: left;
    font-size: 3.4rem;
    line-height: 0.95;
    font-weight: 800;
    color: var(--brand-primary);
    padding: 0.35rem 0.65rem 0 0;
    margin-top: 0.25rem;
}
.prose-busy h1,
.prose-busy h2,
.prose-busy h3,
.prose-busy h4 {
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.3;
    margin: 2.25rem 0 0.85rem;
    letter-spacing: -0.01em;
}
.prose-busy h2 { font-size: 1.55rem; }
.prose-busy h3 { font-size: 1.22rem; }
.prose-busy ul,
.prose-busy ol { padding-left: 1.5rem; margin: 0 0 1.15rem; }
.prose-busy li { margin: 0.3rem 0; }
.prose-busy a {
    color: var(--brand-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose-busy a:hover { text-decoration: none; }
.prose-busy strong { color: var(--text-main); font-weight: 700; }
.prose-busy blockquote {
    border-left: 4px solid var(--brand-primary);
    padding: 1rem 1.25rem;
    color: var(--text-main);
    margin: 1.5rem 0;
    background: linear-gradient(90deg, #f1f5f9 0%, #f8fafc 100%);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    font-size: 1.05rem;
}
.prose-busy hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2.25rem 0;
}
.prose-busy img {
    max-width: 100%;
    height: auto !important;
    width: auto !important;
    border-radius: 12px;
    display: block;
    margin: 1.5rem auto;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.10);
    border: 1px solid var(--border-color);
}
.prose-busy figure {
    margin: 1.75rem 0;
    text-align: center;
}
.prose-busy figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.prose-busy code {
    background: #f1f5f9;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.92em;
    border: 1px solid var(--border-color);
}
.prose-busy table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    border-radius: 10px;
    overflow: hidden;
}
.prose-busy th,
.prose-busy td {
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.85rem;
    text-align: left;
}
.prose-busy th { background: #f1f5f9; font-weight: 700; }
.prose-busy iframe {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    margin: 1.25rem 0;
    border: 1px solid var(--border-color);
}

/* Member profile: related news cards */
.news-member-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.12) !important;
}
