/* ================================================================
   NusaNews — PATCH CSS (assets/css/patch.css)
   Perbaikan: Widget default WP, Hero layout, Overflow fix,
   Sticky header, Hero slider, Responsif
   ================================================================ */

/* ================================================================
   FIX 1 — GLOBAL OVERFLOW PREVENTION
   ================================================================ */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    max-width: 100%;
}

img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto;
}

.nn-container {
    max-width: var(--max-w);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    overflow: visible;
}

/* Force table responsive */
.nn-post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ================================================================
   FIX 2 — STICKY NAVBAR (enhanced)
   ================================================================ */
.nn-navbar {
    position: sticky;
    top: 0;
    z-index: 9000;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    will-change: transform;
}

.nn-navbar.is-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* Admin bar offset */
.admin-bar .nn-navbar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .nn-navbar {
        top: 46px;
    }
}


/* ================================================================
   FIX 3 — HERO SLIDER (gambar besar slideshow, kecil tetap)
   ================================================================ */
.nn-hero {
    padding: 20px 0 16px;
    overflow: hidden;
}

.nn-hero-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--nn-border);
    height: 460px;
    min-height: unset;
}

/* Slot kiri = slider, span 2 baris */
.nn-hero-slider-wrap {
    grid-row: 1 / 3;
    grid-column: 1;
    position: relative;
    overflow: hidden;
    background: var(--nn-secondary);
    height: 100%;
}

/* Slide items */
.nn-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.nn-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.nn-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nn-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(11, 29, 53, 0.92) 0%,
        rgba(11, 29, 53, 0.5) 40%,
        rgba(11, 29, 53, 0.05) 80%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
}

.nn-hero-cat-tag {
    display: inline-block;
    background: var(--nn-accent);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 12px;
    align-self: flex-start;
    text-decoration: none;
}

.nn-hero-main-title {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 900;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 12px;
}

.nn-hero-main-title a {
    color: inherit;
    text-decoration: none;
}

.nn-hero-main-title a:hover {
    color: var(--nn-accent-hover);
}

.nn-hero-meta-bar {
    display: flex;
    gap: 14px;
    font-family: var(--font-ui);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    flex-wrap: wrap;
}

/* Slider Controls */
.nn-slider-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.nn-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.25s ease;
}

.nn-slider-dot.is-active {
    background: var(--nn-accent);
    width: 22px;
    border-radius: 4px;
}

.nn-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.nn-slider-arrow:hover {
    background: var(--nn-accent);
    border-color: var(--nn-accent);
}

.nn-slider-prev { left: 14px; }
.nn-slider-next { right: 14px; }

/* Progress bar di bawah slider */
.nn-slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--nn-accent);
    width: 0;
    z-index: 10;
    transition: width linear;
}

/* Kanan = sub item (tetap/statik) */
.nn-hero-sub-col {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
}

.nn-hero-sub {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--nn-card);
    min-height: 0;
}

.nn-hero-sub > a {
    display: block;
    width: 100%;
    height: 100%;
}

.nn-hero-sub img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.nn-hero-sub:hover img {
    transform: scale(1.06);
}

.nn-hero-sub-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 29, 53, 0.9) 40%, transparent 90%);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.nn-hero-sub-cat {
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nn-accent-hover);
    margin-bottom: 5px;
}

.nn-hero-sub-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: auto;
}

.nn-hero-sub-title a {
    color: inherit;
    text-decoration: none;
}

.nn-hero-sub-title a:hover {
    color: var(--nn-accent-hover);
}

.nn-hero-sub-time {
    font-family: var(--font-ui);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 5px;
}


/* ================================================================
   FIX 4 — SIDEBAR & WIDGET DEFAULT WORDPRESS
   ================================================================ */

/* Base widget */
.nn-sidebar .widget,
.nn-sidebar .nn-widget {
    background: var(--nn-white);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--nn-border);
    overflow: hidden;
    margin-bottom: 0;
}

/* Widget title — global style berlaku untuk SEMUA widget */
.nn-sidebar .widget-title,
.nn-sidebar .nn-widget-title,
.nn-sidebar h2.widget-title,
.nn-sidebar h3.widget-title {
    background: var(--nn-primary);
    color: #fff;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    padding: 11px 16px;
    margin: 0;
    letter-spacing: 0.01em;
    position: relative;
}

.nn-sidebar .widget-title::after,
.nn-sidebar .nn-widget-title::after,
.nn-sidebar h2.widget-title::after,
.nn-sidebar h3.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    width: 28px;
    height: 2px;
    background: var(--nn-accent);
}

