/*
===============================================================================
TABLOID NARASI — NARASI MODERN v2
Modern Editorial Newsroom
===============================================================================
Visual redesign layer. Backend/query/router tetap menggunakan runtime stabil.
===============================================================================
*/

:root {
    --nm-brand: #e56f18;
    --nm-brand-dark: #b84f07;
    --nm-ink: #111111;
    --nm-charcoal: #1d1d1d;
    --nm-muted: #737373;
    --nm-line: #e7e3dd;
    --nm-soft: #f7f5f1;
    --nm-paper: #ffffff;
    --nm-cream: #fbfaf7;
    --nm-danger: #c9252d;
    --nm-max: 1220px;
    --nm-radius: 16px;
    --nm-radius-sm: 10px;
    --nm-shadow: 0 14px 34px rgba(22, 18, 13, .08);
}

* {
    box-sizing: border-box;
}

body.nm-theme {
    margin: 0 !important;
    background: var(--nm-cream) !important;
    color: var(--nm-ink) !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

.nm-theme .tn-container {
    width: min(calc(100% - 40px), var(--nm-max));
}

.nm-theme a {
    transition: color .18s ease, opacity .18s ease, transform .18s ease;
}

.nm-theme h1,
.nm-theme h2,
.nm-theme h3,
.nm-theme h4,
.nm-theme .title {
    font-family: Georgia, "Times New Roman", serif !important;
    letter-spacing: -.025em;
}

/* -------------------------------------------------------------------------- */
/* Utility bar */
/* -------------------------------------------------------------------------- */

.nm-utility {
    border-bottom: 1px solid #262626;
    background: #111;
    color: #cfcfcf;
    font-size: 12px;
}

.nm-utility__inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nm-utility__left,
.nm-utility__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nm-utility__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--nm-brand);
}

.nm-utility__right a {
    color: #fff !important;
    font-weight: 600;
}

.nm-utility__right a:hover {
    color: var(--nm-brand) !important;
}

/* -------------------------------------------------------------------------- */
/* Masthead */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-header {
    position: sticky;
    top: 0;
    z-index: 500;
    border-top: 0 !important;
    background: var(--nm-paper);
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

.nm-theme .tn-headerbar {
    background: var(--nm-paper);
}

.nm-theme .tn-headerbar__inner {
    min-height: 102px;
    gap: 34px;
}

.nm-theme .tn-brand img {
    max-width: 260px;
    max-height: 68px;
}

.nm-masthead-copy {
    flex: 1;
    min-width: 190px;
    padding-left: 26px;
    border-left: 1px solid var(--nm-line);
}

.nm-masthead-copy strong {
    display: block;
    margin-bottom: 2px;
    color: var(--nm-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    letter-spacing: -.02em;
}

.nm-masthead-copy span {
    color: var(--nm-muted);
    font-size: 12px;
}

.nm-theme .tn-header-tools {
    gap: 10px;
}

.nm-theme .tn-search {
    width: 230px;
    height: 42px;
    border: 1px solid var(--nm-line);
    border-radius: 999px;
    background: #fff;
}

.nm-theme .tn-search input {
    height: 40px;
    padding: 0 16px !important;
    font-size: 13px !important;
}

.nm-theme .tn-search button {
    width: 42px;
    height: 40px;
    color: var(--nm-ink);
}

.nm-epaper-button {
    display: inline-flex;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--nm-brand);
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}

.nm-epaper-button:hover {
    background: var(--nm-brand-dark);
    color: #fff !important;
}

/* -------------------------------------------------------------------------- */
/* Navigation */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-navbar {
    border: 0;
    background: #111;
}

.nm-theme .tn-navbar__inner {
    min-height: 48px;
}

.nm-theme .tn-main-nav {
    gap: 0;
    overflow: visible;
}

.nm-theme .tn-main-nav > a,
.nm-theme .tn-nav-item > a {
    min-height: 48px;
    padding: 0 15px;
    border-radius: 0;
    background: transparent !important;
    color: #e9e9e9 !important;
    text-transform: uppercase;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
}

.nm-theme .tn-main-nav > a:hover,
.nm-theme .tn-main-nav > a.is-active,
.nm-theme .tn-nav-item:hover > a {
    background: #202020 !important;
    color: var(--nm-brand) !important;
}

.nm-theme .tn-main-nav > a.is-active {
    box-shadow: inset 0 -3px 0 var(--nm-brand);
}

.nm-theme .tn-dropdown {
    top: 100%;
    min-width: 230px;
    padding: 8px;
    border: 0;
    border-radius: 0 0 12px 12px;
    background: #151515;
    box-shadow: 0 18px 38px rgba(0,0,0,.24);
}

.nm-theme .tn-dropdown a {
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    color: #ddd;
    font-size: 12px;
}

.nm-theme .tn-dropdown a:hover {
    background: #242424;
    color: var(--nm-brand);
}

/* -------------------------------------------------------------------------- */
/* Breaking News */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-breaking {
    border: 0;
    border-bottom: 1px solid var(--nm-line);
    background: #fff;
}

.nm-theme .tn-breaking__inner {
    min-height: 42px;
}

.nm-theme .tn-breaking__label {
    min-height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--nm-danger);
    font-size: 10px;
    letter-spacing: .08em;
}

