/*
Theme Name: Malaka News Indonesia
Theme URI: https://malakanews.id
Author: Malaka News Dev Team
Description: Tema WordPress portal berita profesional berbasis desain Malaka News dengan fitur Customizer lengkap (Logo, Favicon, Ukuran Logo, Skema Warna, Running Text, Opsi Footer) serta Generator Laman Otomatis.
Version: 2.0.0 (Tahap 2)
Text Domain: pressline
*/

:root {
  --red: #c51f35;
  --dark: #15191f;
  --muted: #737b86;
  --surface: #f4f5f7;
  --logo-width: 180px;
  --logo-font-size: 34px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #20242a;
  overflow-x: hidden;
}

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

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

/* Topbar & Header */
.top {
  background: var(--dark);
  color: #ddd;
  font-size: 12px;
  padding: 9px 0;
}

.brand {
  font-size: var(--logo-font-size);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
}

.brand span {
  color: var(--red);
}

.custom-logo-link img {
  width: var(--logo-width);
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.navbar {
  background: var(--dark);
}

.navbar .nav-link,
.navbar-nav > li > a {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 15px 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
}

.navbar .nav-link:hover,
.navbar .nav-link.active,
.navbar-nav > li.current-menu-item > a,
.navbar-nav > li > a:hover {
  color: #fff;
  background: var(--red);
}

/* Running Text / Sekilas Info */
.breaking {
  background: var(--surface);
  border-bottom: 1px solid #e3e6ea;
  padding: 10px 0;
  font-size: 13px;
  color: #20242a;
}

.breaking-badge {
  background: var(--red);
  color: #fff;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  position: relative;
}

.ticker-move {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 32s linear infinite;
}

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

.ticker-item {
  display: inline-block;
  margin-right: 48px;
  font-weight: 600;
}

.ticker-item i {
  color: var(--red);
  margin-right: 6px;
}

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Trending Tags */
.trending-bar {
  background: #fff;
  border-bottom: 1px solid #e3e6ea;
  padding: 10px 0;
  font-size: 12px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  color: #20242a;
  border: 1px solid #e3e6ea;
  padding: 4px 10px;
  font-weight: 700;
  transition: all .2s ease;
}

.tag-pill:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.eyebrow {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

.btn-red {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 12px 18px;
  letter-spacing: .5px;
  transition: opacity .2s;
}

.btn-red:hover {
  background: var(--red);
  color: #fff;
  opacity: .9;
}

/* Efek Zoom pada Thumbnail Berita saat Hover */
.thumb-zoom {
  overflow: hidden;
  position: relative;
  display: block;
  background: #15191f;
}

.thumb-zoom img {
  transition: transform .45s cubic-bezier(.25, .46, .45, .94);
  will-change: transform;
}

.lead:hover .thumb-zoom img,
.story:hover .thumb-zoom img,
.popular-item:hover .thumb-zoom img,
.thumb-zoom:hover img {
  transform: scale(1.07);
}

/* Lead Story */
.lead {
  background: var(--surface);
  border: 1px solid #e3e6ea;
}

.lead .thumb-zoom {
  height: 100%;
  min-height: 390px;
}

.lead img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}

.lead-copy {
  padding: clamp(24px, 4vw, 48px);
}

.lead h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.8px;
}

/* Cards & Newsfeed */
.section {
  background: var(--surface);
}

.story {
  border: 1px solid #e3e6ea;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.story .thumb-zoom {
  height: 205px;
}

.story img {
  width: 100%;
  height: 205px;
  object-fit: cover;
}

.story-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story h3 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.feed-card {
  border: 1px solid #e3e6ea;
  background: #fff;
  padding: 16px;
}

.feed-card .thumb-zoom {
  width: 220px;
  height: 145px;
  flex-shrink: 0;
}

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

@media (max-width: 576px) {
  .feed-card {
    flex-direction: column;
  }
  .feed-card .thumb-zoom {
    width: 100%;
    height: 190px;
  }
}

/* Sidebar Berita Terpopuler */
.sidebar-box {
  background: #fff;
  border: 1px solid #e3e6ea;
  padding: 22px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-left: 4px solid var(--red);
  padding-left: 10px;
  margin-bottom: 18px;
}

.popular-item {
  display: flex;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eceef1;
  align-items: flex-start;
}

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

.popular-rank {
  font-size: 22px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  min-width: 26px;
}

.popular-thumb {
  width: 76px;
  height: 62px;
  flex-shrink: 0;
}

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

.popular-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

/* Footer */
footer {
  background: var(--dark);
  color: #fff;
  padding: 52px 0 24px;
}

.footer-heading {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: #fff;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 9px;
  font-size: 13px;
  color: #aab1bb;
}

.footer-links a {
  color: #aab1bb;
  transition: color .2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-muted {
  color: #aab1bb;
  font-size: 13px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #323842;
  color: #fff;
  font-size: 15px;
  transition: all .2s;
}

.social-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Single Post & Page Styling */
.article-content p {
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 16px;
}

/* Tahap 2: Tombol Kembali ke Atas & Share Box */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: var(--red);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 1050;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.back-to-top.show {
  display: flex;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #e3e6ea;
  background: var(--surface);
  color: #20242a;
}
.share-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