/* ── SEARCH WIDGET ─────────────────────────────────────── */
.nn-sidebar .widget_search {
    overflow: hidden;
}

.nn-sidebar .widget_search .search-form {
    padding: 14px;
    display: flex;
    gap: 0;
}

.nn-sidebar .widget_search .search-field {
    flex: 1;
    border: 1px solid var(--nn-border);
    border-right: none;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    padding: 9px 12px;
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
    color: var(--nn-text);
}

.nn-sidebar .widget_search .search-field:focus {
    border-color: var(--nn-accent);
}

.nn-sidebar .widget_search .search-submit {
    background: var(--nn-accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-ui);
    transition: background 0.2s;
    white-space: nowrap;
}

.nn-sidebar .widget_search .search-submit:hover {
    background: var(--nn-accent-hover);
}

/* ── RECENT POSTS WIDGET ───────────────────────────────── */
.nn-sidebar .widget_recent_entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nn-sidebar .widget_recent_entries ul li {
    border-bottom: 1px solid var(--nn-border);
    transition: background 0.15s;
}

.nn-sidebar .widget_recent_entries ul li:last-child {
    border-bottom: none;
}

.nn-sidebar .widget_recent_entries ul li:hover {
    background: var(--nn-bg);
}

.nn-sidebar .widget_recent_entries ul li a {
    display: block;
    padding: 11px 14px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--nn-primary);
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.15s;
}

.nn-sidebar .widget_recent_entries ul li a:hover {
    color: var(--nn-accent);
}

.nn-sidebar .widget_recent_entries ul li .post-date {
    display: block;
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--nn-text-muted);
    padding: 0 14px 10px;
    margin-top: -4px;
}

/* ── RECENT COMMENTS WIDGET ────────────────────────────── */
.nn-sidebar .widget_recent_comments ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nn-sidebar .widget_recent_comments ul li {
    padding: 11px 14px;
    border-bottom: 1px solid var(--nn-border);
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--nn-text-muted);
    line-height: 1.5;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    transition: background 0.15s;
}

.nn-sidebar .widget_recent_comments ul li:last-child {
    border-bottom: none;
}

.nn-sidebar .widget_recent_comments ul li:hover {
    background: var(--nn-bg);
}

.nn-sidebar .widget_recent_comments ul li::before {
    content: '\f27a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    color: var(--nn-accent);
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

.nn-sidebar .widget_recent_comments ul li a {
    color: var(--nn-primary);
    font-weight: 600;
    text-decoration: none;
}

.nn-sidebar .widget_recent_comments ul li a:hover {
    color: var(--nn-accent);
}

/* ── ARCHIVES WIDGET ───────────────────────────────────── */
.nn-sidebar .widget_archive ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nn-sidebar .widget_archive ul li {
    border-bottom: 1px solid var(--nn-border);
}

.nn-sidebar .widget_archive ul li:last-child {
    border-bottom: none;
}

.nn-sidebar .widget_archive ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    color: var(--nn-text);
    text-decoration: none;
    transition: all 0.15s;
}

.nn-sidebar .widget_archive ul li a::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    color: var(--nn-text-muted);
    transition: color 0.15s;
}

.nn-sidebar .widget_archive ul li a:hover {
    background: var(--nn-bg);
    color: var(--nn-accent);
    padding-left: 18px;
}

.nn-sidebar .widget_archive ul li a:hover::after {
    color: var(--nn-accent);
}

/* ── CATEGORIES WIDGET ─────────────────────────────────── */
.nn-sidebar .widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nn-sidebar .widget_categories ul li {
    border-bottom: 1px solid var(--nn-border);
}

.nn-sidebar .widget_categories ul li:last-child {
    border-bottom: none;
}

.nn-sidebar .widget_categories ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    color: var(--nn-text);
    text-decoration: none;
    transition: all 0.15s;
}

.nn-sidebar .widget_categories ul li a:hover {
    background: var(--nn-bg);
    color: var(--nn-accent);
    padding-left: 18px;
}

.nn-sidebar .widget_categories ul li .post-count,
.nn-sidebar .widget_categories ul li > span:last-child {
    background: var(--nn-bg);
    border: 1px solid var(--nn-border);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
    color: var(--nn-text-muted);
    font-family: var(--font-ui);
}

/* ── CALENDAR WIDGET ───────────────────────────────────── */
.nn-sidebar .widget_calendar {
    overflow: hidden;
}

.nn-sidebar .widget_calendar table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: var(--font-ui);
}

