/*
Theme Name: Necveal News
Theme URI: https://necveal.com/
Author: Necveal
Description: Tema berita WordPress modern, responsif, dan super ringan (tanpa jQuery/JS di front-end) dengan slot iklan siap pakai untuk Adsterra, PropellerAds, dan jaringan sejenis (728x90 & 300x250) yang mencegah layout shift.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
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: necveal-news
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready, threaded-comments
*/

/* ==========================================================================
   1. Tokens & reset
   ========================================================================== */
:root {
  --nn-green: #2e7d32;
  --nn-green-dark: #1b5e20;
  --nn-green-soft: #a5d6a7;
  --nn-teal: #00897b;
  --nn-ink: #151a1d;
  --nn-text: #3d454b;
  --nn-muted: #707a82;
  --nn-line: #e6e8ea;
  --nn-bg: #ffffff;
  --nn-bg-soft: #f6f7f8;
  --nn-gold: #e9c46a;
  --nn-dark: #132d2e;
  --nn-radius: 10px;
  --nn-container: 1200px;
  --nn-sidebar: 300px;
  --nn-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --nn-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--nn-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--nn-text);
  background: var(--nn-bg);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--nn-green); }
h1, h2, h3, h4 { color: var(--nn-ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1.2em; }
ul { padding: 0; margin: 0; list-style: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--nn-green); outline-offset: 2px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; background: #fff; padding: 10px 16px;
  top: 8px; left: 8px; z-index: 1000; border-radius: 6px;
}
.nn-container { width: 100%; max-width: var(--nn-container); margin: 0 auto; padding: 0 16px; }

/* ==========================================================================
   2. Header
   ========================================================================== */
