/* * Main CSS for Berita Kobar Theme 
 * Managed by PT. Kobar Digital Nusantara
 */

/* --- Root Colors & Dark Mode --- */
:root {
    --primary-green: #008751;
    --secondary-red: #D32F2F;
    --bg-light: #F4F7F6;
    --text-dark: #1A1A1A;
    --white: #FFFFFF;
    --border-color: #eeeeee;
    --text-muted: #666666;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-mode {
    --bg-light: #121212;
    --text-dark: #e0e0e0;
    --white: #1e1e1e;
    --border-color: #333333;
    --text-muted: #aaaaaa;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Base Style & Tipografi Multi-Perangkat */
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    /* Font Stack Modern: Optimal untuk Windows PC, Laptop, Mac, Tablet, & Smartphone */
    font-family: 
        'Segoe UI',           /* Windows PC & Laptop */
        Roboto,               /* Android & Modern ChromeOS */
        'Helvetica Neue',     /* macOS, iPhone, iPad (Modern) */
        -apple-system,        /* iOS & Safari System */
        Arial,                /* Fallback standar */
        sans-serif, 
        'Apple Color Emoji',  /* Dukungan Emoji */
        'Segoe UI Emoji';
    
    /* Rendering Font Halus (Anti-aliasing) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; height: auto; }

/* --- 1. Preloader --- */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--white);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-light);
    border-top: 5px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- 2. Header & Navigasi --- */
.site-header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo-wrapper a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.main-nav {
    background: var(--primary-green);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-list li a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-list li a:hover {
    background: rgba(255,255,255,0.15);
}

/* --- 3. Info Terkini (News Ticker) --- */
.news-ticker-container {
    overflow: hidden;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .news-ticker-container {
    background: #1a1a1a !important;
}

.news-ticker-container marquee a {
    transition: color 0.2s ease;
}

.news-ticker-container marquee a:hover {
    color: var(--primary-green) !important;
}

/* --- 4. News Grid & Cards --- */
.news-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.news-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.category-badge {
    background: var(--secondary-red);
    color: white;
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    width: fit-content;
}

.entry-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.entry-title a:hover { color: var(--primary-green); }

/* --- 5. Sidebar & Iklan --- */
.sidebar .widget {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    border-left: 4px solid var(--primary-green);
    padding-left: 12px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-dark);
}

.ads-wrapper {
    background: var(--bg-light);
    border: 1px dashed var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 8px;
}

/* --- 6. Responsive & Font Adjustment --- */

/* Pengaturan Teks PC & Laptop */
@media (min-width: 1024px) {
    body { font-size: 16px; }
}

/* Pengaturan Teks Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    body { font-size: 16.5px; }
}

/* Pengaturan Teks Smartphone */
@media (max-width: 767px) {
    body { font-size: 17px; }
    .news-grid { grid-template-columns: 1fr; }
    .site-header .container { flex-direction: column; gap: 15px; text-align: center; }
    .d-none-mobile { display: none !important; }
}