.nn-sidebar .widget_calendar caption {
    padding: 10px;
    font-weight: 700;
    color: var(--nn-primary);
    font-size: 13px;
}

.nn-sidebar .widget_calendar thead th {
    background: var(--nn-bg);
    padding: 7px;
    text-align: center;
    font-weight: 700;
    color: var(--nn-text-muted);
    font-size: 11px;
}

.nn-sidebar .widget_calendar tbody td {
    padding: 6px;
    text-align: center;
    color: var(--nn-text);
}

.nn-sidebar .widget_calendar tbody td a {
    color: var(--nn-accent);
    font-weight: 700;
    text-decoration: none;
}

.nn-sidebar .widget_calendar #today {
    background: var(--nn-accent);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
}

/* ── TAG CLOUD WIDGET ──────────────────────────────────── */
.nn-sidebar .widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px;
}

.nn-sidebar .widget_tag_cloud .tagcloud a {
    font-family: var(--font-ui);
    font-size: 11px !important; /* override WP inline */
    font-weight: 600;
    color: var(--nn-text-muted);
    border: 1px solid var(--nn-border);
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1;
    display: inline-block;
}

.nn-sidebar .widget_tag_cloud .tagcloud a:hover {
    background: var(--nn-accent);
    color: #fff;
    border-color: var(--nn-accent);
}

/* ── META WIDGET ───────────────────────────────────────── */
.nn-sidebar .widget_meta ul,
.nn-sidebar .widget_pages ul,
.nn-sidebar .widget_nav_menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nn-sidebar .widget_meta ul li,
.nn-sidebar .widget_pages ul li,
.nn-sidebar .widget_nav_menu ul li {
    border-bottom: 1px solid var(--nn-border);
}

.nn-sidebar .widget_meta ul li:last-child,
.nn-sidebar .widget_pages ul li:last-child,
.nn-sidebar .widget_nav_menu ul li:last-child {
    border-bottom: none;
}

.nn-sidebar .widget_meta ul li a,
.nn-sidebar .widget_pages ul li a,
.nn-sidebar .widget_nav_menu ul li a {
    display: block;
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--nn-text);
    text-decoration: none;
    transition: all 0.15s;
}

.nn-sidebar .widget_meta ul li a:hover,
.nn-sidebar .widget_pages ul li a:hover,
.nn-sidebar .widget_nav_menu ul li a:hover {
    background: var(--nn-bg);
    color: var(--nn-accent);
    padding-left: 18px;
}

/* ── TEXT / HTML WIDGET ────────────────────────────────── */
.nn-sidebar .widget_text .textwidget,
.nn-sidebar .widget_custom_html .custom-html-widget {
    padding: 14px;
    font-size: 13px;
    color: var(--nn-text);
    line-height: 1.65;
}

/* ── RSS WIDGET ────────────────────────────────────────── */
.nn-sidebar .widget_rss ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nn-sidebar .widget_rss ul li {
    padding: 11px 14px;
    border-bottom: 1px solid var(--nn-border);
    font-size: 13px;
}

.nn-sidebar .widget_rss ul li:last-child {
    border-bottom: none;
}

.nn-sidebar .widget_rss ul li a {
    color: var(--nn-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
}

.nn-sidebar .widget_rss ul li a:hover {
    color: var(--nn-accent);
}

.nn-sidebar .widget_rss ul li .rssSummary {
    font-size: 12px;
    color: var(--nn-text-muted);
    line-height: 1.5;
}

.nn-sidebar .widget_rss ul li .rss-date,
.nn-sidebar .widget_rss ul li cite {
    font-size: 11px;
    color: var(--nn-text-muted);
    font-family: var(--font-ui);
    display: block;
    margin-top: 4px;
}

/* ── GENERAL WIDGET PADDING FIX ───────────────────────── */
.nn-sidebar .widget p,
.nn-sidebar .widget ul,
.nn-sidebar .widget ol {
    margin: 0;
}

/* Widget yang belum punya title tapi perlu padding */
.nn-sidebar .widget > p:only-child,
.nn-sidebar .widget > div:not(.tagcloud):not(.search-form) {
    padding: 14px;
}

/* Remove padding dobel di search */
.nn-sidebar .widget_search > div { padding: 0; }


/* ================================================================
   FIX 5 — SIDEBAR POSITION RESPONSIVE
   ================================================================ */
.nn-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Sticky sidebar desktop */
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--nn-border) transparent;
}

.nn-sidebar::-webkit-scrollbar {
    width: 4px;
}