.nm-theme .tn-breaking__items {
    gap: 38px;
}

.nm-theme .tn-breaking__items a {
    color: #353535;
    font-size: 12px;
    font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* Main / home intro */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-main {
    background: var(--nm-cream);
}

.nm-theme .tn-home {
    padding: 28px 0 70px;
}

.nm-home-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin: 26px 0 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--nm-line);
}

.nm-home-intro__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--nm-brand);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
}

.nm-home-intro h2 {
    max-width: 700px;
    margin: 0;
    color: var(--nm-ink);
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.05;
}

.nm-home-intro > a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: var(--nm-ink);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.nm-home-intro > a:hover {
    color: var(--nm-brand);
}

/* -------------------------------------------------------------------------- */
/* Hero */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-top-grid {
    grid-template-columns: minmax(0, 2.25fr) minmax(300px, .75fr);
    gap: 26px;
}

.nm-theme .tn-top-main {
    min-width: 0;
}

.nm-theme .tn-featured.nm-featured {
    min-height: 0;
    display: grid;
    grid-template-columns: 1.18fr .82fr;
    overflow: hidden;
    border: 1px solid var(--nm-line);
    border-radius: var(--nm-radius);
    background: var(--nm-paper);
    box-shadow: var(--nm-shadow);
}

.nm-theme .nm-featured__media {
    position: relative !important;
    inset: auto !important;
    min-height: 470px;
    overflow: hidden;
}

.nm-theme .tn-featured__image,
.nm-theme .nm-featured__media .tn-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 470px;
    object-fit: cover;
}

.nm-theme .tn-featured__content.nm-featured__content {
    position: relative !important;
    inset: auto !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 38px;
    background: #fff;
    color: var(--nm-ink);
}

.nm-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.nm-kicker span {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--nm-brand);
    color: #fff;
}

.nm-kicker a {
    color: var(--nm-muted);
}

.nm-theme .nm-featured h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: .98;
}

.nm-theme .nm-featured h1 a {
    color: var(--nm-ink) !important;
}

.nm-featured__excerpt {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.nm-featured__meta {
    display: flex;
    gap: 18px;
    margin-bottom: 26px;
    color: var(--nm-muted);
    font-size: 11px;
}

.nm-featured__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nm-read-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--nm-brand);
    color: var(--nm-ink) !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* -------------------------------------------------------------------------- */
/* Selected stories below hero */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-dark-box,
.nm-theme .nm-top-stories {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid var(--nm-line);
    border-radius: var(--nm-radius);
    background: #fff !important;
    color: var(--nm-ink) !important;
}

.nm-theme .tn-dark-title,
.nm-theme .tn-simple-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.nm-theme .tn-dark-title h2,
.nm-theme .tn-simple-title h2 {
    margin: 0;
    color: var(--nm-ink) !important;
    font-size: 24px;
}

.nm-theme .tn-dark-title span,
.nm-theme .tn-simple-title span {
    width: 42px;
    height: 3px;
    background: var(--nm-brand) !important;
}

.nm-theme .tn-main-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.nm-theme .tn-main-card {
    min-width: 0;
}

.nm-theme .tn-main-card__media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: #eee;
}

.nm-theme .tn-main-card__image,
.nm-theme .tn-main-card .tn-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.nm-theme .tn-main-card:hover img {
    transform: scale(1.035);
}

.nm-theme .tn-main-card h3 {
    margin: 10px 0 0;
    color: var(--nm-ink) !important;
    font-size: 17px;
    line-height: 1.2;
}

.nm-theme .tn-main-card h3 a {
    color: var(--nm-ink) !important;
}

/* -------------------------------------------------------------------------- */
/* Popular */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-popular {
    position: sticky;
    top: 205px;
    padding: 24px;
    border: 1px solid var(--nm-line);
    border-radius: var(--nm-radius);
    background: #111;
    color: #fff;
}

