/*
Theme Name: in7detik
Theme URI: https://github.com/yourusername/in7detik
Author: AI Developer
Description: Tema portal media online profesional, cepat, responsive, dan SEO friendly dengan fitur mirip detik.com.
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: in7detik
*/

/* --- VARIABEL WARNA & STYLE (Light Mode) --- */
:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --primary-color: #0056b3; 
    --accent-color: #ff3b30;
    --card-bg: #f9f9f9;
    --border-color: #eeeeee;
    --muted-color: #666666;
}

/* --- VARIABEL WARNA (Dark Mode) --- */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #375a7f;
    --card-bg: #1e1e1e;
    --border-color: #2c2c2c;
    --muted-color: #aaaaaa;
}

/* --- RESET & GLOBAL STYLE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-color); }
img { max-width: 100%; height: auto; display: block; border-radius: 4px; }
ul { list-style: none; }

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- HEADER & NAVIGATION --- */
.site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0 0 0;
}
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}
.logo h1 { font-size: 28px; font-weight: 800; letter-spacing: -1px; color: var(--primary-color); }

/* Menu Utama (Primary) */
.primary-menu ul { display: flex; gap: 20px; border-top: 1px solid var(--border-color); padding: 10px 0; }
.primary-menu a { font-weight: 600; font-size: 15px; }

/* Menu Slider (Secondary) */
.secondary-menu { 
    background: var(--card-bg); 
    padding: 8px 0; 
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.secondary-menu ul { display: flex; gap: 25px; overflow-x: auto; scrollbar-width: none; }
.secondary-menu ul::-webkit-scrollbar { display: none; }
.secondary-menu a { font-size: 13px; color: var(--muted-color); white-space: nowrap; font-weight: 500; }

/* --- BREAKING NEWS TICKER --- */
.breaking-news { background: var(--accent-color); color: #ffffff; padding: 8px 0; overflow: hidden; font-size: 14px; }
.ticker-wrap { display: flex; align-items: center; }
.ticker-title { background: #000; padding: 2px 8px; font-weight: bold; font-size: 12px; text-transform: uppercase; margin-right: 15px; border-radius: 2px; }
.ticker-marquee { overflow: hidden; white-space: nowrap; width: 100%; }
.ticker-content { display: inline-block; animation: ticker 30s linear infinite; }
@keyframes ticker {
    0% { transform: translate3d(100%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* --- LAYOUT GRID UTAMA --- */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 25px;
}

/* --- HEADLINE SECTION (Ala Detik) --- */
.headline-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}
.main-headline { position: relative; }
.main-headline h2 { font-size: 24px; margin-top: 12px; font-weight: 700; line-height: 1.3; }
.main-headline p { color: var(--muted-color); font-size: 14px; margin-top: 8px; }

.secondary-headlines { display: flex; flex-direction: column; gap: 15px; }
.sec-item { display: flex; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.sec-item-thumb { width: 90px; height: 60px; object-fit: cover; }
.sec-item h4 { font-size: 14px; font-weight: 600; line-height: 1.4; }

/* --- MODULAR CATEGORY BLOCKS --- */
.category-block { margin-bottom: 35px; }
.block-title { 
    font-size: 18px; 
    text-transform: uppercase; 
    border-bottom: 3px solid var(--primary-color); 
    padding-bottom: 5px; 
    margin-bottom: 15px;
    font-weight: 700;
}
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.cat-card { display: flex; gap: 12px; background: var(--card-bg); padding: 10px; border-radius: 4px; }
.cat-card-thumb { width: 80px; height: 60px; object-fit: cover; }
.cat-card h4 { font-size: 14px; font-weight: 600; }

/* --- SIDEBAR & WIDGETS --- */
.widget { background: var(--card-bg); padding: 20px; border-radius: 4px; margin-bottom: 25px; border: 1px solid var(--border-color); }
.widget-title { font-size: 16px; font-weight: 700; text-transform: uppercase; border-left: 4px solid var(--accent-color); padding-left: 10px; margin-bottom: 15px; }
.trending-widget ul { display: flex; flex-direction: column; gap: 12px; }
.trending-widget li { display: flex; gap: 10px; align-items: flex-start; counter-increment: my-counter; font-size: 14px; font-weight: 600; }
.trending-widget li::before { content: counter(my-counter); background: var(--border-color); color: var(--text-color); font-size: 12px; font-weight: bold; padding: 2px 8px; border-radius: 50%; }

/* --- ADS SPOTS --- */
.ad-spot { background: #f0f0f0; text-align: center; color: #999; font-size: 11px; padding: 10px 0; margin: 15px 0; border: 1px dashed #ccc; }

/* --- RESPONSIVE MOBILE FRIENDLY --- */
@media (max-width: 992px) {
    .main-grid { grid-template-columns: 1fr; }
    .headline-section { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .cat-grid { grid-template-columns: 1fr; }
}