/*
Theme Name: PURNAPATI NEWS Pro
Theme URI: https://www.purnapatinews.my.id
Author: Creative Purnapati
Author URI: https://www.abaypurnapati.web.id
Description: Tema WordPress Portal Berita Modern, Responsif (Desktop & Android), Kecepatan Tinggi, SEO Friendly, dengan Skema Warna Biru & Oranye serta Slot Iklan Google AdSense Terintegrasi (ca-pub-4181657556608263).
Version: 2.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: purnapati-news
Tags: news, blog, magazine, two-columns, right-sidebar, custom-menu, featured-images, theme-options, adsense-ready
*/

:root {
  --primary-blue: #0a2540;
  --secondary-blue: #164e87;
  --light-blue: #eaf3fc;
  --accent-orange: #ff6b00;
  --hover-orange: #e05a00;
  --dark-text: #1a202c;
  --muted-text: #64748b;
  --bg-body: #f4f6f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 6px rgba(10, 37, 64, 0.06);
  --shadow-md: 0 6px 18px rgba(10, 37, 64, 0.10);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--dark-text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-orange);
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Bar */
.top-bar {
  background: #06182c;
  color: #cbd5e1;
  font-size: 12.5px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.top-badge {
  background: var(--accent-orange);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}

.top-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.top-links a:hover {
  color: var(--accent-orange);
}

/* Main Header */
.site-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: #ffffff;
  padding: 18px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand-area {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #ffffff;
  text-transform: uppercase;
}

.site-title span {
  color: var(--accent-orange);
}

.site-tagline {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 3px;
  letter-spacing: 0.4px;
}

.header-ad-slot {
  flex: 1;
  max-width: 728px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  overflow: hidden;
}

/* Navigation Bar */
.main-nav-wrapper {
  background: #ffffff;
  border-bottom: 3px solid var(--accent-orange);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
}

.primary-menu {
  display: flex;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
}

.primary-menu li a {
  display: block;
  padding: 13px 15px;
  font-weight: 700;
  font-size: 13.5px;
  text-transform: uppercase;
  color: var(--primary-blue);
  letter-spacing: 0.3px;
}

.primary-menu li a:hover,
.primary-menu li.current-menu-item a {
  background: var(--accent-orange);
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form-header {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
}

.search-form-header input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 160px;
  color: var(--dark-text);
}

.search-form-header button {
  background: none;
  border: none;
  color: var(--primary-blue);
  cursor: pointer;
  font-weight: 700;
}

.mobile-menu-toggle {
  display: none;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Breaking News Ticker */
.breaking-news-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.breaking-label {
  background: var(--accent-orange);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  padding: 10px 16px;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breaking-ticker-wrap {
  flex: 1;
  overflow: hidden;
  padding: 0 14px;
}

.breaking-ticker {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: tickerScroll 28s linear infinite;
}

.breaking-ticker:hover {
  animation-play-state: paused;
}

.breaking-ticker a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-blue);
}

.breaking-ticker a:hover {
  color: var(--accent-orange);
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* AdSense Container Styles */
.ad-container {
  margin: 18px auto;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ad-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 6px;
}

/* Hero Featured Grid */
.hero-section {
  margin-top: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

.hero-main-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 410px;
  background: var(--primary-blue);
  box-shadow: var(--shadow-md);
}

.hero-main-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main-card:hover img {
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 24, 44, 0.95) 0%, rgba(6, 24, 44, 0.45) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #ffffff;
}

.cat-badge {
  display: inline-block;
  background: var(--accent-orange);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  width: fit-content;
}

.hero-main-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.hero-main-title a {
  color: #ffffff;
}

.hero-main-title a:hover {
  color: #ffd1b0;
}

.post-meta {
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-side-grid {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.hero-sub-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 197px;
  background: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

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

.hero-sub-card:hover img {
  transform: scale(1.04);
}

.hero-sub-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-sub-title a {
  color: #ffffff;
}

/* Main Content + Sidebar Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 18px;
  padding-bottom: 8px;
  position: relative;
}

.section-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 90px;
  height: 3px;
  background: var(--accent-orange);
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* News Cards List */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.news-thumb {
  position: relative;
  height: 185px;
  overflow: hidden;
  background: #e2e8f0;
}

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

.news-thumb .cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  margin: 0;
}

.news-body {
  padding: 16px 18px 16px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-blue);
  line-height: 1.35;
  margin-bottom: 8px;
}

.news-excerpt {
  font-size: 13.5px;
  color: var(--muted-text);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 12px;
  color: var(--muted-text);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sidebar Widgets */
.sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.popular-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-num {
  background: var(--primary-blue);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popular-item:nth-child(1) .popular-num {
  background: var(--accent-orange);
}

.popular-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.35;
}

.sticky-sidebar-ad {
  position: sticky;
  top: 70px;
}

/* Single Article Page */
.single-article-box {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.single-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--primary-blue);
  line-height: 1.25;
  margin: 12px 0;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted-text);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.single-featured-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}

.single-content {
  font-size: 16px;
  color: #1e293b;
  line-height: 1.8;
}

.single-content p {
  margin-bottom: 18px;
}

.single-content h2, .single-content h3 {
  color: var(--primary-blue);
  margin: 24px 0 12px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.share-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.share-wa { background: #25d366; }
.share-fb { background: #1877f2; }
.share-x  { background: #0f172a; }

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  justify-content: center;
}

.pagination .page-numbers {
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-weight: 700;
  color: var(--primary-blue);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
}

/* Sticky Bottom Mobile Anchor Ad */
.mobile-sticky-ad {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--primary-blue);
  color: #cbd5e1;
  padding: 44px 0 24px;
  border-top: 4px solid var(--accent-orange);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-brand span {
  color: var(--accent-orange);
}

.footer-heading {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* Responsive Design (Android & Tablet) */
@media (max-width: 992px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
  }
  .header-ad-slot {
    width: 100%;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .main-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  .primary-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
  }
  .primary-menu.active {
    display: flex;
  }
  .nav-inner {
    flex-wrap: wrap;
    padding: 8px 0;
  }
  .news-card {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .news-thumb {
    height: 200px;
  }
  .news-body {
    padding: 16px;
  }
  .single-article-box {
    padding: 18px;
  }
  .single-title {
    font-size: 22px;
  }
  .mobile-sticky-ad {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 2px solid var(--accent-orange);
    z-index: 9999;
    padding: 6px;
    text-align: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
  }
  body {
    padding-bottom: 75px;
  }
}
