/* Reset and Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Arial', sans-serif; background-color: #f9f9f9; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
img { max-width: 100%; height: auto; display: block; }

/* ===== SEARCH SITELINKS (Liputan6-style category list) ===== */
.search-sitelinks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 25px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sitelink-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    flex: 0 0 auto;
    min-width: 150px;
}
.sitelink-item:hover, .sitelink-item.active {
    background: var(--primary, #003366);
    border-color: var(--primary, #003366);
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,51,102,0.2);
    text-decoration: none;
}
.sitelink-icon { font-size: 20px; flex-shrink: 0; }
.sitelink-name { font-size: 14px; font-weight: bold; line-height: 1.2; }
.sitelink-desc { font-size: 11px; color: #888; margin-top: 2px; }
.sitelink-item:hover .sitelink-desc,
.sitelink-item.active .sitelink-desc { color: rgba(255,255,255,0.75); }
@media (max-width: 768px) {
    .search-sitelinks { gap: 8px; padding: 10px; }
    .sitelink-item { min-width: 120px; padding: 8px 10px; }
    .sitelink-name { font-size: 12px; }
}


/* Top Bar */
.top-bar { background-color: #1a1a1a; color: #ccc; font-size: 13px; padding: 8px 0; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-links a { margin-left: 20px; transition: color 0.2s; }
.top-bar-links a:hover { color: #fff; }

/* Header */
.site-header { background-color: #fff; padding: 25px 0; border-bottom: 2px solid var(--primary, #003366); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.site-header .container > div:first-child { flex-shrink: 0; }
.header-ad-space { flex: 1; max-width: 728px; display: flex; justify-content: flex-end; }
.logo { font-size: 36px; font-weight: bold; color: var(--primary, #003366); letter-spacing: -1px; }
.logo span.red { color: var(--secondary, #cc0000); }
.logo-tagline { font-size: 13px; color: #777; font-weight: normal; margin-top: -5px; display: block; }
.header-ad { width: 100%; max-width: 728px; height: 90px; background: #e5e5e5; display: flex; align-items: center; justify-content: center; color: #999; border: 1px dashed #ccc;}

/* Main Nav */
.main-nav { background-color: var(--primary, #003366); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.main-nav .container { display: flex; justify-content: space-between; align-items: center; }
.main-nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
.main-nav ul li a { display: block; padding: 15px 20px; color: #fff; font-weight: bold; font-size: 14px; text-transform: uppercase; transition: background 0.2s; }
.main-nav ul li a:hover, .main-nav ul li a.active { background-color: rgba(0,0,0,0.2); }

/* Search Box */
.search-form { display: flex; align-items: center; }
.search-form input { padding: 8px 12px; font-size: 13px; border: none; outline: none; width: 200px; }
.search-form button { background: var(--secondary, #cc0000); color: #fff; border: none; padding: 8px 12px; cursor: pointer; }

/* Trending Bar */
.trending-bar { background-color: #222; color: #fff; display: flex; align-items: stretch; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); margin-bottom: 20px; }
.badge-terkini { background-color: var(--secondary, #cc0000); color: #fff; font-weight: bold; padding: 8px 15px; text-transform: uppercase; white-space: nowrap; }
.trending-marquee { padding: 8px 15px; flex-grow: 1; align-items: center; display: flex; }
.trending-marquee a { color: #ccc; margin-right: 30px; }
.trending-marquee a:hover { color: #fff; text-decoration: underline; }

/* Layout Grid */
.grid-main { display: flex; gap: 30px; margin-top: 30px; margin-bottom: 50px; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* Section Title */
.section-title { font-size: 18px; font-weight: bold; color: #111; border-left: 5px solid var(--primary, #003366); padding-left: 12px; margin-bottom: 20px; text-transform: uppercase; }

/* Hero Card (Berita Utama) */
.hero-card { display: block; position: relative; overflow: hidden; margin-bottom: 30px; border-radius: 4px; background: #000; }
.hero-card img { width: 100%; transition: transform 0.3s; opacity: 0.85; }
.hero-card:hover img { transform: scale(1.03); opacity: 1; }
.hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.9)); color: #fff; }
.hero-content .tag { background: var(--secondary, #cc0000); color: #fff; padding: 4px 10px; font-size: 11px; text-transform: uppercase; font-weight: bold; border-radius: 2px; display: inline-block; margin-bottom: 10px; }
.hero-title { font-size: 24px; font-weight: bold; line-height: 1.3; margin-bottom: 10px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.hero-content .meta { font-size: 13px; color: #ddd; }

/* News List */
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-item { display: flex; gap: 20px; background: #fff; padding: 15px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.news-item img { width: 220px; height: 140px; object-fit: cover; border-radius: 3px; }
.news-item-content { flex: 1; }
.news-item-title { font-size: 18px; font-weight: bold; color: var(--primary, #003366); margin-bottom: 8px; line-height: 1.4; transition: color 0.2s; }
.news-item-title:hover { color: var(--secondary, #cc0000); }
.news-item .meta { font-size: 12px; color: #888; margin-bottom: 10px; }
.news-item p { font-size: 14px; color: #555; }

/* Top 2 Grid Bawah Berita Utama */
.sub-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }

/* Sidebar Popular */
.popular-list { list-style: none; background: #fff; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-top: 3px solid var(--secondary, #cc0000); }
.popular-list li { display: flex; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #eee; align-items:flex-start; }
.popular-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.popular-list .counter { font-size: 24px; font-weight: bold; color: #e0e0e0; min-width: 30px; }
.popular-list h4 a { font-size: 15px; color: #333; line-height: 1.4; font-weight: 600; transition: color 0.2s; }
.popular-list h4 a:hover { color: var(--secondary, #cc0000); }

/* Detail Article */
.article-detail { background: #fff; padding: 30px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.article-header { margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.article-breadcrumb { font-size: 13px; color: #888; margin-bottom: 15px; }
.article-title { font-size: 32px; font-weight: bold; color: #111; line-height: 1.3; margin-bottom: 15px; }
.article-meta { font-size: 14px; color: #666; display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.article-meta strong { color: var(--secondary, #cc0000); }
.article-image { margin: 0 0; width: 100%; height: auto; border-radius: 4px; }
.article-body { font-size: 16px; color: #333; line-height: 1.8; }
.article-body p { margin-bottom: 20px; }
.article-body h2, .article-body h3 { margin: 30px 0 15px; color: #111; }

/* Footer */
.site-footer { background-color: #1a1a1a; color: #aaa; margin-top: auto; }
.footer-top { padding: 50px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-title { color: #fff; font-size: 16px; font-weight: bold; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-logo { font-size: 28px; font-weight: bold; color: #fff; margin-bottom: 15px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #aaa; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { background-color: #000; padding: 20px 0; text-align: center; font-size: 13px; color: #777; }

/* Responsive */
@media (max-width: 992px) {
    .grid-main { flex-direction: column; }
    .sidebar { width: 100%; }
    .site-header .container { flex-direction: column; gap: 15px; text-align: center; }
    .main-nav .container { flex-direction: column; width: 100%; padding: 0; }
    .main-nav ul { width: 100%; justify-content: center; flex-wrap: wrap; }
    .search-form { width: 100%; padding: 10px; background: rgba(0,0,0,0.1); }
    .search-form input { flex-grow: 1; }
}
@media (max-width: 768px) {
    body { font-size: 14px; }
    .container { padding: 0 10px; }
    .top-bar .container { flex-direction: column; text-align: center; gap: 10px; }
    .top-bar-links { display: flex; flex-wrap: wrap; justify-content: center; }
    .top-bar-links a { margin: 5px 10px; }
    
    .site-header { padding: 15px 0; }
    .logo { font-size: 30px; }
    
    /* Make Ad banners responsive so they don't break the layout */
    .header-ad-space, .ad-container { max-width: 100%; overflow: hidden; margin-top: 10px; }
    .header-ad-space img, .ad-container img { max-width: 100%; height: auto; object-fit: contain; }
    
    /* Horizontal scrolling for Nav on mobile */
    .main-nav ul { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .main-nav ul::-webkit-scrollbar { display: none; }
    .main-nav ul li a { padding: 12px 15px; font-size: 13px; white-space: nowrap; border-right: 1px solid rgba(255,255,255,0.05); }
    
    .trending-bar { flex-direction: column; }
    .badge-terkini { text-align: center; }
    
    .hero-title { font-size: 18px; }
    .sub-hero-grid { grid-template-columns: 1fr; gap: 15px; }
    
    .news-item { flex-direction: column; padding: 10px; }
    .news-item img { width: 100%; height: auto; margin-bottom: 10px; }
    
    /* Make inline style banners stack on mobile */
    div[style*="display:flex; flex-wrap:wrap; gap:15px; margin-bottom: 25px;"] {
        flex-direction: column; align-items: center;
    }
    
    .footer-top { padding: 30px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; text-align: center; text-align: left; }
    .article-title { font-size: 24px; }
    .article-detail { padding: 15px; }
    .d-none-mobile { display: none !important; }
}
@media (max-width: 480px) {
    .logo { font-size: 26px; }
    .news-item-title { font-size: 16px; }
}

/* Article Tags */
.article-tags { margin: 25px 0; }
.article-tags strong { color: #555; font-size: 14px; }
.tag-pill { background: #f1f1f1; border: 1px solid #ddd; color: #333; padding: 5px 12px; border-radius: 20px; font-size: 12px; margin-left: 5px; display: inline-block; font-weight: bold; }

/* Baca Juga */
.read-also { margin: 30px 0; padding: 20px; border: 1px solid #e0e0e0; background: #fafafa; border-left: 4px solid var(--secondary, #cc0000); border-radius: 4px; }
.read-also-title { font-size: 16px; font-weight: bold; color: var(--secondary, #cc0000); margin-bottom: 12px; }
.read-also-list { list-style: none; padding-left: 0; }
.read-also-list li { margin-bottom: 8px; font-size: 15px; }
.read-also-list li a { color: var(--primary, #003366); font-weight: bold; transition: color 0.2s; }
.read-also-list li a:hover { color: var(--secondary, #cc0000); text-decoration: underline; }

/* Comments Section */
.comments-section { margin-top: 40px; padding-top: 30px; border-top: 2px solid #eee; }
.comments-title { font-size: 22px; font-weight: bold; margin-bottom: 25px; color: #111; }
.comment-form { background: #fff; padding: 25px; border: 1px solid #e5e5e5; border-radius: 4px; margin-bottom: 40px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.comment-form-title { font-size: 16px; font-weight: bold; margin-bottom: 15px; color: #333; }
.form-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; font-family: inherit; background: #fdfdfd; }
.form-control:focus { outline: none; border-color: #003366; }
.btn-submit { background: var(--primary, #003366); color: #fff; border: none; padding: 10px 20px; font-weight: bold; border-radius: 3px; cursor: pointer; transition: background 0.2s; }
.btn-submit:hover { background: var(--secondary, #cc0000); }
.alert-success { background: #d4edda; color: #155724; padding: 12px 20px; border: 1px solid #c3e6cb; border-radius: 4px; margin-bottom: 25px; font-weight: bold; }

/* Comment List */
.comment-item { display: flex; gap: 15px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px dashed #eee; }
.comment-avatar img { width: 45px; height: 45px; border-radius: 50%; }
.comment-content { flex: 1; }
.comment-author { font-weight: bold; color: #111; font-size: 15px; }
.comment-date { font-size: 12px; color: #888; display: block; margin-top: 2px; margin-bottom: 8px; }
.comment-text { font-size: 14px; color: #444; line-height: 1.6; }
.no-comments { padding: 30px; text-align: center; background: #f9f9f9; border: 1px dashed #ccc; color: #777; border-radius: 4px; font-style: italic; }