.nm-theme .tn-popular .tn-simple-title h2 {
    color: #fff !important;
    font-size: 25px;
}

.nm-theme .tn-popular .tn-simple-title span {
    background: var(--nm-brand) !important;
}

.nm-theme .tn-popular-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: rank;
}

.nm-theme .tn-popular-list li {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid #303030;
}

.nm-theme .tn-popular-list li:first-child {
    border-top: 0;
}

.nm-theme .tn-popular-number {
    color: var(--nm-brand);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}

.nm-theme .tn-popular-number::before {
    content: "0";
}

.nm-theme .tn-popular-list h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
}

.nm-theme .tn-popular-list h3 a {
    color: #0a0101 !important;
}

.nm-theme .tn-popular-list h3 a:hover {
    color: var(--nm-brand) !important;
}

/* -------------------------------------------------------------------------- */
/* Main lower grid */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
    gap: 30px;
    margin-top: 36px;
}

.nm-theme .tn-latest-column,
.nm-theme .tn-channel-column {
    min-width: 0;
}

.nm-theme .tn-simple-title--latest {
    padding-bottom: 14px;
    border-bottom: 2px solid var(--nm-ink);
}

.nm-theme .tn-simple-title--latest h2 {
    font-size: 30px;
}

.nm-theme .tn-latest-list {
    display: grid;
    gap: 0;
}

.nm-theme .tn-latest-row {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--nm-line);
    background: transparent;
}

.nm-theme .tn-latest-row__media {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 12px;
    background: #eee;
}

.nm-theme .tn-latest-row__image,
.nm-theme .tn-latest-row .tn-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-theme .tn-latest-category {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--nm-brand) !important;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nm-theme .tn-latest-row h3 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.12;
}

.nm-theme .tn-latest-row h3 a {
    color: var(--nm-ink) !important;
}

.nm-theme .tn-meta {
    color: var(--nm-muted) !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: 11px !important;
}

/* Editor */
.nm-theme .tn-editor-box {
    margin: 26px 0 !important;
    padding: 24px !important;
    background: #efeae2 !important;
}

.nm-theme .tn-editor-box .tn-main-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Channels */
.nm-theme .tn-channel-column {
    display: grid;
    align-content: start;
    gap: 18px;
}

.nm-theme .tn-channel-box {
    padding: 20px;
    border: 1px solid var(--nm-line);
    border-radius: var(--nm-radius);
    background: #fff;
}

.nm-theme .tn-simple-title--channel {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--nm-line);
}

.nm-theme .tn-simple-title--channel h2 {
    font-size: 22px;
}

.nm-theme .tn-channel-lead__media {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16/10;
}

.nm-theme .tn-channel-lead__image,
.nm-theme .tn-channel-lead .tn-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-theme .tn-channel-lead h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    line-height: 1.18;
}

.nm-theme .tn-channel-small {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--nm-line);
}

.nm-theme .tn-channel-small__media {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
}

.nm-theme .tn-channel-small__image,
.nm-theme .tn-channel-small .tn-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-theme .tn-channel-small h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.18;
}

/* Ads */
.nm-theme .tn-ad {
    padding: 10px 0;
}

.nm-theme .tn-ad img {
    border-radius: 10px;
}

/* More */
.nm-theme .tn-more-wrap {
    margin-top: 26px;
    text-align: center;
}

.nm-theme .tn-more-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--nm-ink);
    border-radius: 999px;
    color: var(--nm-ink) !important;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.nm-theme .tn-more-button:hover {
    background: var(--nm-ink);
    color: #fff !important;
}

/* -------------------------------------------------------------------------- */
/* Generic inner pages */
/* -------------------------------------------------------------------------- */

.nm-theme .wp-page,
.nm-theme .single-page,
.nm-theme #body-wrapper {
    background: var(--nm-cream);
}

.nm-theme .bksection,
.nm-theme .bk-in-single-page {
    padding-top: 30px;
    padding-bottom: 50px;
}

.nm-theme .article-content,
.nm-theme .bk-category-content,
.nm-theme .sidebar {
    color: var(--nm-ink);
}

.nm-theme .s-post-header h1,
.nm-theme .module-title .heading {
    color: var(--nm-ink) !important;
    font-size: clamp(34px, 4vw, 54px) !important;
    line-height: 1.04 !important;
}

.nm-theme .article-body {
    color: #262626;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 18px !important;
    line-height: 1.82 !important;
}

.nm-theme .article-body p {
    margin-bottom: 1.45em;
}

.nm-theme .s-feat-img img {
    border-radius: var(--nm-radius);
}

