/*
Theme Name: WP Berita
Theme URI: https://seputarmedan.id/
Author: PBN News Ops
Description: Portal berita. Layout acuan magazine (breaking, logo, menu, slider, postingan terbaru).
Version: 1.5.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: wpberita
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --wb-primary: #1565c0;
  --wb-accent: #0d47a1;
  --wb-header: #ffffff;
  --wb-bg: #ffffff;
  --wb-ink: #1a1a1a;
  --wb-muted: #6b6b6b;
  --wb-paper: #f7f7f7;
  --wb-line: #e6e6e6;
  --wb-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wb-head: "Segoe UI", Roboto, Arial, sans-serif;
  --wb-logo-h: 52px;
  --wb-tick-speed: 36s;
  --wb-util: #ffffff;
  --wb-foot-bg: #f3f3f3;
  --wb-foot-ink: #555;
}

html { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --wb-bg: #121212;
  --wb-header: #0c0c0c;
  --wb-ink: #f0f0f0;
  --wb-muted: #9a9a9a;
  --wb-paper: #1b1b1b;
  --wb-line: #2c2c2c;
  --wb-util: #161616;
  --wb-foot-bg: #0a0a0a;
  --wb-foot-ink: #bdbdbd;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body {
  background: var(--wb-bg);
  color: var(--wb-ink);
  font-family: var(--wb-font);
  font-size: 16px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--wb-primary); }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

/* breaking */
.wb-breaking { background: var(--wb-primary); color: #fff; }
.wb-breaking-inner { display: flex; align-items: stretch; min-height: 34px; }
.wb-break-label {
  background: #fff;
  color: var(--wb-primary);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center;
  padding: 0 12px;
  white-space: nowrap;
}
.wb-break-track { flex: 1; overflow: hidden; display: flex; align-items: center; }
.wb-break-move {
  display: flex; gap: 36px; white-space: nowrap;
  animation: wb-marquee var(--wb-tick-speed) linear infinite;
  padding-left: 16px;
}
.wb-break-move a { color: #fff; font-size: 13px; }
@keyframes wb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-reverse .wb-break-move { animation-name: wb-marquee-rev; }
@keyframes wb-marquee-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.ticker-fast .wb-break-move { animation-duration: 24s; }
.ticker-slow .wb-break-move { animation-duration: 50s; }
.ticker-pulse .wb-break-label { animation: wb-pulse 1.2s ease-in-out infinite; }
@keyframes wb-pulse { 50% { opacity: .55; } }
.ticker-quiet { background: #333; }
.ticker-quiet .wb-break-label { color: #333; }

/* util: indeks + jam + cari */
.wb-util { border-bottom: 1px solid var(--wb-line); background: var(--wb-util); }
.wb-util .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 52px; flex-wrap: wrap;
}
.wb-util-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wb-nav-toggle {
  border: 0; background: transparent; font-size: 20px; padding: 8px;
  min-width: 40px; min-height: 40px; cursor: pointer; color: var(--wb-ink);
}
.wb-indeks {
  border: 1px solid var(--wb-line); border-radius: 6px; padding: 6px 12px; font-size: 13px; background: var(--wb-paper);
}
.wb-clock { font-size: 12px; color: var(--wb-muted); font-variant-numeric: tabular-nums; }
.wb-search { display: flex; align-items: center; border: 1px solid var(--wb-line); border-radius: 20px; overflow: hidden; background: var(--wb-paper); }
.wb-search input {
  border: 0; background: transparent; padding: 8px 14px; width: 180px; outline: none; font-size: 13px; color: var(--wb-ink);
}
.wb-search input::placeholder { color: var(--wb-muted); }
.wb-search button { border: 0; background: transparent; padding: 8px 12px; cursor: pointer; font-size: 16px; color: var(--wb-ink); }

.wb-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; min-width: 40px; border: 1px solid var(--wb-line); border-radius: 50%;
  background: var(--wb-paper); color: var(--wb-ink); cursor: pointer; padding: 0; flex: 0 0 40px;
}
.wb-theme-toggle:hover, .wb-theme-toggle:focus-visible {
  border-color: var(--wb-primary); color: var(--wb-primary); outline: none;
}
.wb-theme-toggle svg { width: 20px; height: 20px; display: none; }
html[data-theme="dark"] .wb-theme-toggle .icon-sun { display: block; }
html:not([data-theme="dark"]) .wb-theme-toggle .icon-moon { display: block; }
.wb-util-right { display: flex; align-items: center; gap: 10px; }
html[data-theme="dark"] .wb-break-label { background: var(--wb-paper); color: var(--wb-accent, var(--wb-primary)); }
html[data-theme="dark"] .ticker-quiet { background: #1a1a1a; }
html[data-theme="dark"] .ticker-quiet .wb-break-label { color: var(--wb-ink); }

/* logo */
.wb-mast { background: var(--wb-header); padding: 18px 0 8px; color: var(--wb-ink); }
html[data-theme="dark"] .wb-mast { color: #f0f0f0; }
html[data-theme="dark"] .site-title a { color: #f0f0f0; }
.wb-mast .wrap { display: flex; justify-content: flex-start; }
.site-title { font-size: clamp(28px, 5vw, 40px); font-weight: 800; margin: 0; letter-spacing: -.03em; }
.custom-logo-link img, .custom-logo {
  height: var(--wb-logo-h) !important; width: auto !important; max-width: min(360px, 80vw) !important;
  object-fit: contain !important;
}

/* category bar */
.wb-nav { background: var(--wb-primary); margin-top: 8px; }
.wb-nav .menu { display: flex; justify-content: center; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.wb-nav .menu > li > a {
  display: block; color: #fff; padding: 12px 16px; font-size: 14px; font-weight: 600; min-height: 44px;
}
.wb-nav .menu > li > a:hover, .wb-nav .current-menu-item > a { background: rgba(0,0,0,.12); color: #fff; }

.wb-main { padding: 18px 0 40px; }

/* slider 3-up */
.wb-slider { position: relative; margin-bottom: 22px; }
.wb-slide-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none;
}
.wb-slide-track::-webkit-scrollbar { display: none; }
.wb-slide { flex: 0 0 calc((100% - 24px) / 3); min-width: 0; }
.wb-slide a { display: block; position: relative; background: transparent; color: var(--wb-ink); }
.wb-slide img { width: 100%; height: 140px; object-fit: cover; background: var(--wb-paper); }
.wb-slide-cap {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  padding: 10px 2px 4px; font-size: 15px; font-weight: 700; line-height: 1.35;
  color: var(--wb-ink); background: transparent;
}
.wb-slide a:hover .wb-slide-cap { color: var(--wb-primary); }
.wb-slide-btn {
  position: absolute; top: 50px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--wb-paper); color: var(--wb-ink); box-shadow: 0 1px 6px rgba(0,0,0,.18); cursor: pointer; font-size: 20px;
}
.wb-slide-btn.prev { left: -8px; }
.wb-slide-btn.next { right: -8px; }

.wb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .85fr);
  gap: 28px; align-items: start;
}

.wb-feature { margin-bottom: 18px; }
.wb-feature-img img { width: 100%; height: 280px; object-fit: cover; }
.wb-feature-meta { display: flex; gap: 10px; align-items: center; margin: 10px 0 4px; font-size: 13px; }
.kicker { color: var(--wb-primary); font-weight: 700; }
.wb-feature-meta time, .wb-excerpt { color: var(--wb-muted); }
.wb-feature .entry-title { font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 8px; font-weight: 700; line-height: 1.25; }
.wb-excerpt { margin: 0; font-size: 14px; line-height: 1.5; }

.wb-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wb-tile h3 { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 8px 0 0; }
.wb-tile img { width: 100%; height: 150px; object-fit: cover; }

.wb-rail { background: transparent; min-width: 0; }
.wb-widg { margin: 0 0 8px; }
.wb-widg-latest { background: var(--wb-paper); padding: 16px 14px 10px; }
.wb-widg-title {
  color: var(--wb-primary); font-size: 18px; font-weight: 600;
  margin: 0 0 14px; letter-spacing: 0; font-family: var(--wb-font);
}
.wb-widg + .wb-widg { margin-top: 22px; }
.wb-widg + .wb-widg .wb-widg-title::before {
  content: ""; display: block; width: 42px; height: 3px;
  background: var(--wb-primary); margin-bottom: 8px;
}

.wb-thumb { position: relative; display: block; overflow: hidden; }
.wb-thumb img { width: 100%; height: 150px; object-fit: cover; border-radius: 0; }
.wb-cap-over {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 10px; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3;
  background: var(--wb-primary);
  background: color-mix(in srgb, var(--wb-primary) 78%, #1c2438);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.wb-rail-hero { margin-bottom: 12px; }
.wb-rail-hero time, .wb-rail-row time {
  display: block; font-size: 12px; font-style: italic;
  color: var(--wb-primary); margin: 8px 0 2px; font-weight: 400;
}
.wb-rail-hero strong { display: block; font-size: 15px; line-height: 1.35; font-weight: 700; color: var(--wb-ink); }
.wb-rail-row a { display: flex; gap: 10px; padding: 10px 0 4px; align-items: flex-start; color: inherit; }
.wb-rail-row img { width: 78px; height: 58px; object-fit: cover; flex: 0 0 78px; border-radius: 0; }
.wb-rail-row strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--wb-ink); }
.wb-rail-row a:hover strong, .wb-rail-hero a:hover strong { color: var(--wb-primary); }

.wb-pop { list-style: none; margin: 0; padding: 0; }
.wb-pop li { display: flex; gap: 10px; padding: 11px 0; align-items: flex-start; }
.wb-pop-n {
  flex: 0 0 28px; font-size: 32px; font-weight: 300; line-height: .9;
  color: #c9c9c9; font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .wb-pop-n { color: #4a4a4a; }
.wb-pop-body { min-width: 0; }
.wb-pop-meta { font-size: 12px; font-style: italic; color: var(--wb-muted); margin-bottom: 2px; }
.wb-pop-meta time { color: inherit; margin: 0; font-style: italic; }
.wb-pop-meta span::before { content: "  "; }
.wb-pop-body a { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--wb-ink); }
.wb-pop-body a:hover { color: var(--wb-primary); }

.wb-cat-hero { margin-bottom: 12px; }
.wb-cat-row { padding: 0 0 14px; }
.wb-cat-row time { display: block; font-size: 12px; color: var(--wb-muted); margin: 0 0 2px; font-style: normal; }
.wb-cat-row a { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--wb-ink); }
.wb-cat-row a:hover { color: var(--wb-primary); }

.wb-soc { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.wb-soc a {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; color: #fff;
}
.wb-soc a svg { width: 16px; height: 16px; display: block; }
.wb-soc-facebook { background: #1877f2; }
.wb-soc-x { background: #111; }
.wb-soc-pinterest { background: #e60023; }
.wb-soc-instagram { background: #e4405f; }
.wb-soc-whatsapp { background: #25d366; }
.wb-soc-rss { background: #f36c00; }

.wb-article { max-width: 740px; }
.wb-article .entry-title { font-size: 28px; margin: 6px 0 12px; }
.wb-article .entry-content { font-size: 17px; line-height: 1.6; }
.wb-article .entry-content p { margin: 0 0 1em; }
.wb-article .entry-content h2 { font-size: 22px; margin: 1.2em 0 .4em; }

.wb-foot { background: var(--wb-foot-bg); color: var(--wb-foot-ink); padding: 22px 0; font-size: 13px; border-top: 3px solid var(--wb-primary); }
.wb-foot a { margin-right: 12px; }
.wb-legal { text-align: center; margin: 8px 0 0; }

.layout-center .wb-mast .wrap { justify-content: center; text-align: center; }
.layout-flash .wb-break-label { letter-spacing: .08em; }
.layout-flash .wb-pop-n { font-weight: 600; color: #b8b8b8; }
.layout-metro .wb-widg-latest { background: transparent; padding: 0; border-left: 3px solid var(--wb-primary); padding-left: 12px; }
.layout-editorial .wb-widg-title { font-family: var(--wb-head); font-style: italic; font-weight: 500; }
.layout-tabloid .wb-pop-n { font-family: var(--wb-head); }
.layout-publisher .wb-widg-latest { background: transparent; border: 1px solid var(--wb-line); padding: 14px; }

@media (max-width: 900px) {
  .wb-slide { flex: 0 0 calc((100% - 12px) / 2); }
}
@media (max-width: 800px) {
  .wb-clock { display: none; }
  .wb-search input { width: 120px; }
  .wb-nav { display: none; }
  .wb-nav.is-open { display: block; }
  .wb-nav .menu { flex-direction: column; }
  .wb-nav .menu > li > a { border-top: 1px solid rgba(255,255,255,.15); }
  .wb-grid, .wb-mosaic { grid-template-columns: 1fr; }
  .wb-slide { flex: 0 0 100%; }
  .wb-feature-img img { height: 200px; }
  .wb-rail { order: 2; margin-top: 8px; }
}