.site-header { background: #fff; border-bottom: 1px solid var(--nn-line); position: relative; z-index: 50; }
.site-header__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.site-branding { display: flex; align-items: center; min-width: 0; }
.custom-logo-link img { max-height: 48px; width: auto; }
.site-title { margin: 0; font-size: 26px; font-weight: 800; color: var(--nn-teal); letter-spacing: -.02em; line-height: 1; }
.site-title small { display: block; font-size: 11px; font-weight: 500; color: var(--nn-ink); letter-spacing: 0; margin-top: 3px; }

.search-form {
  position: relative; display: flex; align-items: center;
  width: 100%; max-width: 320px;
}
.search-form .nn-icon { position: absolute; left: 12px; color: var(--nn-muted); pointer-events: none; }
.search-field {
  width: 100%; height: 38px; padding: 0 14px 0 38px;
  border: 1px solid var(--nn-line); border-radius: 8px; background: var(--nn-bg-soft);
  font-size: 14px; color: var(--nn-ink);
}
.search-field:focus { background: #fff; border-color: var(--nn-green); outline: none; }

.nn-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Primary nav */
.main-nav { border-top: 1px solid var(--nn-line); }
.main-nav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav li { flex: none; position: relative; }
.main-nav a {
  display: block; padding: 14px 12px; font-size: 14px; font-weight: 600; color: var(--nn-ink); white-space: nowrap;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current-cat > a { color: var(--nn-green); }
.main-nav .sub-menu { display: none; }

/* Breaking ticker */
.ticker { background: var(--nn-green); color: #fff; overflow: hidden; }
.ticker__inner { display: flex; align-items: center; height: 38px; }
.ticker__label {
  flex: none; z-index: 2; background: rgba(255,255,255,.22); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px; margin-right: 12px; display: flex; align-items: center; gap: 6px;
}
.ticker__label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.ticker__track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
.ticker__list { display: inline-flex; white-space: nowrap; animation: nn-marquee 60s linear infinite; will-change: transform; }
.ticker:hover .ticker__list { animation-play-state: paused; }
.ticker__list a { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; padding: 0 22px; position: relative; }
.ticker__list a::after { content: ""; position: absolute; right: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: rgba(255,255,255,.55); }
.ticker__list a:hover { text-decoration: underline; color: #fff; }
@keyframes nn-marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ==========================================================================
   3. Ads (anti layout-shift)
   ========================================================================== */
.nn-ad { text-align: center; margin: 0 auto; width: 100%; max-width: 728px; overflow: hidden; }
.nn-ad__inner { display: flex; justify-content: center; align-items: flex-start; }
.nn-ad--leader .nn-ad__inner { width: 728px; height: 90px; }
.nn-ad--rect .nn-ad__inner { width: 300px; height: 250px; }
.nn-ad--leader { height: 90px; margin-top: 20px; margin-bottom: 20px; }
.nn-ad--rect { height: 250px; max-width: 300px; margin: 0 auto; }
.nn-ad--mobile { height: auto; min-height: 50px; max-width: 336px; margin: 16px auto; }
.nn-ad--mobile .nn-ad__inner { width: 100%; }
.nn-ad iframe, .nn-ad img, .nn-ad ins { max-width: 100%; }
@media (max-width: 759px) { .nn-ad--leader:not(.nn-ad--mobile) { display: none; } }
.nn-ad--placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--nn-bg-soft); border: 1px dashed #d4d8db; border-radius: var(--nn-radius);
  color: var(--nn-muted); font-size: 14px;
}
.nn-ad--placeholder b { font-size: 10px; letter-spacing: .12em; font-weight: 700; }
.nn-ad ins.adsbygoogle { display: block; }

/* ==========================================================================
   4. Hero (1 besar + 2 kecil)
   ========================================================================== */
.hero { padding-top: 20px; padding-bottom: 4px; }
.hero-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); height: 508px; }
.hero-grid .hero-card--big { grid-row: 1 / span 2; }
.hero-grid--1 { grid-template-columns: minmax(0, 1fr); }
.hero-grid--2 { grid-template-rows: minmax(0, 1fr); }
.hero-grid--2 .hero-card--big, .hero-grid--1 .hero-card--big { grid-row: auto; }

.hero-card { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--nn-dark); color: #fff; isolation: isolate; }
.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; z-index: -2; }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.2) 100%); }
.hero-card:hover img { transform: scale(1.04); }
.hero-card:hover { color: #fff; }
.hero-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 26px 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero-card__title { font-weight: 800; line-height: 1.25; font-size: 15.5px; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-card--big .hero-card__title { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.22; }
.hero-card--small .hero-card__body { padding: 14px 18px 16px; gap: 6px; }
.hero-card__date { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; opacity: .92; }
.hero-card__date .nn-icon { width: 12px; height: 12px; }

.nn-badge { display: inline-block; padding: 3px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; line-height: 1.5; color: #fff; background: var(--nn-green); }
.nn-badge--1 { background: #0d47a1; }
.nn-badge--2 { background: #e65100; }
.nn-badge--3 { background: #1d5fd0; }
.nn-badge--4 { background: #2e7d32; }
.nn-badge--5 { background: #8e24aa; }
.nn-badge--6 { background: #c62828; }

/* ==========================================================================
   5. Layout & post list
   ========================================================================== */
.site-main-wrap { display: grid; grid-template-columns: minmax(0, 1fr) var(--nn-sidebar); gap: 36px; padding: 28px 0 48px; align-items: start; }

.section-title {
  font-size: 16px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  padding: 0 0 12px; margin: 0 0 6px; border-bottom: 1px solid var(--nn-green); color: var(--nn-ink);
}

.post-item { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--nn-line); }
.post-item__thumb { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 188 / 140; background: linear-gradient(135deg, #b9d3c4, #6e9b86); }
.post-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-item:hover .post-item__thumb img { transform: scale(1.04); }
.post-item__cat { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--nn-green); margin-bottom: 4px; }
.post-item__title { font-size: 19px; margin: 0 0 6px; line-height: 1.3; }
.post-item__excerpt {
  color: var(--nn-muted); font-size: 14.5px; margin: 0 0 10px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--nn-muted); }
.post-meta .avatar { border-radius: 50%; width: 20px; height: 20px; }
.post-meta__author { display: inline-flex; align-items: center; gap: 8px; color: var(--nn-ink); font-weight: 700; }
.post-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: #aab1b6; }

/* Pagination */
.pagination { margin-top: 24px; border: 1px solid var(--nn-line); border-radius: var(--nn-radius); padding: 14px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--nn-line); border-radius: 6px; font-size: 13px; font-weight: 700; color: var(--nn-ink); background: #fff;
}
.pagination a.page-numbers:hover { border-color: var(--nn-green); color: var(--nn-green); }
.pagination .current { background: var(--nn-green); border-color: var(--nn-green); color: #fff; }
.pagination .dots { border-color: var(--nn-line); }

/* ==========================================================================
   6. Sidebar & widgets
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.sidebar .widget img, .sidebar .widget iframe { max-width: 100%; height: auto; }
.widget { border: 1px solid var(--nn-line); border-radius: var(--nn-radius); padding: 18px 18px 6px; background: #fff; }
.widget-title { font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.widget-title .nn-icon { color: var(--nn-green); width: 16px; height: 16px; }
.widget ul li { padding: 10px 0; border-bottom: 1px solid var(--nn-line); }
.widget ul li:last-child { border-bottom: 0; }

.popular { counter-reset: pop; }
.popular li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--nn-line); }
.popular li:last-child { border-bottom: 0; }
.popular li::before { counter-increment: pop; content: counter(pop); font-size: 20px; font-weight: 800; color: var(--nn-green-soft); line-height: 1.2; }
.popular__cat { display: block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--nn-green); margin-bottom: 3px; }
.popular__title { font-size: 14px; font-weight: 700; line-height: 1.55; color: var(--nn-ink); }
.popular a:hover .popular__title { color: var(--nn-green); }

/* ==========================================================================
   7. Single / page
   ========================================================================== */
.entry-header { margin-bottom: 18px; }
.entry-cat { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--nn-green); }
.entry-title { font-size: clamp(26px, 4vw, 40px); line-height: 1.18; margin: 6px 0 14px; }
.entry-thumb { margin: 0 0 22px; }
.entry-thumb img { width: 100%; border-radius: var(--nn-radius); }
.entry-thumb figcaption { font-size: 13px; color: var(--nn-muted); margin-top: 6px; }
.entry-content { font-size: 17.5px; line-height: 1.8; color: #2a3136; overflow-wrap: anywhere; }
.entry-content h2 { font-size: 26px; margin-top: 1.6em; }
.entry-content h3 { font-size: 21px; margin-top: 1.4em; }
.entry-content a { color: var(--nn-green); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--nn-green); color: var(--nn-ink); font-style: italic; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.entry-content ul { list-style: disc; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--nn-line); padding: 8px 10px; }
.alignwide, .alignfull { max-width: 100%; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption { font-size: 13px; color: var(--nn-muted); }
.entry-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-tags a { font-size: 13px; padding: 4px 12px; border: 1px solid var(--nn-line); border-radius: 999px; }
.entry-tags a:hover { border-color: var(--nn-green); }

.related { margin-top: 40px; }
.related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.related__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--nn-bg-soft); }
.related__item h3 { font-size: 15px; margin: 8px 0 0; line-height: 1.35; }

.archive-header { padding: 28px 0 4px; }
.archive-title { font-size: 28px; margin: 0; }
.archive-desc { color: var(--nn-muted); margin: 6px 0 0; }

.comments-area { margin-top: 40px; }
.comment-list { list-style: none; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--nn-line); }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--nn-line); border-radius: 8px;
}
.comment-respond .submit, .nn-btn {
  background: var(--nn-green); color: #fff; border: 0; padding: 10px 20px; border-radius: 8px; font-weight: 700; cursor: pointer;
}
.comment-respond .submit:hover, .nn-btn:hover { background: var(--nn-green-dark); color: #fff; }
.error-404 { text-align: center; padding: 60px 0; }
.error-404 h1 { font-size: 72px; color: var(--nn-green); margin: 0; }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--nn-line); margin-top: 24px; padding-top: 44px; background: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .custom-logo-link img { max-height: 70px; }
.footer-brand .site-title { font-size: 40px; }
.footer-tagline { color: var(--nn-muted); font-size: 14px; margin: 14px 0 18px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--nn-line); border-radius: 6px; color: var(--nn-muted); }
.footer-social a:hover { color: var(--nn-green); border-color: var(--nn-green); }
.footer-col h2 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: 13.5px; color: var(--nn-muted); }
.footer-col a:hover { color: var(--nn-green); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--nn-line); margin-top: 36px; padding: 18px 0 26px; font-size: 12px; color: var(--nn-muted); }

