/*
Theme Name: NusaNews
Author: Fajrin
Description: Tema portal berita Indonesia yang ringan, responsif, dan mudah disesuaikan. Dibangun dengan kode orisinal berdasarkan pola tata letak portal berita modern.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nusanews
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --nn-accent: #d71920;
  --nn-accent-dark: #a90d15;
  --nn-header: #0b0d10;
  --nn-bg: #ffffff;
  --nn-surface: #ffffff;
  --nn-soft: #f4f5f7;
  --nn-text: #17191e;
  --nn-muted: #737781;
  --nn-line: #e5e7eb;
  --nn-footer: #0d1015;
  --nn-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --nn-radius: 8px;
  --nn-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--nn-bg);
  color: var(--nn-text);
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nn-dark {
  --nn-bg: #111318;
  --nn-surface: #191c22;
  --nn-soft: #20242b;
  --nn-text: #f4f5f7;
  --nn-muted: #a8adb7;
  --nn-line: #30343d;
  --nn-shadow: 0 10px 30px rgba(0,0,0,.22);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--nn-accent); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.nn-container { width: min(calc(100% - 32px), var(--nn-container)); margin-inline: auto; }
.nn-main { min-height: 55vh; }

/* Ads */
.nn-ad { display:grid; place-items:center; min-height:90px; margin:22px auto; border:1px dashed #c8cbd1; background:var(--nn-soft); color:var(--nn-muted); font-size:12px; letter-spacing:.12em; text-transform:uppercase; overflow:hidden; }
.nn-ad > * { max-width:100%; }
.nn-ad--top { min-height:120px; margin-top:16px; }
.nn-ad:empty::before { content:'Advertisement'; }

/* Header */
.nn-site-header { position:relative; z-index:50; background:var(--nn-header); color:#fff; border-bottom:3px solid var(--nn-accent); }
.nn-header-main { min-height:76px; display:flex; align-items:center; gap:22px; }
.nn-brand { flex:0 0 auto; max-width:205px; }
.nn-brand .custom-logo-link { display:block; }
.nn-brand .custom-logo { width:auto; max-height:44px; }
.nn-brand-text { display:inline-flex; align-items:baseline; font-weight:900; font-size:29px; line-height:1; letter-spacing:-1.4px; }
.nn-brand-text em { color:var(--nn-accent); font-style:normal; }
.nn-primary-nav { flex:1 1 auto; min-width:0; }
.nn-primary-nav ul { list-style:none; display:flex; align-items:center; gap:2px; margin:0; padding:0; }
.nn-primary-nav li { position:relative; }
.nn-primary-nav a { display:block; padding:27px 10px 24px; color:#f1f3f5; font-size:14px; font-weight:700; white-space:nowrap; }
.nn-primary-nav li:hover > a, .nn-primary-nav .current-menu-item > a { color:#fff; background:rgba(255,255,255,.07); }
.nn-primary-nav .sub-menu { display:none; position:absolute; top:100%; left:0; min-width:210px; padding:8px; border-top:3px solid var(--nn-accent); background:#171a20; box-shadow:var(--nn-shadow); }
.nn-primary-nav li:hover > .sub-menu { display:block; }
.nn-primary-nav .sub-menu a { padding:10px 12px; }
.nn-header-actions { display:flex; align-items:center; gap:6px; margin-left:auto; }
.nn-icon-button { width:40px; height:40px; display:grid; place-items:center; border:0; border-radius:50%; background:transparent; color:#fff; }
.nn-icon-button:hover { background:rgba(255,255,255,.1); }
.nn-icon-button svg { width:21px; height:21px; }
.nn-menu-toggle { display:none; }
.nn-search-panel { display:none; position:absolute; inset:100% 0 auto; background:#15181e; border-bottom:1px solid rgba(255,255,255,.1); box-shadow:0 14px 30px rgba(0,0,0,.22); }
.nn-search-panel.is-open { display:block; }
.nn-search-form { display:flex; gap:8px; padding:18px 0; }
.nn-search-form input[type=search] { flex:1; min-width:0; border:1px solid #3a3f49; border-radius:5px; padding:12px 14px; background:#fff; color:#111; }
.nn-search-form button { border:0; border-radius:5px; padding:0 22px; background:var(--nn-accent); color:#fff; font-weight:700; }
.nn-trending { background:#fff; color:#24262b; border-bottom:1px solid var(--nn-line); }
body.nn-dark .nn-trending { background:var(--nn-surface); color:var(--nn-text); }
.nn-trending-inner { min-height:42px; display:flex; align-items:center; gap:15px; overflow:hidden; }
.nn-trending-label { flex:0 0 auto; color:var(--nn-accent); font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.nn-trending ul { list-style:none; display:flex; align-items:center; gap:22px; margin:0; padding:0; overflow:auto; scrollbar-width:none; }
.nn-trending li { flex:0 0 auto; }
.nn-trending a { font-size:13px; font-weight:600; }

/* Common components */
.nn-section { margin:32px 0; }
.nn-hero-layout > *, .nn-content-layout > *, .nn-featured-main > *, .nn-featured-secondary > *, .nn-small-card > *, .nn-grid > *, .nn-list-item > *, .nn-recent-item > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
.nn-section-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; border-bottom:1px solid var(--nn-line); }
.nn-section-title { position:relative; margin:0; padding:0 0 11px; font-size:22px; line-height:1.15; font-weight:900; letter-spacing:-.35px; }
.nn-section-title::after { content:''; position:absolute; left:0; bottom:-1px; width:58px; height:3px; background:var(--nn-accent); }
.nn-more-link { color:var(--nn-muted); font-size:13px; font-weight:700; }
.nn-category { display:inline-block; color:var(--nn-accent); font-size:12px; line-height:1.25; font-weight:800; text-transform:uppercase; letter-spacing:.055em; }
.nn-time { color:var(--nn-muted); font-size:12px; }
.nn-thumb { position:relative; overflow:hidden; background:linear-gradient(135deg,#d9dde4,#f0f2f5); }
.nn-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
a:hover .nn-thumb img, .nn-card:hover .nn-thumb img { transform:scale(1.035); }
.nn-placeholder { width:100%; height:100%; display:grid; place-items:center; min-height:110px; color:#8b9099; background:linear-gradient(135deg,#e5e7eb,#f7f7f8); }
body.nn-dark .nn-placeholder { background:linear-gradient(135deg,#262a31,#1d2026); }

/* Hero */
.nn-hero { margin:26px 0 30px; }
.nn-hero-layout { display:grid; grid-template-columns:minmax(0, 2.1fr) minmax(270px, .9fr); gap:28px; }
.nn-featured-main { display:grid; grid-template-columns:minmax(250px, .88fr) minmax(0, 1.2fr); min-height:370px; background:var(--nn-surface); border:1px solid var(--nn-line); border-radius:var(--nn-radius); overflow:hidden; box-shadow:var(--nn-shadow); }
.nn-featured-main .nn-featured-copy { display:flex; flex-direction:column; justify-content:center; padding:34px; }
.nn-featured-main .nn-thumb { order:2; min-height:370px; }
.nn-featured-main h1, .nn-featured-main h2 { margin:8px 0 12px; font-size:34px; line-height:1.12; letter-spacing:-.85px; }
.nn-featured-main p { margin:0; color:var(--nn-muted); font-size:14px; }
.nn-featured-secondary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:18px; }
.nn-small-card { display:grid; grid-template-columns:112px minmax(0,1fr); gap:13px; align-items:center; }
.nn-small-card .nn-thumb { width:112px; aspect-ratio:1/1; border-radius:6px; }
.nn-small-card h3 { margin:4px 0; font-size:16px; line-height:1.28; }
.nn-popular-panel { border-left:1px solid var(--nn-line); padding-left:25px; }
.nn-popular-list { list-style:none; margin:0; padding:0; }
.nn-popular-item { display:grid; grid-template-columns:42px minmax(0,1fr); gap:12px; padding:14px 0; border-bottom:1px solid var(--nn-line); }
.nn-popular-item:first-child { padding-top:0; }
.nn-popular-number { color:#c8cbd0; font-size:26px; font-weight:300; line-height:1; }
.nn-popular-item h3 { margin:0 0 5px; font-size:15px; line-height:1.3; }

/* Cards and lists */
.nn-grid { display:grid; gap:22px; }
.nn-grid--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.nn-grid--4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.nn-grid--6 { grid-template-columns:repeat(6,minmax(0,1fr)); gap:16px; }
.nn-card .nn-thumb { aspect-ratio:16/9; border-radius:6px; }
.nn-card h3 { margin:9px 0 5px; font-size:17px; line-height:1.28; letter-spacing:-.15px; }
.nn-grid--6 .nn-card h3 { font-size:14px; }
.nn-content-layout { display:grid; grid-template-columns:minmax(0, 2fr) minmax(290px, .82fr); gap:36px; align-items:start; margin:34px 0 50px; }
.nn-news-list { display:flex; flex-direction:column; }
.nn-list-item { display:grid; grid-template-columns:260px minmax(0,1fr); gap:22px; padding:20px 0; border-bottom:1px solid var(--nn-line); }
.nn-list-item:first-child { padding-top:0; }
.nn-list-item .nn-thumb { aspect-ratio:16/9; border-radius:6px; }
.nn-list-item h2, .nn-list-item h3 { margin:5px 0 8px; font-size:22px; line-height:1.25; letter-spacing:-.3px; }
.nn-list-item p { margin:0 0 9px; color:var(--nn-muted); font-size:14px; }
.nn-meta-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; color:var(--nn-muted); font-size:12px; }
.nn-meta-row > * + *::before { content:'•'; margin-right:8px; }
.nn-pagination { margin-top:26px; }
.nn-pagination .nav-links { display:flex; flex-wrap:wrap; gap:7px; }
.nn-pagination .page-numbers { min-width:38px; height:38px; display:grid; place-items:center; padding:0 10px; border:1px solid var(--nn-line); border-radius:4px; background:var(--nn-surface); }
.nn-pagination .current, .nn-pagination a:hover { border-color:var(--nn-accent); background:var(--nn-accent); color:#fff; }

/* Sidebar */
.nn-sidebar { position:relative; }
.nn-sidebar-widget { margin-bottom:30px; }
.nn-sidebar .widget { margin-bottom:30px; }
.nn-sidebar ul { padding-left:18px; }
.nn-sidebar select, .nn-sidebar input { max-width:100%; }
.nn-recent-item { display:grid; grid-template-columns:90px minmax(0,1fr); gap:12px; padding:12px 0; border-bottom:1px solid var(--nn-line); }
.nn-recent-item .nn-thumb { aspect-ratio:1/1; border-radius:5px; }
.nn-recent-item h3 { margin:2px 0 5px; font-size:14px; line-height:1.3; }
.nn-opinion-item { padding:15px 0; border-bottom:1px solid var(--nn-line); }
.nn-opinion-item h3 { margin:0 0 8px; font-size:16px; line-height:1.3; }
.nn-author-mini { display:flex; align-items:center; gap:9px; color:var(--nn-muted); font-size:12px; }
.nn-author-mini img { width:30px; height:30px; border-radius:50%; }

/* Single article */
.nn-breadcrumb { display:flex; flex-wrap:wrap; gap:7px; margin:25px 0 22px; color:var(--nn-muted); font-size:13px; }
.nn-breadcrumb span::after { content:'/'; margin-left:7px; color:#b7bac0; }
.nn-breadcrumb span:last-child::after { display:none; }
.nn-article-header { margin-bottom:20px; }
.nn-article-title { max-width:850px; margin:6px 0 13px; font-size:43px; line-height:1.13; letter-spacing:-1px; }
.nn-article-subtitle { max-width:800px; margin:0 0 14px; color:var(--nn-muted); font-size:18px; }
.nn-byline { display:flex; flex-wrap:wrap; align-items:center; gap:9px; color:var(--nn-muted); font-size:13px; }
.nn-byline img { width:34px; height:34px; border-radius:50%; }
.nn-share-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:18px 0; }
.nn-share-label { margin-right:4px; font-size:13px; font-weight:800; }
.nn-share-button { width:39px; height:39px; display:grid; place-items:center; border:1px solid var(--nn-line); border-radius:50%; background:var(--nn-surface); color:var(--nn-text); }
.nn-share-button:hover { border-color:var(--nn-accent); background:var(--nn-accent); color:#fff; }
.nn-share-button svg { width:17px; height:17px; }
.nn-featured-image { margin:20px 0 8px; overflow:hidden; border-radius:7px; }
.nn-featured-image img { width:100%; }
.nn-image-caption { margin:7px 0 22px; color:var(--nn-muted); font-size:12px; }
.nn-article-content { font-family:Georgia, 'Times New Roman', serif; font-size:19px; line-height:1.78; }
.nn-article-content > * { max-width:100%; }
.nn-article-content p { margin:0 0 1.25em; }
.nn-article-content h2, .nn-article-content h3, .nn-article-content h4 { font-family:Roboto,Arial,sans-serif; line-height:1.25; margin:1.5em 0 .65em; }
.nn-article-content blockquote { margin:1.5em 0; padding:18px 24px; border-left:4px solid var(--nn-accent); background:var(--nn-soft); font-size:1.05em; font-style:italic; }
.nn-article-content a { color:var(--nn-accent); text-decoration:underline; }
.nn-article-content img { border-radius:5px; }
.nn-article-content table { width:100%; border-collapse:collapse; font-family:Roboto,Arial,sans-serif; font-size:15px; }
.nn-article-content th, .nn-article-content td { border:1px solid var(--nn-line); padding:9px 11px; }
.nn-tags { display:flex; flex-wrap:wrap; gap:7px; margin:26px 0; }
.nn-tags a { padding:6px 11px; border-radius:4px; background:var(--nn-soft); color:var(--nn-text); font-size:12px; font-weight:700; }
.nn-author-box { display:grid; grid-template-columns:72px minmax(0,1fr); gap:16px; padding:20px; margin:28px 0; border:1px solid var(--nn-line); border-radius:7px; background:var(--nn-surface); }
.nn-author-box img { width:72px; height:72px; border-radius:50%; }
.nn-author-box h3 { margin:0 0 5px; }
.nn-author-box p { margin:0; color:var(--nn-muted); font-size:14px; }

/* Comments */
.comments-area { margin:38px 0; }
.comments-title { font-size:22px; }
.comment-list { list-style:none; padding:0; }
.comment-body { padding:18px 0; border-bottom:1px solid var(--nn-line); }
.comment-author { display:flex; align-items:center; gap:10px; }
.comment-author img { border-radius:50%; }
.comment-metadata { margin:6px 0; color:var(--nn-muted); font-size:12px; }
.comment-content { font-size:15px; }
.comment-reply-link { color:var(--nn-accent); font-size:13px; font-weight:700; }
.comment-form { display:grid; gap:12px; }
.comment-form p { margin:0; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width:100%; border:1px solid var(--nn-line); border-radius:5px; padding:12px 13px; background:var(--nn-surface); color:var(--nn-text); }
.comment-form .submit { border:0; border-radius:5px; padding:11px 20px; background:var(--nn-accent); color:#fff; font-weight:800; }

/* Footer */
.nn-footer { margin-top:50px; background:var(--nn-footer); color:#d8dbe0; border-top:4px solid var(--nn-accent); }
.nn-footer-top { min-height:92px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(255,255,255,.12); }
.nn-footer-brand { font-size:28px; font-weight:900; color:#fff; letter-spacing:-1px; }
.nn-footer-brand em { color:var(--nn-accent); font-style:normal; }
.nn-to-top { width:40px; height:40px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.2); border-radius:50%; background:transparent; color:#fff; }
.nn-footer-grid { display:grid; grid-template-columns:1.3fr .8fr .8fr; gap:48px; padding:34px 0; }
.nn-footer h3 { margin:0 0 15px; color:#fff; font-size:16px; }
.nn-footer p { color:#aeb3bc; font-size:14px; }
.nn-footer ul { list-style:none; margin:0; padding:0; }
.nn-footer li { margin:7px 0; }
.nn-footer a { color:#cdd1d7; font-size:14px; }
.nn-socials { display:flex; flex-wrap:wrap; gap:9px; }
.nn-socials a { width:37px; height:37px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.08); }
.nn-socials svg { width:16px; height:16px; }
.nn-footer-bottom { padding:17px 0; border-top:1px solid rgba(255,255,255,.1); color:#969ca6; font-size:12px; }

/* Gutenberg alignments */
.alignwide { margin-left:auto; margin-right:auto; max-width:1100px; }
.alignfull { width:100vw; margin-left:calc(50% - 50vw); }
.wp-caption { max-width:100%; }
.sticky { outline:0; }
.bypostauthor { outline:0; }

/* Responsive */
@media (max-width: 1050px) {
  .nn-primary-nav { display:none; position:absolute; top:100%; left:0; right:0; background:#15181e; border-top:1px solid rgba(255,255,255,.1); }
  .nn-primary-nav.is-open { display:block; }
  .nn-primary-nav ul { display:block; padding:10px 16px 18px; }
  .nn-primary-nav a { padding:11px 10px; }
  .nn-primary-nav .sub-menu { position:static; display:block; padding:0 0 0 15px; border:0; background:transparent; box-shadow:none; }
  .nn-menu-toggle { display:grid; }
  .nn-hero-layout, .nn-content-layout { grid-template-columns:1fr; }
  .nn-popular-panel { border-left:0; border-top:1px solid var(--nn-line); padding:24px 0 0; }
  .nn-sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  .nn-sidebar-widget, .nn-sidebar .widget { margin:0; }
  .nn-grid--6 { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .nn-container { width:min(calc(100% - 22px), var(--nn-container)); }
  .nn-header-main { min-height:62px; }
  .nn-brand-text { font-size:24px; }
  .nn-icon-button { width:37px; height:37px; }
  .nn-trending-inner { min-height:39px; }
  .nn-featured-main { grid-template-columns:1fr; }
  .nn-featured-main .nn-thumb { order:0; min-height:240px; aspect-ratio:16/10; }
  .nn-featured-main .nn-featured-copy { padding:22px; }
  .nn-featured-main h1, .nn-featured-main h2 { font-size:27px; }
  .nn-featured-secondary { grid-template-columns:1fr; }
  .nn-grid--3, .nn-grid--4 { grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px; }
  .nn-grid--6 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .nn-list-item { grid-template-columns:135px minmax(0,1fr); gap:14px; }
  .nn-list-item h2, .nn-list-item h3 { font-size:17px; margin-top:3px; }
  .nn-list-item p { display:none; }
  .nn-sidebar { grid-template-columns:1fr; }
  .nn-article-title { font-size:33px; }
  .nn-article-subtitle { font-size:16px; }
  .nn-article-content { font-size:18px; line-height:1.72; }
  .nn-footer-grid { grid-template-columns:1fr; gap:24px; }
}
@media (max-width: 480px) {
  .nn-ad--top { min-height:85px; }
  .nn-header-actions .nn-mode-toggle { display:none; }
  .nn-grid--3, .nn-grid--4, .nn-grid--6 { grid-template-columns:1fr 1fr; gap:14px; }
  .nn-card h3, .nn-grid--6 .nn-card h3 { font-size:14px; }
  .nn-small-card { grid-template-columns:90px minmax(0,1fr); }
  .nn-small-card .nn-thumb { width:90px; }
  .nn-list-item { grid-template-columns:112px minmax(0,1fr); }
  .nn-list-item h2, .nn-list-item h3 { font-size:15px; }
  .nn-list-item .nn-time { display:none; }
  .nn-article-title { font-size:29px; }
  .nn-author-box { grid-template-columns:56px minmax(0,1fr); }
  .nn-author-box img { width:56px; height:56px; }
}
