/*
Theme Name: NusaPress
Theme URI: https://example.com/nusapress
Author: NusaPress Studio
Description: Tema portal berita Indonesia yang cepat, responsif, modern, dan mudah dikustomisasi.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 7.0
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: nusapress
Tags: news, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
	--np-primary: #1746a2;
	--np-primary-dark: #0c2f78;
	--np-accent: #f04a3a;
	--np-ink: #172033;
	--np-muted: #667085;
	--np-line: #e7eaf0;
	--np-surface: #ffffff;
	--np-soft: #f5f7fb;
	--np-radius: 16px;
	--np-shadow: 0 14px 40px rgba(26, 39, 72, .09);
	--np-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	color: var(--np-ink);
	background: var(--np-surface);
	font-family: Inter, "Segoe UI", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}
body.np-dark {
	--np-ink: #f4f6fa;
	--np-muted: #a9b1c1;
	--np-line: #283249;
	--np-surface: #101522;
	--np-soft: #171e2e;
	--np-shadow: 0 14px 40px rgba(0, 0, 0, .25);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
	top: 8px; left: 8px; z-index: 99999; width: auto; height: auto; padding: 12px 16px;
	clip: auto; color: var(--np-ink); background: var(--np-surface); border-radius: 8px;
}
.np-container { width: min(calc(100% - 32px), var(--np-container)); margin-inline: auto; }
.np-section { padding: 28px 0; }
.np-section--soft { background: var(--np-soft); }

.np-topbar { color: #e9efff; background: var(--np-primary-dark); font-size: 12px; }
.np-topbar__inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.np-topbar__links { display: flex; gap: 18px; }
.np-topbar a:hover { color: #fff; }
.np-header { position: relative; z-index: 50; background: var(--np-surface); border-bottom: 1px solid var(--np-line); }
.np-header__main { min-height: 92px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; }
.np-brand { display: inline-flex; align-items: center; gap: 10px; }
.np-brand__mark {
	display: grid; place-items: center; width: 42px; height: 42px; color: #fff;
	background: linear-gradient(135deg, var(--np-primary), #3b82f6); border-radius: 12px;
	font-weight: 900; font-style: italic; box-shadow: 0 8px 22px rgba(23, 70, 162, .25);
}
.np-brand__name { color: var(--np-primary); font-size: 29px; font-weight: 900; letter-spacing: -1.4px; line-height: 1; }
.np-brand__name span { color: var(--np-accent); }
.custom-logo { width: auto; max-height: 52px; }
.np-header__ad {
	justify-self: center; width: min(100%, 500px); padding: 11px 20px; color: var(--np-muted);
	background: var(--np-soft); border: 1px dashed #c8cfdb; border-radius: 10px; text-align: center; font-size: 11px;
}
.np-actions { display: flex; align-items: center; gap: 8px; }
.np-icon-button {
	display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: var(--np-ink);
	background: var(--np-soft); border: 0; border-radius: 50%;
}
.np-icon-button:hover, .np-icon-button:focus-visible { color: #fff; background: var(--np-primary); }
.np-icon-button:focus-visible, .np-search-form input:focus-visible, .comment-form input:focus-visible, .comment-form textarea:focus-visible {
	outline: 3px solid rgba(23, 70, 162, .28);
	outline-offset: 2px;
}
.np-icon-button svg { width: 20px; height: 20px; }
.np-menu-toggle { display: none; }
.np-nav-wrap { background: linear-gradient(90deg, var(--np-primary-dark), var(--np-primary)); }
.np-nav { display: flex; align-items: center; min-height: 48px; }
.np-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.np-nav li { position: relative; }
.np-nav a { display: block; padding: 13px 14px; color: #fff; font-size: 14px; font-weight: 700; }
.np-nav a:hover, .np-nav a:focus-visible, .np-nav .current-menu-item > a { background: rgba(255, 255, 255, .13); }
.np-nav .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 80; display: none; min-width: 210px; padding: 8px;
	background: var(--np-primary-dark); border-radius: 0 0 12px 12px; box-shadow: 0 18px 35px rgba(0, 0, 0, .18);
}
.np-nav li:hover > .sub-menu, .np-nav li:focus-within > .sub-menu { display: block; }
.np-nav .sub-menu a { padding: 10px 12px; border-radius: 8px; white-space: nowrap; }

.np-search-panel { display: none; padding: 18px 0; background: var(--np-surface); border-bottom: 1px solid var(--np-line); }
.np-search-panel.is-open { display: block; }
.np-search-form { display: flex; gap: 8px; }
.np-search-form input {
	flex: 1; min-width: 0; padding: 13px 16px; color: var(--np-ink); background: var(--np-soft);
	border: 1px solid var(--np-line); border-radius: 10px;
}
.np-search-form button, .np-button {
	padding: 12px 20px; color: #fff; background: var(--np-primary); border: 0; border-radius: 10px; font-weight: 800;
}
.np-search-form button:hover, .np-button:hover { background: var(--np-primary-dark); }

.np-ticker { background: var(--np-surface); border-bottom: 1px solid var(--np-line); }
.np-ticker__inner { display: flex; align-items: center; min-height: 46px; overflow: hidden; }
.np-ticker__label {
	flex: 0 0 auto; margin-right: 16px; padding: 6px 11px; color: #fff; background: var(--np-accent);
	border-radius: 6px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px;
}
.np-ticker__items { display: flex; gap: 34px; overflow: hidden; white-space: nowrap; font-size: 13px; font-weight: 700; }
.np-ticker__items a::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; background: var(--np-accent); border-radius: 50%; vertical-align: 1px; }
.np-ticker__items a:hover { color: var(--np-primary); }

.np-ad-slot {
	display: grid; place-items: center; min-height: 90px; color: #9299a8; background: var(--np-soft);
	border: 1px dashed #c8cfdb; border-radius: 12px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
}
.np-hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 22px; }
.np-story { position: relative; overflow: hidden; border-radius: var(--np-radius); }
.np-story__media { position: relative; display: block; overflow: hidden; background: linear-gradient(135deg, #dbe7fb, #eef2f8); }
.np-story__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 18, 42, .82), transparent 70%); }
.np-story__media img, .np-story__media svg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.np-story:hover img { transform: scale(1.035); }
.np-story--lead .np-story__media { aspect-ratio: 16 / 10; }
.np-story__content { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; padding: clamp(20px, 4vw, 38px); color: #fff; }
.np-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--np-accent); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; }
.np-story .np-kicker { color: #fff; }
.np-story__title { max-width: 760px; margin: 10px 0; font-size: clamp(26px, 3.3vw, 44px); line-height: 1.12; letter-spacing: -1.2px; }
.np-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--np-muted); font-size: 12px; }
.np-story .np-meta { color: rgba(255, 255, 255, .82); }
.np-hero-side { display: grid; gap: 16px; }
.np-story--small .np-story__media { aspect-ratio: 16 / 9; }
.np-story--small .np-story__content { padding: 18px; }
.np-story--small .np-story__title { margin: 7px 0 0; font-size: 19px; line-height: 1.25; letter-spacing: -.3px; }

.np-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.np-heading__title { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: -.6px; }
.np-heading__title::before { content: ""; display: inline-block; width: 5px; height: 24px; margin-right: 10px; background: var(--np-accent); border-radius: 4px; vertical-align: -4px; }
.np-heading__link { color: var(--np-primary); font-size: 13px; font-weight: 800; }
.np-heading__link:hover { color: var(--np-accent); }
.np-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.np-card { min-width: 0; }
.np-card__image { display: block; overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 12px; background: #dfe7f4; border-radius: 12px; }
.np-card__image img, .np-card__image svg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.np-card:hover img { transform: scale(1.04); }
.np-card__title { margin: 6px 0 8px; font-size: 17px; line-height: 1.36; letter-spacing: -.2px; }
.np-card__title a:hover, .np-list-item__title a:hover { color: var(--np-primary); }

.np-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; align-items: start; }
.np-news-list { display: grid; }
.np-list-item { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--np-line); }
.np-list-item:first-child { padding-top: 0; }
.np-list-item__image { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: #dfe7f4; border-radius: 12px; }
.np-list-item__image img, .np-list-item__image svg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.np-list-item:hover img { transform: scale(1.03); }
.np-list-item__title { margin: 5px 0 7px; font-size: 21px; line-height: 1.28; letter-spacing: -.35px; }
.np-list-item__excerpt { margin: 8px 0 0; color: var(--np-muted); font-size: 14px; line-height: 1.55; }

.np-sidebar { display: grid; gap: 24px; }
.np-widget { padding: 20px; background: var(--np-surface); border: 1px solid var(--np-line); border-radius: var(--np-radius); box-shadow: var(--np-shadow); }
.np-widget__title, .widget-title { margin: 0 0 16px; font-size: 19px; }
.np-widget__note { grid-column: 1 / -1; margin: 0; color: var(--np-muted); font-size: 13px; line-height: 1.5; }
.np-widget ul { margin: 0; padding: 0; list-style: none; }
.np-widget li { padding: 10px 0; border-bottom: 1px solid var(--np-line); }
.np-widget li:last-child { border-bottom: 0; }
.np-popular { counter-reset: popular; }
.np-popular__item { counter-increment: popular; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--np-line); }
.np-popular__item::before { content: counter(popular, decimal-leading-zero); color: var(--np-primary); font-size: 21px; font-weight: 900; line-height: 1.25; }
.np-popular__item:last-child { border-bottom: 0; }
.np-popular__title { margin: 0; font-size: 14px; line-height: 1.42; }
.np-social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.np-social-link { padding: 10px; color: #fff; background: var(--np-primary); border-radius: 9px; text-align: center; font-size: 12px; font-weight: 800; }
.np-social-link:nth-child(2) { background: #111827; }
.np-social-link:nth-child(3) { background: #e1306c; }
.np-social-link:nth-child(4) { background: #ff0000; }

.np-breadcrumbs { padding: 18px 0; color: var(--np-muted); font-size: 12px; }
.np-breadcrumbs a:hover { color: var(--np-primary); }
.np-archive-header { padding: 26px; margin-bottom: 25px; background: var(--np-soft); border-radius: var(--np-radius); }
.np-archive-header h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.2; }
.np-archive-header p { margin: 0; color: var(--np-muted); }
.np-pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 28px; }
.np-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.np-pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; background: var(--np-soft); border-radius: 8px; font-weight: 700; }
.np-pagination .current, .np-pagination a:hover { color: #fff; background: var(--np-primary); }

.np-article { min-width: 0; }
.np-article__header { margin-bottom: 22px; }
.np-article__title { margin: 8px 0 14px; font-size: clamp(34px, 5vw, 54px); line-height: 1.1; letter-spacing: -1.5px; }
.np-article__dek { margin: 0 0 18px; color: var(--np-muted); font-size: 19px; line-height: 1.55; }
.np-author { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.np-author img { border-radius: 50%; }
.np-author__name { font-size: 13px; font-weight: 800; }
.np-featured-image { overflow: hidden; margin: 22px 0 8px; border-radius: var(--np-radius); }
.np-featured-image img { width: 100%; }
.np-caption { color: var(--np-muted); font-size: 11px; }
.np-article-layout { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 22px; }
.np-share { position: sticky; top: 18px; align-self: start; display: grid; gap: 8px; }
.np-share a { display: grid; place-items: center; width: 42px; height: 42px; color: var(--np-primary); background: var(--np-soft); border-radius: 50%; font-size: 12px; font-weight: 900; }
.np-share a:hover { color: #fff; background: var(--np-primary); }
.np-entry-content { font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.9; }
.np-entry-content > * { max-width: 100%; }
.np-entry-content p { margin: 0 0 1.45em; }
.np-entry-content h2, .np-entry-content h3 { margin: 1.5em 0 .6em; font-family: Inter, "Segoe UI", sans-serif; line-height: 1.25; }
.np-entry-content a { color: var(--np-primary); text-decoration: underline; }
.np-entry-content blockquote { margin: 1.6em 0; padding: 22px 25px; background: var(--np-soft); border-left: 5px solid var(--np-accent); font-size: 21px; font-style: italic; }
.np-entry-content img { border-radius: 12px; }
.np-entry-content figure { margin: 1.6em 0; }
.np-entry-content iframe, .np-entry-content video { width: 100%; max-width: 100%; }
.np-entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-family: Inter, "Segoe UI", sans-serif; font-size: 15px; }
.np-entry-content th, .np-entry-content td { padding: 10px 12px; border: 1px solid var(--np-line); }
.np-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.np-tags a { padding: 6px 10px; background: var(--np-soft); border-radius: 7px; font-size: 12px; font-weight: 700; }
.np-post-nav { margin: 28px 0; }
.np-post-nav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.np-post-nav .nav-previous, .np-post-nav .nav-next { min-width: 0; }
.np-post-nav a { display: block; min-height: 100%; padding: 16px; background: var(--np-soft); border-radius: 12px; font-size: 13px; font-weight: 700; }
.np-post-nav a span { display: block; margin-bottom: 4px; color: var(--np-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.np-post-nav .nav-next { text-align: right; }

.comments-area { margin-top: 30px; }
.comment-list { padding: 0; list-style: none; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--np-line); }
.comment-author img { float: left; margin-right: 10px; border-radius: 50%; }
.comment-meta { font-size: 12px; }
.comment-content { clear: both; padding-top: 8px; }
.comment-form input:not([type="submit"]), .comment-form textarea {
	width: 100%; padding: 12px; color: var(--np-ink); background: var(--np-soft); border: 1px solid var(--np-line); border-radius: 8px;
}
.comment-form .submit { padding: 12px 18px; color: #fff; background: var(--np-primary); border: 0; border-radius: 8px; font-weight: 800; }

.np-empty { padding: 50px 20px; text-align: center; }
.np-empty h1 { margin-bottom: 8px; font-size: 42px; }
.np-footer { margin-top: 36px; color: #cfd7e8; background: #0b1732; }
.np-footer__main { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 34px; padding: 50px 0 38px; }
.np-footer .np-brand__name { color: #fff; }
.np-footer__about { margin: 16px 0; color: #aeb8cc; font-size: 14px; }
.np-footer h3 { margin: 0 0 14px; color: #fff; font-size: 15px; }
.np-footer ul { margin: 0; padding: 0; list-style: none; }
.np-footer li { margin: 8px 0; }
.np-footer a { color: #aeb8cc; font-size: 13px; }
.np-footer a:hover { color: #fff; }
.np-footer .np-widget { padding: 0; background: transparent; border: 0; box-shadow: none; }
.np-footer .widget-title { color: #fff; font-size: 15px; }
.np-footer__bottom { padding: 17px 0; border-top: 1px solid rgba(255, 255, 255, .1); color: #8792aa; font-size: 12px; }
.alignwide { max-width: 1100px; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 32px); }
.alignfull { max-width: none; margin-left: calc(50% - 50vw); width: 100vw; }

@media (max-width: 980px) {
	.np-header__ad { display: none; }
	.np-header__main { grid-template-columns: 1fr auto; min-height: 74px; }
	.np-menu-toggle { display: grid; }
	.np-nav-wrap { display: none; }
	.np-nav-wrap.is-open { display: block; }
	.np-nav { padding: 8px 0; }
	.np-nav ul { width: 100%; display: block; }
	.np-nav a { padding: 11px 5px; }
	.np-nav .sub-menu { position: static; display: block; min-width: 0; padding: 0 0 0 15px; background: transparent; box-shadow: none; }
	.np-nav .sub-menu a { white-space: normal; }
	.np-hero-grid { grid-template-columns: 1fr; }
	.np-hero-side { grid-template-columns: repeat(2, 1fr); }
	.np-card-grid { grid-template-columns: repeat(2, 1fr); }
	.np-content-grid { grid-template-columns: 1fr; }
	.np-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.np-footer__main { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.np-container { width: min(calc(100% - 22px), var(--np-container)); }
	.np-topbar__links { display: none; }
	.np-topbar__inner { justify-content: center; }
	.np-brand__name { font-size: 24px; }
	.np-brand__mark { width: 37px; height: 37px; border-radius: 10px; }
	.np-actions { gap: 4px; }
	.np-icon-button { width: 38px; height: 38px; }
	.np-search-form { flex-direction: column; }
	.np-search-form button { width: 100%; }
	.np-ticker__label { margin-right: 10px; }
	.np-section { padding: 21px 0; }
	.np-hero-side { grid-template-columns: 1fr; }
	.np-story--lead .np-story__media { aspect-ratio: 4 / 3; }
	.np-story__title { font-size: 26px; }
	.np-story--small .np-story__title { font-size: 18px; }
	.np-card-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
	.np-card__title { font-size: 15px; }
	.np-list-item { grid-template-columns: 122px minmax(0, 1fr); gap: 13px; padding: 15px 0; }
	.np-list-item__title { margin-top: 3px; font-size: 16px; }
	.np-list-item__excerpt { display: none; }
	.np-sidebar { grid-template-columns: 1fr; }
	.np-article__title { font-size: 34px; }
	.np-article__dek { font-size: 17px; }
	.np-article-layout { grid-template-columns: 1fr; }
	.np-share { position: static; display: flex; }
	.np-entry-content { font-size: 17px; }
	.np-post-nav .nav-links { grid-template-columns: 1fr; }
	.np-footer__main { grid-template-columns: 1fr; padding: 38px 0 28px; }
}

@media (max-width: 420px) {
	.np-card-grid { grid-template-columns: 1fr; }
	.np-list-item { grid-template-columns: 96px minmax(0, 1fr); }
	.np-list-item__title { font-size: 15px; }
	.np-story__content { padding: 16px; }
	.np-article__title { font-size: 30px; }
}
