/*
Theme Name: Hot News Jabar
Theme URI: https://hotnewsjabar.com
Author: Redaksi Hot News Jabar
Author URI: https://hotnewsjabar.com
Description: Theme portal berita lengkap Hot News Jabar dengan logo resmi di header dan footer, ruang iklan atas (Leaderboard 970x90), ruang iklan samping kanan (300x250 dan Sticky 300x600), iklan tengah berita, tata letak editorial 3 tingkat, serta dukungan WordPress Customizer & Widget Iklan.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hotnewsjabar
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, theme-options
*/

:root {
  --hnj-bg: #FBF9F5;
  --hnj-surface: #FFFFFF;
  --hnj-surface-muted: #F5F5F4;
  --hnj-border: #E7E5E4;
  --hnj-border-strong: #D6D3D1;
  --hnj-text: #1C1917;
  --hnj-text-muted: #57534E;
  --hnj-text-subtle: #78716C;
  --hnj-accent: #B91C1C;
  --hnj-accent-hover: #991B1B;
  --hnj-font-serif: 'Playfair Display', Georgia, Cambria, "Times New Roman", serif;
  --hnj-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hnj-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="dark"] {
  --hnj-bg: #0C0A09;
  --hnj-surface: #1C1917;
  --hnj-surface-muted: #292524;
  --hnj-border: #292524;
  --hnj-border-strong: #44403C;
  --hnj-text: #F5F5F4;
  --hnj-text-muted: #A8A29E;
  --hnj-text-subtle: #78716C;
  --hnj-accent: #EA580C;
  --hnj-accent-hover: #F97316;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--hnj-bg);
  color: var(--hnj-text);
  font-family: var(--hnj-font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hnj-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .hnj-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Header Masthead (3-Zone Top Bar) */
.hnj-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--hnj-surface);
  border-bottom: 1px solid var(--hnj-border);
}

.hnj-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 72px;
}

.hnj-brand-link {
  display: inline-flex;
  align-items: center;
  background-color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.hnj-brand-link img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.hnj-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.hnj-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.75rem;
}

.hnj-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--hnj-text-muted);
  white-space: nowrap;
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.hnj-nav a:hover,
.hnj-nav .current-menu-item > a {
  color: var(--hnj-accent);
  font-weight: 600;
}

@media (min-width: 1024px) {
  .hnj-nav {
    display: flex;
  }
}

.hnj-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hnj-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--hnj-accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.hnj-btn-primary:hover {
  background-color: var(--hnj-accent-hover);
}

.hnj-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--hnj-border-strong);
  background-color: var(--hnj-surface-muted);
  color: var(--hnj-text);
  cursor: pointer;
}

.hnj-mobile-toggle {
  display: inline-flex;
}

@media (min-width: 1024px) {
  .hnj-mobile-toggle {
    display: none;
  }
}

.hnj-mobile-drawer {
  display: none;
  border-top: 1px solid var(--hnj-border);
  background-color: var(--hnj-surface);
  padding: 0.75rem 1rem;
}

.hnj-mobile-drawer.is-open {
  display: block;
}

.hnj-mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hnj-mobile-drawer li a {
  display: block;
  padding: 0.65rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 1px solid var(--hnj-border);
}

/* Advertisement Containers (Top Leaderboard, Sidebar Rect, Sidebar Sticky, In-Feed) */
.hnj-top-ad-band {
  background-color: var(--hnj-surface-muted);
  border-bottom: 1px solid var(--hnj-border);
  padding: 0.75rem 0;
}

.hnj-ad-slot {
  border: 1px solid var(--hnj-border);
  background-color: var(--hnj-surface);
  border-radius: 6px;
  overflow: hidden;
}

.hnj-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.75rem;
  background-color: var(--hnj-surface-muted);
  border-bottom: 1px solid var(--hnj-border);
  font-size: 11px;
  color: var(--hnj-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hnj-ad-dims {
  font-family: var(--hnj-font-mono);
  font-variant-numeric: tabular-nums;
}

.hnj-ad-body {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
}

.hnj-ad-placeholder {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-image: radial-gradient(var(--hnj-border-strong) 1px, transparent 1px);
  background-size: 14px 14px;
}

.hnj-ad-slot--leaderboard .hnj-ad-placeholder {
  min-height: 90px;
}

.hnj-ad-slot--rect .hnj-ad-placeholder {
  min-height: 250px;
}

.hnj-ad-slot--sticky .hnj-ad-placeholder {
  min-height: 540px;
}

.hnj-ad-placeholder-title {
  font-family: var(--hnj-font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hnj-text);
  margin: 0;
}

.hnj-ad-placeholder-desc {
  font-size: 0.75rem;
  color: var(--hnj-text-muted);
  margin: 0.25rem 0 0;
  max-width: 34ch;
}

/* Sub-header Edition & Category Bar */
.hnj-edition-bar {
  background-color: var(--hnj-surface);
  border-bottom: 1px solid var(--hnj-border);
  padding: 0.75rem 0;
}

.hnj-edition-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--hnj-text-muted);
}

.hnj-search-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hnj-search-input {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border: 1px solid var(--hnj-border-strong);
  border-radius: 5px;
  background-color: var(--hnj-surface-muted);
  color: var(--hnj-text);
  min-width: 190px;
}

.hnj-cat-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  margin-top: 0.75rem;
  padding-bottom: 2px;
}