.nm-theme .s-tags a {
    margin: 3px;
    padding: 7px 11px;
    border: 1px solid var(--nm-line);
    border-radius: 999px;
    background: #fff;
    color: var(--nm-ink) !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: 11px;
}

.nm-theme .s-tags a:hover {
    border-color: var(--nm-brand);
    color: var(--nm-brand) !important;
}

/* Sidebar generic */
.nm-theme .sidebar .widget,
.nm-theme .sidebar .bkmodule,
.nm-theme .sidebar .module-title {
    border-radius: 12px;
}

/* -------------------------------------------------------------------------- */
/* Footer */
/* -------------------------------------------------------------------------- */

.nm-theme .tn-footer {
    border: 0;
    background: #111;
    color: #bcbcbc;
}

.nm-theme .tn-footer__inner {
    min-height: 180px;
    align-items: center;
}

.nm-theme .tn-footer__brand img {
    filter: brightness(0) invert(1);
    max-width: 220px;
}

.nm-theme .tn-footer__menu {
    gap: 18px;
}

.nm-theme .tn-footer__menu a {
    color: #fff !important;
    font-size: 12px;
}

.nm-theme .tn-footer__copyright {
    color: #777;
}

/* -------------------------------------------------------------------------- */
/* Mobile */
/* -------------------------------------------------------------------------- */

@media (max-width: 1050px) {
    .nm-masthead-copy {
        display: none;
    }

    .nm-theme .tn-top-grid,
    .nm-theme .tn-bottom-grid {
        grid-template-columns: 1fr;
    }

    .nm-theme .tn-popular {
        position: relative;
        top: auto;
    }

    .nm-theme .tn-main-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .nm-utility {
        display: none;
    }

    .nm-theme .tn-header {
        position: sticky;
        top: 0;
    }

    .nm-theme .tn-headerbar__inner {
        min-height: 70px;
        gap: 12px;
    }

    .nm-theme .tn-brand {
        flex: 1;
        text-align: center;
    }

    .nm-theme .tn-brand img {
        max-width: 180px;
        max-height: 46px;
    }

    .nm-theme .tn-header-tools .tn-search,
    .nm-theme .nm-epaper-button,
    .nm-theme .tn-navbar {
        display: none;
    }

    .nm-theme .tn-breaking__items {
        overflow: hidden;
    }

    .nm-theme .tn-container {
        width: min(calc(100% - 24px), var(--nm-max));
    }

    .nm-theme .tn-home {
        padding-top: 16px;
    }

    .nm-home-intro {
        align-items: start;
        margin: 15px 0 18px;
    }

    .nm-home-intro h2 {
        font-size: 30px;
    }

    .nm-home-intro > a {
        display: none;
    }

    .nm-theme .tn-featured.nm-featured {
        grid-template-columns: 1fr;
    }

    .nm-theme .nm-featured__media,
    .nm-theme .tn-featured__image,
    .nm-theme .nm-featured__media .tn-image-placeholder {
        min-height: 260px;
        height: 260px;
    }

    .nm-theme .tn-featured__content.nm-featured__content {
        padding: 22px;
    }

    .nm-theme .nm-featured h1 {
        font-size: 34px;
    }

    .nm-featured__excerpt {
        display: none;
    }

    .nm-theme .tn-main-cards,
    .nm-theme .tn-editor-box .tn-main-cards {
        grid-template-columns: 1fr 1fr;
    }

    .nm-theme .tn-latest-row {
        grid-template-columns: 120px 1fr;
        gap: 14px;
        padding: 16px 0;
    }

    .nm-theme .tn-latest-row h3 {
        font-size: 18px;
    }

    .nm-theme .tn-popular {
        padding: 20px;
    }

    .nm-theme .tn-popular-list li {
        grid-template-columns: 46px 1fr;
    }

    .nm-theme .tn-popular-number {
        font-size: 28px;
    }

    .nm-theme .s-post-header h1,
    .nm-theme .module-title .heading {
        font-size: 34px !important;
    }

    .nm-theme .article-body {
        font-size: 17px !important;
        line-height: 1.75 !important;
    }
}

@media (max-width: 480px) {
    .nm-theme .tn-main-cards,
    .nm-theme .tn-editor-box .tn-main-cards {
        grid-template-columns: 1fr;
    }

    .nm-theme .tn-latest-row {
        grid-template-columns: 105px 1fr;
    }

    .nm-theme .tn-channel-small {
        grid-template-columns: 72px 1fr;
    }

    .nm-theme .tn-breaking__label {
        margin-right: 10px;
    }

    .nm-theme .tn-breaking__items a {
        font-size: 11px;
    }
}