.nn-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.nn-sidebar::-webkit-scrollbar-thumb {
    background: var(--nn-border);
    border-radius: 2px;
}

/* ================================================================
   FIX 6 — LAYOUT GRID RESPONSIVE (menyeluruh)
   ================================================================ */
.nn-layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

/* Card grid fix */
.nn-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.nn-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* Card overflow fix */
.nn-card {
    min-width: 0;
    overflow: hidden;
}

.nn-card-title {
    word-break: break-word;
    overflow-wrap: break-word;
}

.nn-card-excerpt {
    word-break: break-word;
    overflow-wrap: break-word;
}


/* ================================================================
   FIX 7 — HEADER TOP RESPONSIVE (logo tidak overflow)
   ================================================================ */
.nn-header-top {
    overflow: hidden;
}

.nn-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.nn-branding {
    flex-shrink: 0;
    min-width: 0;
    max-width: var(--logo-w);
}

.nn-header-ad {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.nn-header-meta {
    flex-shrink: 0;
}

/* Logo lockdown */
.nn-logo-link,
.custom-logo-link {
    display: flex;
    align-items: center;
    width: var(--logo-w) !important;
    height: var(--logo-h) !important;
    max-width: var(--logo-w) !important;
    overflow: hidden;
    flex-shrink: 0;
}

.nn-logo-link img,
.custom-logo-link img,
.custom-logo-link .custom-logo {
    width: var(--logo-w) !important;
    height: var(--logo-h) !important;
    max-width: var(--logo-w) !important;
    max-height: var(--logo-h) !important;
    object-fit: contain !important;
    display: block !important;
}


/* ================================================================
   FIX 8 — SINGLE POST ARTICLE FIX
   ================================================================ */
.nn-single-wrap {
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
}

.nn-post-content {
    overflow-wrap: break-word;
    word-break: break-word;
}

.nn-post-content img {
    max-width: 100% !important;
    height: auto !important;
}

.nn-post-content pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #1A1A2E;
    color: #E2E8F0;
    padding: 16px;
    border-radius: var(--r-sm);
    font-size: 13px;
    line-height: 1.6;
}

.nn-post-content iframe {
    max-width: 100% !important;
}

/* Breadcrumb overflow */
.nn-breadcrumb-list {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Share bar overflow */
.nn-share-bar {
    flex-wrap: wrap;
}


/* ================================================================
   FIX 9 — FOOTER OVERFLOW
   ================================================================ */
.nn-footer {
    overflow: hidden;
}

.nn-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}

.nn-footer-nav a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ================================================================
   FIX 10 — BREAKING NEWS TICKER OVERFLOW
   ================================================================ */
.nn-breaking-bar {
    overflow: hidden;
    white-space: nowrap;
}

.nn-breaking-ticker-wrap {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}


/* ================================================================
   FIX 11 — AD ZONE OVERFLOW FIX
   ================================================================ */
.nn-ad-zone {
    max-width: 100%;
    overflow: hidden;
}

.nn-adbar {
    overflow: hidden;
}

.nn-adbar .nn-ad-zone {
    max-width: 100%;
    margin: 0 auto;
}


/* ================================================================
   RESPONSIVE — TABLET (≤1100px)
   ================================================================ */
@media (max-width: 1100px) {
    .nn-layout-with-sidebar {
        grid-template-columns: 1fr 280px;
        gap: 20px;
    }

    .nn-hero-grid {
        grid-template-columns: 1fr 280px;
        height: 420px;
    }

    .nn-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .nn-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ================================================================
   RESPONSIVE — TABLET (≤900px)
   ================================================================ */
@media (max-width: 900px) {
    .nn-layout-with-sidebar {
        grid-template-columns: 1fr;
    }

    .nn-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .nn-hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 140px 140px;
        height: auto;
    }

    .nn-hero-slider-wrap {
        grid-row: 1;
        grid-column: 1;
    }

    .nn-hero-sub-col {
        grid-column: 1;
        flex-direction: row;
        height: 140px;
    }

    .nn-hero-sub {
        flex: 1;
    }
}


/* ================================================================
   RESPONSIVE — MOBILE (≤768px)
   ================================================================ */