/* Kredit tema (tersembunyi secara visual, tetap ada di HTML) */
.nn-credit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .site-main-wrap { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .site-header__top { flex-wrap: wrap; padding: 12px 0; }
  .search-form { max-width: none; }
  .hero { padding-top: 12px; }
  .hero-grid, .hero-grid--1, .hero-grid--2 { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 10px; }
  .hero-grid .hero-card--big { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 11; }
  .hero-grid .hero-card--small { aspect-ratio: 1 / 1; }
  .hero-card__body { padding: 14px 16px 16px; }
  .hero-card--big .hero-card__title { font-size: 19px; }
  .hero-card--small .hero-card__body { padding: 10px 12px 12px; }
  .hero-card--small .hero-card__title { font-size: 13px; -webkit-line-clamp: 3; }
  .hero-card--small .nn-badge { font-size: 11px; padding: 2px 8px; }
  .post-item { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .post-item__title { font-size: 16px; }
  .post-item__excerpt { display: none; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .related__grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .entry-content { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__list { animation: none; }
  html { scroll-behavior: auto; }
  .post-item__thumb img { transition: none; }
}
@media print {
  .site-header, .ticker, .sidebar, .site-footer, .nn-ad, .related, .comments-area { display: none !important; }
  .site-main-wrap { display: block; }
}