.hnj-cat-chip {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 5px;
  background-color: var(--hnj-surface-muted);
  color: var(--hnj-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.hnj-cat-chip:hover,
.hnj-cat-chip.is-active {
  background-color: var(--hnj-accent);
  color: #FFFFFF;
}

/* Main 2-Column Editorial Layout */
.hnj-main {
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

.hnj-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .hnj-main-grid {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  }
}

.hnj-content-col {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Tier 1 Lead Story */
.hnj-lead-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--hnj-border);
  background-color: #1C1917;
}

.hnj-lead-media {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}

.hnj-lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hnj-lead-card:hover .hnj-lead-media img {
  transform: scale(1.02);
}

.hnj-lead-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
}

.hnj-lead-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.75rem;
  color: #FFFFFF;
}

.hnj-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--hnj-text-muted);
}

.hnj-lead-overlay .hnj-meta-line {
  color: #E7E5E4;
  margin-bottom: 0.5rem;
}

.hnj-kicker {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hnj-accent);
}

.hnj-lead-overlay .hnj-kicker {
  color: #FCD34D;
}

.hnj-lead-title {
  font-family: var(--hnj-font-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

.hnj-lead-excerpt {
  margin: 0.65rem 0 0;
  font-size: 0.9375rem;
  color: #E7E5E4;
  max-width: 65ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tier 2 Secondary Features */
.hnj-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .hnj-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hnj-card {
  display: flex;
  flex-direction: column;
  background-color: var(--hnj-surface);
  border: 1px solid var(--hnj-border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.hnj-card:hover {
  border-color: var(--hnj-border-strong);
}

.hnj-card-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--hnj-surface-muted);
}

.hnj-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hnj-card-body {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.hnj-card-title {
  font-family: var(--hnj-font-serif);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.45rem 0 0.5rem;
}

.hnj-card:hover .hnj-card-title {
  color: var(--hnj-accent);
}

.hnj-card-excerpt {
  font-size: 0.875rem;
  color: var(--hnj-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tier 3 Latest News Feed List */
.hnj-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--hnj-border-strong);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.hnj-section-title {
  font-family: var(--hnj-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.hnj-feed-list {
  background-color: var(--hnj-surface);
  border: 1px solid var(--hnj-border);
  border-radius: 8px;
}

.hnj-feed-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--hnj-border);
}

.hnj-feed-item:last-child {
  border-bottom: 0;
}

@media (min-width: 640px) {
  .hnj-feed-item {
    flex-direction: row;
    gap: 1.25rem;
  }
}

.hnj-feed-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--hnj-surface-muted);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .hnj-feed-thumb {
    width: 210px;
  }
}

.hnj-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hnj-feed-title {
  font-family: var(--hnj-font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.35rem 0 0.5rem;
}

.hnj-feed-item:hover .hnj-feed-title {
  color: var(--hnj-accent);
}

/* Pagination */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.page-numbers {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--hnj-border-strong);
  border-radius: 5px;
  background-color: var(--hnj-surface);
}

.page-numbers.current {
  background-color: var(--hnj-accent);
  border-color: var(--hnj-accent);
  color: #FFFFFF;
}

/* Right Sidebar */
.hnj-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hnj-widget-box {
  background-color: var(--hnj-surface);
  border: 1px solid var(--hnj-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.hnj-widget-title {
  font-family: var(--hnj-font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hnj-border);
}

.hnj-trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hnj-trending-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hnj-border);
}

.hnj-trending-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hnj-trending-num {
  font-family: var(--hnj-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--hnj-border-strong);
  line-height: 1;
}

.hnj-trending-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.25rem;
}

.hnj-trending-item:hover .hnj-trending-title {
  color: var(--hnj-accent);
}

.hnj-sticky-ad {
  position: sticky;
  top: 90px;
}

/* Single Article Page */
.hnj-article-wrap {
  background-color: var(--hnj-surface);
  border: 1px solid var(--hnj-border);
  border-radius: 8px;
  padding: 1.75rem;
}

@media (min-width: 768px) {
  .hnj-article-wrap {
    padding: 2.5rem;
  }
}

.hnj-article-title {
  font-family: var(--hnj-font-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.18;
  margin: 0.65rem 0 1rem;
}

.hnj-article-figure {
  margin: 1.5rem 0;
}

.hnj-article-figure img {
  width: 100%;
  border-radius: 6px;
}

.hnj-article-caption {
  font-family: var(--hnj-font-serif);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--hnj-text-subtle);
  margin-top: 0.5rem;
}

.hnj-article-content {
  max-width: 68ch;
  font-size: 1.025rem;
  line-height: 1.8;
}

.hnj-article-content > p:first-of-type::first-letter {
  font-family: var(--hnj-font-serif);
  font-size: 3.25rem;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin-right: 0.7rem;
  margin-top: 0.2rem;
  color: var(--hnj-accent);
}

.hnj-article-content p {
  margin-bottom: 1.25rem;
}

/* Footer */
.hnj-footer {
  margin-top: 3rem;
  background-color: var(--hnj-surface);
  border-top: 1px solid var(--hnj-border);
  padding: 2.5rem 0 1.5rem;
}

.hnj-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--hnj-border);
}

@media (min-width: 768px) {
  .hnj-footer-grid {
    grid-template-columns: 5fr 4fr 3fr;
  }
}

.hnj-footer-bottom {
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--hnj-text-subtle);
}