@media (max-width: 768px) {
    :root {
        --logo-w: 140px;
        --logo-h: 44px;
    }

    .nn-header-ad { display: none; }
    .nn-header-date { display: none; }

    .nn-header-inner {
        justify-content: space-between;
        gap: 12px;
    }

    /* Nav */
    .nn-nav-menu { display: none; }
    .nn-menu-toggle { display: flex; }
    .nn-nav-menu.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nn-primary);
        z-index: 9999;
        box-shadow: 0 8px 24px rgba(0,0,0,.35);
        max-height: 80vh;
        overflow-y: auto;
    }
    .nn-nav-menu.is-open > ul {
        flex-direction: column;
        width: 100%;
    }
    .nn-nav-menu.is-open > ul > li {
        border-bottom: 1px solid rgba(255,255,255,.07);
    }
    .nn-nav-menu.is-open > ul > li > a {
        padding: 14px 20px;
        border-bottom: none;
    }
    .nn-nav-menu.is-open ul ul {
        position: static;
        display: none;
        background: rgba(0,0,0,.2);
        box-shadow: none;
        border-top: none;
    }
    .nn-nav-menu.is-open ul li.open > ul {
        display: block;
    }
    .nn-nav-search { display: none; }

    /* Hero mobile */
    .nn-hero-grid {
        grid-template-rows: 260px 110px 110px;
    }

    .nn-hero-sub-col {
        flex-direction: row;
        height: 110px;
    }

    .nn-slide-overlay {
        padding: 16px;
    }

    .nn-hero-main-title {
        font-size: 16px;
    }

    .nn-slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }

    /* Grids */
    .nn-grid-3,
    .nn-grid-2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .nn-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    /* Sidebar */
    .nn-sidebar {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .nn-footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Single post */
    .nn-single-wrap {
        padding: 18px 14px;
    }

    .nn-post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Share bar */
    .nn-share-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Author box */
    .nn-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Pagination */
    .nn-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Archive header */
    .nn-archive-title { font-size: 26px; }

    /* Team */
    .nn-team-grid { grid-template-columns: repeat(2, 1fr); }

    .nn-footer-bottom-inner { flex-direction: column; text-align: center; }
    .nn-footer-bottom-links { justify-content: center; flex-wrap: wrap; }
}


/* ================================================================
   FIX 12 — SIDEBAR TAG CLOUD (custom sidebar.php)
   ================================================================ */
.nn-sidebar .widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nn-sidebar .widget_tag_cloud .tagcloud .tag-cloud-link,
.nn-sidebar .widget_tag_cloud .tagcloud a {
    font-family: var(--font-ui) !important;
    font-size: 11px !important;
    font-weight: 600;
    color: var(--nn-text-muted);
    border: 1px solid var(--nn-border);
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1;
    display: inline-block;
}

.nn-sidebar .widget_tag_cloud .tagcloud .tag-cloud-link:hover,
.nn-sidebar .widget_tag_cloud .tagcloud a:hover {
    background: var(--nn-accent);
    color: #fff !important;
    border-color: var(--nn-accent);
}

/* ── Categories post-count ────────────────────────────── */
.nn-sidebar .widget_categories ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--nn-text);
    text-decoration: none;
    transition: all 0.15s;
}

.nn-sidebar .widget_categories ul li a:hover {
    background: var(--nn-bg);
    color: var(--nn-accent);
    padding-left: 18px;
}

.nn-sidebar .widget_categories ul li a .post-count {
    background: var(--nn-bg);
    border: 1px solid var(--nn-border);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
    color: var(--nn-text-muted);
    min-width: 28px;
    text-align: center;
}

/* ── Archive list links ────────────────────────────────── */
.nn-sidebar .widget_archive ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--nn-text);
    text-decoration: none;
    transition: all 0.15s;
}

.nn-sidebar .widget_archive ul li a:hover {
    background: var(--nn-bg);
    color: var(--nn-accent);
    padding-left: 18px;
}

/* ── Sticky sidebar height fix ─────────────────────────── */
@media (min-width: 901px) {
    .nn-sidebar {
        position: sticky;
        top: 72px; /* di bawah sticky navbar */
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* ================================================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ================================================================ */
@media (max-width: 480px) {
    :root {
        --logo-w: 120px;
        --logo-h: 38px;
    }

    .nn-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .nn-hero-grid {
        grid-template-rows: 220px 100px 100px;
    }

    .nn-hero-sub-col {
        height: 100px;
    }

    .nn-related-grid {
        grid-template-columns: 1fr;
    }

    .nn-team-grid { grid-template-columns: 1fr; }

    .nn-post-title { font-size: 22px; }

    .nn-archive-header { padding: 28px 0; }

    .nn-share-bar .nn-share-label { display: none; }

    .nn-404-num { font-size: 90px; }
    .nn-404-title { font-size: 24px; }
}
