/*
Theme Name: AskaNews v2
Theme URI: https://yourdomain.com/askanews-v2
Author: AskaNews Team
Author URI: https://yourdomain.com
Description: AskaNews v2 Pro - Tema Portal Berita Modern, Cepat, Responsif, SEO Friendly dengan Desain Gaya Terkini dan Proteksi Lisensi 1 Domain.
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
Version: 2.0.0
License: Single Domain Commercial License
Text Domain: askanews
Tags: #askanews

AskaNews v2 WordPress Theme, (C) 2026 AskaNews Team
*/

:root {
  --primary-color: #c00000;
  --primary-dark: #990000;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --bg-color: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
  --primary-color: #e63946;
  --primary-dark: #c00000;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --bg-color: #0f172a;
  --bg-secondary: #1e293b;
  --border-color: #334155;
  --card-bg: #1e293b;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

a:hover {
  color: var(--primary-color);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* TOPBAR */
.top-bar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  padding: 6px 0;
}
.top-bar-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-network, .top-social {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-network ul, .top-social ul {
  display: flex;
  list-style: none;
  gap: 12px;
}
.top-network ul li a, .top-social ul li a {
  color: var(--text-muted);
}
.top-network ul li a:hover, .top-social ul li a:hover {
  color: var(--primary-color);
}
@media (max-width: 768px) {
  .top-bar { display: none; }
}

/* MAIN HEADER */
.main-header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-color);
}
.header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.site-logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--primary-color);
}
.site-logo:hover { color: var(--primary-color); }

/* MOBILE HAMBURGER */
.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.mobile-toggle-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 2px;
}
@media (max-width: 900px) {
  .mobile-toggle-btn { display: flex; }
}

/* SEARCH BAR */
.header-search {
  flex: 1;
  max-width: 450px;
}
.search-form {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}
.search-input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  background: var(--bg-secondary);
  color: var(--text-color);
  outline: none;
}
.search-button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0 14px;
  cursor: pointer;
}
@media (max-width: 600px) {
  .header-search { display: none; }
}

.theme-toggle-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  color: var(--text-color);
}

