/*
Theme Name: Portal Berita Ringan
Theme URI: https://example.com
Author: Anda
Description: Tema portal berita/media online yang ringan dan cepat. Dibangun dari nol tanpa page builder berat, cocok untuk situs berita dengan banyak kategori, slot iklan AdSense, widget populer, dan breaking news ticker.
Version: 1.0
Requires at least: 5.9
Tested up to: 6.6
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: portal-ringan
Tags: news, blog, grid-layout, two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================================
   TOP BAR (tanggal/jam + sosial media)
   ========================================================= */
.top-bar { background: #0d2b52; color: #dbe4f0; font-size: 12px; }
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.top-bar-clock { font-variant-numeric: tabular-nums; }
.top-bar-social { display: flex; gap: 10px; }
.top-bar-social a {
  color: #dbe4f0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-transform: uppercase;
}
.top-bar-social a:hover { background: #c0392b; text-decoration: none; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: #ffffff;
  border-bottom: 3px solid #c0392b;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.site-branding { margin: 0 auto; text-align: center; }
.site-branding .site-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin: 0;
}
.site-branding .site-title a { color: #1a1a1a; }
.site-branding .site-description {
  font-size: 12px;
  color: #777;
  margin: 0;
}
.main-nav-wrap { background: #0d2b52; }
.main-nav-wrap .container { display: flex; flex-direction: column; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 18px; }
.main-nav-row1 ul { padding: 10px 0; }
.main-nav-row2 { border-top: 1px solid rgba(255,255,255,.15); }
.main-nav-row2 ul { padding: 8px 0; gap: 16px; }
.main-nav-row2 a { font-size: 12px; font-weight: 500; text-transform: none; }
.main-nav a {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #fff;
}
.main-nav a:hover { color: #ffd0c8; text-decoration: none; }
.menu-toggle, .search-toggle {
  display: none;
  background: none;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
}
.header-search { display: none; padding: 12px 0; border-top: 1px solid #eee; }
.header-search.is-open { display: block; }
.header-search input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* =========================================================
   BREAKING NEWS TICKER
   ========================================================= */
.breaking-ticker {
  background: #1a1a1a;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.breaking-label {
  background: #c0392b;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-track-wrap { overflow: hidden; flex: 1; }
.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  width: max-content;
  padding: 8px 0;
}
.ticker-track.is-paused { animation-play-state: paused; }
.ticker-track a { color: #fff; font-size: 13px; }
.ticker-pause {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 11px;
}
.ticker-pause:hover { color: #c0392b; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================================
   AD SLOTS
   ========================================================= */
.ad-slot {
  margin: 18px 0;
  text-align: center;
  min-height: 0;
}
.ad-slot .widget-title { display: none; }
.ad-slot-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin-bottom: 4px;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  margin: 24px 0;
  align-items: start;
}
@media (max-width: 880px) {
  .content-layout { grid-template-columns: 1fr; }
}

/* =========================================================
   SECTION: CATEGORY BLOCK
   ========================================================= */
.category-block { margin-bottom: 32px; }
.category-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.category-block-header h2 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-left: 4px solid #c0392b;
  padding-left: 10px;
}
.category-block-header a {
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
}
.news-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) {
  .news-grid { grid-template-columns: 1fr; }
}
.news-card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.news-card.is-featured .news-thumb { aspect-ratio: 16/10; }
.news-thumb { aspect-ratio: 16/11; overflow: hidden; background: #e6e6e6; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-thumb img { transform: scale(1.04); }
.news-body { padding: 12px 14px; }
.news-card.is-featured .news-body h3 { font-size: 20px; }
.news-body h3 { font-size: 15px; margin-bottom: 6px; }
.news-meta { font-size: 11px; color: #888; }
.news-excerpt { font-size: 13px; color: #555; margin-top: 6px; }

/* =========================================================
   HERO SLIDER (artikel unggulan homepage)
   ========================================================= */
.hero-slider {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #e6e6e6;
  margin-bottom: 24px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  padding: 40px 20px 18px;
}
.hero-slide-caption a { color: #fff; font-size: 20px; font-weight: 700; }
.hero-slide-caption .news-meta { color: #ddd; margin-top: 6px; }
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  z-index: 5;
}
.hero-nav:hover { background: #c0392b; }
.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }
.hero-dots {
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 5;
}
.hero-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 0;
}
.hero-dots button.is-active { background: #fff; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.widget { background: #fff; border-radius: 6px; padding: 16px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.widget-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.popular-post-item { display: flex; gap: 10px; margin-bottom: 14px; }
.popular-post-item .thumb {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e6e6e6;
}
.popular-post-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-post-item .num {
  position: absolute;
  bottom: 0; left: 0;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.popular-post-item h4 { font-size: 13px; margin: 0; }
.popular-post-item .cat-label { font-size: 10px; text-transform: uppercase; color: #c0392b; font-weight: 700; }

/* =========================================================
   SINGLE POST
   ========================================================= */
.single-post { background: #fff; border-radius: 6px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.single-post .entry-title { font-size: 28px; }
.single-post .entry-meta { font-size: 12px; color: #888; margin-bottom: 16px; }
.single-post .entry-thumb { margin-bottom: 18px; border-radius: 6px; overflow: hidden; }
.single-post .entry-content { font-size: 16px; }
.single-post .entry-content p { margin: 0 0 1.2em; }
.in-content-ad { margin: 24px 0; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: #1a1a1a; color: #ccc; margin-top: 40px; padding: 30px 0 16px; font-size: 13px; }
.site-footer a { color: #fff; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; margin-bottom: 20px; }
.footer-bottom { border-top: 1px solid #333; padding-top: 14px; text-align: center; color: #888; }

/* =========================================================
   RESPONSIVE NAV
   ========================================================= */
@media (max-width: 780px) {
  .top-bar-inner { font-size: 11px; }
  .site-header-inner { padding: 10px 16px; }
  .menu-toggle, .search-toggle { display: inline-block; }
  .site-branding .site-title { font-size: 20px; }

  .main-nav-wrap { display: none; width: 100%; }
  .main-nav-wrap.is-open { display: block; }
  .main-nav-wrap .container { padding: 0; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li { border-top: 1px solid rgba(255,255,255,.1); }
  .main-nav a { display: block; padding: 10px 16px; }
  .main-nav-row1 ul, .main-nav-row2 ul { padding: 0; }

  .hero-slide-caption a { font-size: 16px; }
  .hero-nav { width: 28px; height: 28px; font-size: 13px; }
}
