/*
Theme Name: beritamasakini
Theme URI: http://webmasakini.com
Author: Web Developer
Description: Tema portal berita profesional modern WebMasaKini.com dengan tata letak adaptif dan responsif.
Version: 3.5
Text Domain: beritamasakini
*/

/* STREAMING_CHUNK: Mengatur variabel desain dan setelan dasar visual */
:root {
--color-orange: #f96c00;
--color-blue: #0055a5;
--text-dark: #222222;
--text-muted: #777777;
--font-heading: 'Roboto', sans-serif;
--font-body: 'Open Sans', sans-serif;
--bg-light: #f4f4f4;
}

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

body {
font-family: var(--font-body);
color: var(--text-dark);
line-height: 1.5;
background-color: #fff;
padding-top: 140px; /* Jarak default agar konten tidak tertutup sticky header desktop */
transition: padding-top 0.3s ease;
}

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

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

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

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

/* STREAMING_CHUNK: Mengatur visualisasi header dinamis dan sticky /
/ =========================================

HEADER AREA (GELAP & STICKY)
========================================= */
.site-header {
background-color: #000;
color: #fff;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
transition: all 0.3s ease;
border-bottom: 4px solid var(--color-orange);
}

.header-top {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
max-width: 1140px;
margin: 0 auto;
padding: 15px;
transition: all 0.3s ease;
opacity: 1;
visibility: visible;
height: auto;
}

/* Saat digulirkan (Sticky Mode) */
.site-header.is-scrolled {
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.site-header.is-scrolled .header-top {
padding: 0;
height: 0;
overflow: hidden;
opacity: 0;
visibility: hidden;
}

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

.brand-name {
font-family: var(--font-heading);
font-size: 32px;
font-weight: 900;
font-style: italic;
color: #fff;
letter-spacing: -1px;
line-height: 1;
}

.brand-name span {
color: var(--color-orange);
font-style: normal;
}

.tagline {
font-size: 11px;
font-style: italic;
color: #aaa;
letter-spacing: 1px;
margin-top: 2px;
}

/* STREAMING_CHUNK: Mempercantik elemen form pencarian dan aksi di header */
.header-search {
flex: 1;
max-width: 400px;
margin: 0 30px;
position: relative;
}

.header-search input {
width: 100%;
padding: 10px 15px;
border-radius: 20px;
border: 1px solid #444;
background-color: #222;
color: #fff;
outline: none;
font-size: 13px;
}

.header-search button {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #888;
cursor: pointer;
}

.header-actions {
display: flex;
align-items: center;
gap: 20px;
}

.btn-subscribe {
background-color: #1a73e8;
color: #fff;
padding: 10px 18px;
border-radius: 4px;
font-weight: bold;
font-size: 13px;
font-family: var(--font-heading);
transition: background 0.2s;
}

.btn-subscribe:hover {
background-color: #155cb4;
color: #fff;
}

.header-icons {
display: flex;
gap: 15px;
font-size: 18px;
}

.header-icons i {
cursor: pointer;
color: #ddd;
}

.header-icons i:hover {
color: #fff;
}

/* STREAMING_CHUNK: Menyusun menu navigasi horisontal utama /
/ Baris Bawah Navigasi */
.header-bottom {
border-top: 1px solid #222;
background-color: #000;
}

.nav-container {
max-width: 1140px;
margin: 0 auto;
padding: 0 15px;
display: flex;
align-items: center;
}

.main-navigation {
width: 100%;
}

.main-navigation ul {
list-style: none;
display: flex;
overflow-x: auto;
white-space: nowrap;
-scrollbar-width: none; /* Firefox */
}

.main-navigation ul::-webkit-scrollbar {
display: none; /* Chrome/Safari */
}

.main-navigation ul li a {
display: block;
padding: 12px 15px;
font-family: var(--font-heading);
font-weight: 700;
font-size: 14px;
color: #fff;
text-transform: capitalize;
}

.main-navigation ul li a:hover {
color: var(--color-orange);
}

.mobile-nav-trigger {
display: none;
background: none;
border: none;
color: #fff;
font-size: 24px;
cursor: pointer;
padding: 10px 0;
}

/* STREAMING_CHUNK: Mengonfigurasi drawer menu mobile off-canvas /
/ Off-Canvas Laci Menu Mobile */
.mobile-drawer {
position: fixed;
top: 0;
left: -280px;
width: 280px;
height: 100%;
background-color: #111;
z-index: 1002;
transition: left 0.3s ease;
padding: 20px;
overflow-y: auto;
}

.mobile-drawer.is-active {
left: 0;
}

.drawer-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
border-bottom: 1px solid #222;
padding-bottom: 15px;
}