/* MAIN NAVIGATION */
.main-nav {
  background: var(--primary-color);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nav-box {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-box::-webkit-scrollbar { display: none; }
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-menu li {
  list-style: none;
  margin: 0;
  position: relative;
}
.nav-menu li a {
  display: block;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a {
  background: var(--primary-dark);
}
.nav-menu li:hover > ul.sub-menu {
  display: block;
}
.nav-menu ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 200;
}
.nav-menu ul.sub-menu li a {
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 900px) {
  .main-nav { display: none; }
}

/* BREAKING NEWS TICKER */
.ticker-wrapper {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 0;
  font-size: 13px;
}
.ticker-container {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.ticker-badge {
  background: var(--primary-color);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-marquee {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  flex: 1;
}
.ticker-track {
  display: inline-flex;
  gap: 20px;
  animation: ticker-scroll 35s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  color: var(--text-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ticker-dot { color: var(--primary-color); }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ADS PLACEHOLDERS */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  margin: 15px auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 10px;
  border-radius: 4px;
}
.ad-billboard { min-height: 90px; max-width: 970px; }
.ad-leaderboard { min-height: 90px; max-width: 728px; }
.ad-rectangle { min-height: 250px; max-width: 300px; }
.ad-widget-wrapper img { width: 100%; height: auto; }

/* MAIN CONTENT LAYOUT */
.main-wrapper {
  padding: 25px 0;
}
.layout-grid {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 25px;
}
@media (max-width: 900px) {
  .layout-grid { grid-template-columns: 1fr; }
}

/* SECTION TITLES */
.section-header {
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.section-title {
  background: var(--primary-color);
  color: #fff;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

/* HEADLINE SECTION (1 BIG + 3 SMALL) */
.headline-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}
@media (max-width: 650px) {
  .headline-grid { grid-template-columns: 1fr; }
}

.headline-big {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 380px;
}
.headline-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.headline-big:hover img { transform: scale(1.03); }
.headline-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #ffffff;
}
.cat-badge {
  background: var(--primary-color);
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  width: fit-content;
  margin-bottom: 8px;
}
.headline-big-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
.headline-meta {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 6px;
}

.headline-small-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.headline-small-item {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.headline-small-item:last-child { border-bottom: none; }
.headline-small-thumb {
  width: 110px;
  height: 75px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.headline-small-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.headline-small-content h4 {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}

/* LATEST NEWS FEED */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.news-card {
  display: flex;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}
.news-card-thumb {
  width: 200px;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 500px) {
  .news-card { flex-direction: column; }
  .news-card-thumb { width: 100%; height: 180px; }
}
.news-card-body h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 4px 0 8px;
}
.news-card-excerpt {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SIDEBAR & WIDGETS */
.sidebar-widget {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 25px;
}
.widget-heading {
  font-size: 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.popular-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.popular-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.popular-rank {
  font-size: 20px;
  font-weight: 900;
  color: #cbd5e1;
  width: 24px;
  text-align: center;
}
.popular-item:nth-child(1) .popular-rank { color: #ef4444; }
.popular-item:nth-child(2) .popular-rank { color: #f97316; }
.popular-item:nth-child(3) .popular-rank { color: #eab308; }
.popular-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

/* SINGLE ARTICLE */
.breadcrumbs {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.article-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

/* BACA JUGA INLINE BOX */
.baca-juga-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--primary-color);
  padding: 12px 16px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}
.baca-juga-badge {
  font-size: 11px;
  font-weight: 900;
  color: var(--primary-color);
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.baca-juga-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
}
.baca-juga-title:hover { color: var(--primary-color); }

/* ARTICLE TOOLBAR (FONT RESIZER & SHARE) */
.article-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.font-resizer {
  display: flex;
  align-items: center;
  gap: 6px;
}
.toolbar-label {
  font-size: 12px;
  font-weight: bold;
  color: var(--text-muted);
  margin-right: 4px;
}
.font-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.font-btn-active, .font-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.share-btn {
  padding: 6px 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
}
.share-wa { background: #25D366; }
.share-fb { background: #1877F2; }
.share-x { background: #000000; }
.share-copy { background: #475569; }

.article-featured-img {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}
.article-featured-img img { width: 100%; max-height: 480px; object-fit: cover; }

.article-body {
  font-size: 16px;
  line-height: 1.8;
}
.article-body.font-small { font-size: 14px; }
.article-body.font-normal { font-size: 16px; }
.article-body.font-large { font-size: 19px; }
.article-body p { margin-bottom: 16px; }

/* FOOTER */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 40px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
}

/* MOBILE DRAWER */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: var(--bg-color);
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-drawer.active { left: 0; }
.drawer-header {
  padding: 16px;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-title { font-size: 18px; font-weight: 800; }
.drawer-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.drawer-search { padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.drawer-body { padding: 16px; }
.drawer-menu { list-style: none; }
.drawer-menu li a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}
.drawer-backdrop.active { display: block; }

.back-to-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 42px;
  height: 42px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top-btn.show { opacity: 1; visibility: visible; }

.askanews-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: bold;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1001;
  pointer-events: none;
}
.askanews-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* PAGINATION */
.pagination ul.page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 35px 0 20px;
  padding: 0;
  flex-wrap: wrap;
}
.pagination ul.page-numbers li span.page-numbers,
.pagination ul.page-numbers li a.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination ul.page-numbers li span.current {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}
.pagination ul.page-numbers li a.page-numbers:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* ARTICLE MULTIPAGE PARAGRAPH PAGINATION */
.article-multipage-nav {
  margin: 30px 0 25px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
}
.multipage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.multipage-badge {
  background: var(--primary-color);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.multipage-info {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-color);
}
.multipage-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mp-num, .mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.mp-num {
  min-width: 36px;
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.mp-num:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}
.mp-current {
  background: var(--primary-color);
  color: #ffffff;
  border: 1px solid var(--primary-color);
}
.mp-btn {
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.mp-btn:hover {
  background: var(--bg-color);
  border-color: var(--text-muted);
}
.mp-next {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}
.mp-next:hover {
  background: var(--primary-dark);
  color: #ffffff;
}