/* ===== GLOBAL ===== */
body {
    background-color: #f5f5f5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
}

/* ===== TOPBAR ===== */
.topbar {
    background: #ffffff;
    color: #315986;
    font-size: 0.85rem;
}

.topbar a {
    color: #d60000;
    text-decoration: none;
}

.topbar a:hover {
    text-decoration: underline;
}

/* ===== MAIN HEADER (LOGO + SEARCH) ===== */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.site-logo {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    color: #0d47a1;
    text-decoration: none;
}

.site-logo:hover {
    color: #0b3a84;
}

.site-tagline {
    font-size: 0.8rem;
    color: #607d8b;
}

.search-input-header {
    max-width: 260px;
}

/* HEADER NEMPEL DI ATAS SAAT SCROLL */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 3000;
    background: #ffffff; /* biar area di belakang topbar/header/nav tetap putih */
}

/* Pastikan navbar kategori di atas konten lain */
.category-bar {
    z-index: 3100;
}

@media (max-width: 767.98px) {
    .search-input-header {
        max-width: 100%;
        margin-top: 0.5rem;
    }
}

/* ===== CATEGORY NAVBAR ===== */
.category-bar {
    background: #d60000;
}

/* penting: jangan potong dropdown */
.category-bar .navbar-nav.flex-nowrap {
    flex-wrap: nowrap;
    overflow: visible;
}

.category-bar .navbar-collapse {
    overflow: visible;
}

/* link kategori */
.category-bar .navbar-nav .nav-link {
    color: #e3f2fd;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 0.9rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.category-bar .navbar-nav .nav-link:hover,
.category-bar .navbar-nav .nav-link.active {
    background: #0d47a1;
    color: #fff;
}

/* dropdown menu kategori */
.category-bar .dropdown-menu {
    font-size: 0.85rem;
}

/* container konten umum */
.content-wrapper {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}



/* ================= HEADLINE ================= */

/* ================= HEADLINE FIXED RATIO ================= */

/* Wrapper headline */
.headline-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}



/* gambar headline seragam 16:9 */
.headline-img {
    width: 100%;
    aspect-ratio: 16 / 9;   /* semua box headline sama besar */
    object-fit: cover;      /* gambar isi penuh, rapi */
    object-position: center;
    display: block;
}

/* fallback kalau tidak ada gambar */
.headline-img.no-image {
    background: #333;
}





/* judul di atas gambar */
.headline-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;   /* <— teks naik ke atas */
    padding: 14px 18px;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.3;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
}



/* HEADLINE KECIL */
.headline-small-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* seragam */
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    margin-bottom: 6px;
}

.headline-small-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
}

/* mobile */
@media (max-width: 576px) {
    .headline-title {
        font-size: 1rem;
        padding: 10px 14px;
    }
}

/* ================= GRID BERITA ================= */
.berita-box img {
    height: 140px;
    object-fit: cover;
}

.judul-berita a {
    color: #111;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}
.judul-berita a:hover {
    color: #0056b3;
}

/* Mobile adjustment */
@media (max-width: 576px) {
    .headline-box {
        height: 220px;
    }
    .headline-title {
        font-size: 18px;
    }
}

/* ===== HEADLINE KECIL DI BAWAH SLIDER ===== */
.headline-small {
    text-decoration: none;
    color: inherit;
}

.headline-small-img {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    margin-bottom: 6px;
}

.headline-small-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
}

.headline-small:hover .headline-small-title {
    color: #d60000;
}

/* ===== BOX TERPOPULER DI KANAN ===== */
.popular-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.popular-header {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.popular-line {
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: #d60000;
    margin-right: 8px;
}

.popular-list {
    margin: 0;
    padding: 0;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #f1f1f1;
}

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

.popular-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 10px;
}

.popular-content {
    flex: 1;
}

.popular-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}

.popular-title:hover {
    color: #d60000;
}

.popular-meta {
    font-size: 0.75rem;
    color: #777;
}

/* responsive tweak */
@media (max-width: 767.98px) {
    .popular-box {
        margin-top: 1rem;
    }
}

.detail-thumb {
    display: block;
    width: 100%;
    height: auto;
}

/* ================= DETAIL BERITA ================= */

.article-detail {
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
    margin-bottom: 24px;
}

.article-header {
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.75rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}

.article-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.article-meta a {
    color: #d60000;
    text-decoration: none;
}

.article-meta a:hover {
    text-decoration: underline;
}

.article-dot {
    margin: 0 4px;
}

.article-figure {
    margin: 16px 0 20px 0;
}

.article-thumb {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #111827;
}

/* ================= SIDEBAR TERPOPULER ================= */

.article-sidebar {
    background: #ffffff;
    padding: 16px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    border-left: 4px solid #d60000;
    padding-left: 8px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.popular-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.popular-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fef2f2;
    color: #d60000;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.popular-text a {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.popular-text a:hover {
    color: #d60000;
}

.popular-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Mobile */
@media (max-width: 767.98px) {
    .article-detail {
        padding: 16px 14px;
    }

    .article-title {
        font-size: 1.4rem;
    }
}



/* MOBILE */
@media (max-width: 576px) {
    .headline-box {
        height: 240px;
    }
    .headline-title {
        font-size: 18px;
    }
}

/* ===================== LIST BERITA ala detik.com ===================== */
.news-list-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.news-list-thumb {
    width: 130px;
    height: 85px;
    border-radius: 8px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.news-list-title a {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}
.news-list-title a:hover {
    color: #d60000;
}

.news-list-meta {
    font-size: 12px;
    color: #888;
}

/* MOBILE */
@media (max-width: 576px) {
    .news-list-thumb {
        width: 110px;
        height: 70px;
    }
    .news-list-title a {
        font-size: 14px;
    }
}