.drawer-logo {
font-family: var(--font-heading);
font-size: 22px;
font-weight: 900;
color: #fff;
}

.drawer-logo span {
color: var(--color-orange);
}

.drawer-close {
background: none;
border: none;
color: #fff;
font-size: 24px;
cursor: pointer;
}

.mobile-navigation ul {
list-style: none;
}

.mobile-navigation ul li {
margin-bottom: 15px;
}

.mobile-navigation ul li a {
color: #ccc;
font-weight: bold;
font-size: 16px;
display: block;
}

.mobile-navigation ul li a:hover {
color: var(--color-orange);
}

.drawer-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
z-index: 1001;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}

.drawer-overlay.is-active {
opacity: 1;
visibility: visible;
}

/* STREAMING_CHUNK: Merancang struktur grid layout halaman depan /
/ =========================================
2. HOMEPAGE AREA & GRID
========================================= */
.home-container {
padding-top: 15px;
}

/* Trending Bar */
.trending-bar {
display: flex;
align-items: center;
gap: 10px;
font-size: 13px;
font-family: var(--font-heading);
padding-bottom: 15px;
border-bottom: 1px solid #eee;
margin-bottom: 25px;
}

.trending-bar .label {
color: #d32f2f;
font-weight: bold;
}

.trending-bar a {
color: #333;
font-weight: 600;
}

.trending-bar span {
color: #ccc;
}

.trending-bar .arrow {
margin-left: auto;
cursor: pointer;
}

/* Content Layout Area */
.content-area {
display: grid;
grid-template-columns: 68% 28%;
gap: 4%;
padding: 20px 0;
}

.section-title {
font-family: var(--font-heading);
font-size: 18px;
font-weight: bold;
border-left: 4px solid var(--color-orange);
padding-left: 10px;
margin: 30px 0 15px;
text-transform: uppercase;
}

/* STREAMING_CHUNK: Menyusun desain visual headline utama dan grid berita /
/ Headline Besar */
.headline-main {
position: relative;
border-radius: 8px;
overflow: hidden;
margin-bottom: 25px;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.headline-main img {
width: 100%;
height: 450px;
object-fit: cover;
display: block;
}

.hl-badge {
position: absolute;
top: 15px;
left: 15px;
background: var(--color-orange);
color: #fff;
padding: 4px 10px;
font-size: 11px;
font-weight: bold;
border-radius: 4px;
text-transform: uppercase;
}

.headline-main-content {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
padding: 50px 20px 20px;
}

.headline-main-content h2 {
color: #fff;
font-family: var(--font-heading);
font-size: 26px;
line-height: 1.3;
text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
font-weight: bold;
}

/* Grid Kecil */
.news-grid, .sorotan-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
margin-bottom: 30px;
}

.grid-item {
display: flex;
flex-direction: column;
}

.grid-item img {
width: 100%;
height: 150px;
object-fit: cover;
border-radius: 6px;
margin-bottom: 10px;
}

.grid-item h3 {
font-size: 14px;
font-family: var(--font-heading);
line-height: 1.4;
margin-bottom: 5px;
font-weight: bold;
}

.grid-item .category {
font-size: 11px;
font-weight: bold;
color: var(--color-blue);
text-transform: uppercase;
}

/* STREAMING_CHUNK: Menyusun layout widget pada area sidebar kanan /
/ =========================================
3. SIDEBAR (KANAN)
========================================= */
.sidebar {
display: flex;
flex-direction: column;
gap: 30px;
}

.widget {
margin-bottom: 10px;
}

/* List Terpopuler dengan Angka Raksasa */
.terpopuler-list {
list-style: none;
counter-reset: pop-counter;
}

.terpopuler-list li {
position: relative;
padding-left: 55px;
margin-bottom: 20px;
min-height: 50px;
border-bottom: 1px solid #f0f0f0;
padding-bottom: 15px;
}

.terpopuler-list li:last-child {
border-bottom: none;
}

.terpopuler-list li::before {
counter-increment: pop-counter;
content: counter(pop-counter);
position: absolute;
left: 0;
top: -5px;
font-size: 38px;
font-family: var(--font-heading);
font-weight: 900;
color: #e0e0e0;
line-height: 1;
}

.terpopuler-list h4 {
font-size: 14px;
font-family: var(--font-heading);
line-height: 1.4;
margin-bottom: 3px;
font-weight: bold;
}

.terpopuler-list .category {
font-size: 10px;
color: var(--color-blue);
text-transform: uppercase;
font-weight: bold;
}

/* Widget Pilihan List */
.pilihan-list {
list-style: none;
}

.pilihan-list li {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid #f0f0f0;
}

.pilihan-list li:last-child {
border-bottom: none;
}

.pilihan-list li img {
border-radius: 4px;
object-fit: cover;
}

.pilihan-list h4 {
font-size: 13px;
font-family: var(--font-heading);
line-height: 1.4;
font-weight: bold;
}

/* Social Media Follow */
.social-follow {
display: flex;
gap: 8px;
margin-top: 15px;
}

.social-follow a {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 50%;
color: #fff !important;
font-size: 14px;
}

.social-follow .fb { background: #3b5998; }
.social-follow .tw { background: #000; }
.social-follow .ig { background: #e1306c; }
.social-follow .yt { background: #ff0000; }

/* STREAMING_CHUNK: Mendesain elemen detail halaman berita tunggal (single.php) /
/ =========================================
4. SINGLE ARTICLE & PAGE TYPOGRAPHY
========================================= */
.breadcrumb {
font-size: 12px;
color: var(--text-muted);
margin-bottom: 15px;
font-weight: 700;
text-transform: uppercase;
font-family: var(--font-heading);
}

.breadcrumb a {
color: var(--color-blue);
}

.single-title {
font-size: 34px;
font-family: var(--font-heading);
line-height: 1.25;
margin-bottom: 20px;
color: #111;
font-weight: 900;
}

.single-meta {
font-size: 14px;
color: #555;
margin-bottom: 20px;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
padding: 12px 0;
}

.meta-author {
font-size: 14px;
margin-bottom: 5px;
}

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

/* Social Share */
.social-share {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 25px;
}

.share-label {
font-weight: bold;
font-size: 13px;
}

.share-btn {
padding: 6px 15px;
color: #fff !important;
font-size: 12px;
border-radius: 4px;
font-weight: bold;
display: inline-flex;
align-items: center;
gap: 5px;
}

.share-btn.fb { background: #3b5998; }
.share-btn.tw { background: #1da1f2; }
.share-btn.wa { background: #25d366; }

/* Gambar Utama */
.single-featured-image {
margin-bottom: 30px;
}

.single-featured-image img {
width: 100%;
height: auto;
border-radius: 6px;
}

.image-caption {
font-size: 12px;
color: #666;
font-style: italic;
padding: 10px;
background: #f9f9f9;
border-bottom: 2px solid #ddd;
margin-top: 5px;
}

/* STREAMING_CHUNK: Mengoptimalkan kenyamanan baca konten artikel */
.single-content {
font-size: 18px;
line-height: 1.8;
color: #333;
}

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

.single-content h2, .single-content h3 {
margin-top: 35px;
margin-bottom: 15px;
font-family: var(--font-heading);
font-weight: bold;
}

.single-content a {
color: var(--color-blue);
font-weight: bold;
text-decoration: underline;
}

.single-content blockquote {
border-left: 5px solid var(--color-orange);
padding-left: 20px;
font-style: italic;
color: #555;
margin: 25px 0;
background: #f9f9f9;
padding: 15px 20px;
}

.single-tags {
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid #eee;
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
font-size: 13px;
}

.single-tags a {
background: #eee;
padding: 5px 12px;
border-radius: 20px;
color: #555;
font-family: var(--font-heading);
}

.single-tags a:hover {
background: var(--color-orange);
color: #fff;
}

.post-navigation {
display: flex;
justify-content: space-between;
margin-top: 30px;
margin-bottom: 40px;
border-top: 2px solid #222;
padding-top: 15px;
font-family: var(--font-heading);
font-weight: bold;
font-size: 14px;
}

/* STREAMING_CHUNK: Mengatur tata letak halaman komentar interaktif /
/ Area Komentar */
.comments-area {
background: #fcfcfc;
padding: 30px;
border: 1px solid #eee;
border-radius: 8px;
margin-top: 40px;
}

.comments-title {
font-family: var(--font-heading);
font-size: 20px;
border-left: 4px solid var(--color-orange);
padding-left: 10px;
margin-bottom: 25px;
}

.comment-list {
list-style: none;
padding: 0;
}

.comment-list li {
margin-bottom: 20px;
border-bottom: 1px dashed #ddd;
padding-bottom: 20px;
}

.comment-author img {
border-radius: 50%;
float: left;
margin-right: 15px;
}

.comment-meta {
font-size: 12px;
color: #999;
margin-bottom: 10px;
}

.comment-form textarea {
width: 100%;
border: 1px solid #ccc;
padding: 15px;
font-family: var(--font-body);
border-radius: 4px;
outline: none;
}

.submit-btn {
background: var(--color-blue);
color: #fff;
border: none;
padding: 12px 24px;
font-weight: bold;
cursor: pointer;
border-radius: 4px;
font-family: var(--font-heading);
transition: background 0.2s;
}

.submit-btn:hover {
background: var(--color-orange);
}

/* STREAMING_CHUNK: Menyusun gaya visual untuk halaman arsip umum /
/ =========================================
5. ARCHIVE & SEARCH TEMPLATES
========================================= */
.archive-header {
margin-bottom: 30px;
border-bottom: 2px solid #222;
padding-bottom: 15px;
}

.archive-title {
font-family: var(--font-heading);
font-size: 28px;
font-weight: bold;
}

.archive-desc {
font-size: 14px;
color: var(--text-muted);
margin-top: 5px;
}

.archive-list {
display: flex;
flex-direction: column;
gap: 25px;
}

.archive-item {
display: flex;
gap: 20px;
border-bottom: 1px solid #eee;
padding-bottom: 25px;
}

.archive-item img {
width: 240px;
height: 150px;
object-fit: cover;
border-radius: 6px;
}

.archive-item-content {
flex: 1;
}

.archive-item-title {
font-family: var(--font-heading);
font-size: 20px;
font-weight: bold;
margin-bottom: 8px;
}

.archive-item-meta {
font-size: 12px;
color: var(--text-muted);
margin-bottom: 10px;
}

.archive-item-excerpt {
font-size: 14px;
color: #555;
line-height: 1.6;
}

/* STREAMING_CHUNK: Penyesuaian responsif media queries multi peranti /
/ =========================================
6. RESPONSIVE MEDIA QUERIES
========================================= */
@media (max-width: 1024px) {
body {
padding-top: 130px;
}
.content-area {
grid-template-columns: 100%;
gap: 40px;
}
.headline-main img {
height: 380px;
}
}

@media (max-width: 768px) {
body {
padding-top: 70px; /* Lebar menyusut di header mobile /
}
.header-top {
display: none !important; / Sembunyikan top area di mobile */
}
.mobile-nav-trigger {
display: block;
}
.main-navigation {
display: none;
}
.header-bottom {
border-top: none;
padding: 5px 0;
}
.headline-main img {
height: 250px;
}
.headline-main-content h2 {
font-size: 18px;
}
.news-grid, .sorotan-grid {
grid-template-columns: 100%;
gap: 25px;
}
.grid-item img {
height: 200px;
}
.archive-item {
flex-direction: column;
}
.archive-item img {
width: 100%;
height: 200px;
}
.single-title {
font-size: 24px;
}
.single-content {
font-size: 16px;
}
}