body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F8F9FA; /* Latar belakang sangat ringan */
    line-height: 1.6;
    color: #212529; /* Warna teks gelap */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* --- VARIABEL WARNA (Aksen Biru Tua/Merah Anggur untuk kesan elegan) --- */
:root {
    --primary-color: #1A73E8; /* Biru Google/Modern */
    --accent-color: #D32F2F; /* Merah Anggur untuk kategori */
    --text-color: #212529;
    --light-bg: #fff;
    --border-color: #E9ECEF; /* Border sangat tipis dan lembut */
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.08); /* Shadow halus */
}

/* --- 1. HEADER STYLES (Modern & Clean) --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--light-bg);
    padding: 15px 40px; /* Padding lebih besar */
    box-shadow: var(--shadow-light);
    position: sticky; /* Sticky header untuk pengalaman modern */
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-size: 24px;
    font-weight: 900; /* Extra bold */
    margin: 0;
    letter-spacing: -0.5px;
}

.logo .accent {
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px; /* Jarak antar menu lebih lebar */
}

.main-nav a {
    color: #6C757D; /* Warna abu-abu yang lebih tenang */
    font-size: 15px;
    font-weight: 600;
}

.main-nav a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 12px;
}

.search-bar input {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px; /* Sudut membulat */
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    display: none; /* Sembunyikan tombol, biarkan input saja */
}

/* Hilangkan garis pemisah keras, gunakan margin bawah */
.separator { display: none; }

/* --- 2. HEADLINE SECTION STYLES (Card Layout) --- */
.container {
    max-width: 1200px;
    margin: 30px auto; /* Margin lebih besar */
    padding: 0 20px;
}

.headline-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

/* Garis bawah tipis untuk judul section */
.headline-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.headline-grid {
    display: flex;
    gap: 25px;
}

/* Berita Utama Kiri - Menggunakan Card */
.main-story {
    flex: 2;
    background-color: var(--light-bg);
    border-radius: 12px; /* Sudut membulat yang lebih lembut */
    overflow: hidden; /* Pastikan gambar terpotong rapi */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Shadow lebih menonjol */
}

.main-story img {
    width: 100%;
    height: 400px; /* Tinggi tetap agar konsisten */
    object-fit: cover;
    margin-bottom: 0;
    display: block;
}

.story-content {
    padding: 20px 25px; /* Padding konten yang lega */
}

.breaking-news-bar {
  display: flex; /* Untuk menyejajarkan label dan konten */
  background-color: #f44336; /* Warna merah marun untuk latar belakang bar */
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-family: sans-serif;
  margin: 20px; /* Contoh margin agar terlihat jelas */
}

.label {
  background-color: #c62828; /* Warna merah lebih gelap untuk label */
  padding: 4px 8px;
  margin-right: 15px;
  font-weight: bold;
  flex-shrink: 0; /* Mencegah label menyusut */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ticker-content {
  /* 2. Menyiapkan area Ticker */
  overflow: hidden; /* **PENTING:** Menyembunyikan teks di luar batas area */
  flex-grow: 1; /* Memastikan konten mengisi sisa ruang */
}

.ticker-content p {
  /* 3. Menyiapkan Teks untuk Bergerak */
  margin: 0;
  white-space: nowrap; /* **PENTING:** Memastikan semua teks dalam satu baris */
  display: inline-block; /* Agar bisa diatur posisinya */

  /* 4. Menerapkan Animasi */
  animation: scroll-text 30s linear infinite; /* Nama animasi, durasi, kecepatan konstan, berulang tanpa batas */
}

/* 5. Mendefinisikan Animasi Pergerakan (Keyframes) */
@keyframes scroll-text {
  0% {
      /* Mulai di luar layar sebelah kanan */
      transform: translateX(100%);
  }
  100% {
      /* Bergerak hingga keluar layar sebelah kiri */
      transform: translateX(-100%);
  }
}

.story-content h3 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin: 10px 0 15px 0;
}

.story-content h3 a {
    color: var(--text-color);
}

.story-content h3 a:hover {
    color: var(--primary-color);
}

.story-content p {
    color: #495057;
    margin-bottom: 15px;
}

.category {
    background-color: var(--accent-color); /* Warna kategori berbeda */
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timestamp {
    font-size: 13px;
    color: #ADB5BD;
}

/* Berita Pendukung Kanan */
.side-stories {
    flex: 1;
    padding-left: 25px;
    border-left: 1px solid var(--border-color); /* Garis pemisah yang lembut */
}

.side-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.side-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.side-item h4 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 5px 0 3px 0;
}

.side-item h4 a:hover {
    color: var(--primary-color);
}


/* --- RESPONSIVE DESIGN (Dipertahankan dan Ditingkatkan) --- */
@media (max-width: 992px) {
    .main-header {
        padding: 15px 20px;
    }
    .main-nav {
        display: none; /* Sembunyikan navigasi di layar kecil, ganti dengan menu burger (tidak diimplementasikan di sini) */
    }
}

@media (max-width: 768px) {
    .headline-grid {
        flex-direction: column;
        gap: 20px;
    }

    .main-story {
        box-shadow: none; /* Hilangkan shadow di ponsel untuk loading cepat */
    }

    .main-story img {
        height: 250px;
        border-radius: 12px 12px 0 0;
    }

    .story-content h3 {
        font-size: 24px;
    }

    .side-stories {
        border-left: none;
        padding-left: 0;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
    }
}

/* --- SECTION 3: CONTENT GRID STYLES --- */

.section-divider {
    border: 0;
    height: 1px;
    background-color: #E9ECEF;
    margin: 40px 0;
}

.content-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

.content-grid h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* --- KOLOM KIRI: BERITA TERBARU --- */
.latest-news-list {
    flex: 3; /* Mengambil proporsi lebih besar */
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-of-type {
    border-bottom: none;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.category-small {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-item .timestamp {
    font-size: 11px;
    color: #ADB5BD;
}

.news-item h4 {
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.news-item h4 a:hover {
    color: var(--primary-color);
}

.btn-more {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent-color);
    font-weight: 600;
}

/* --- KOLOM TENGAH: MEDIA OPSIONAL --- */
.featured-media-block {
    flex: 2;
}

.featured-media-block h3 {
    border-bottom: none;
    margin-bottom: 15px;
}

.media-card {
    position: relative;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.media-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-label {
    background-color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 10px;
}

/* --- KOLOM KANAN: SIDEBAR POPULER --- */
.trending-sidebar {
    flex: 2;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.trending-sidebar h3 {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.trending-item .number {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.trending-item .item-content {
    padding-top: 5px;
}

.trending-item p {
    font-weight: 700;
    margin: 0 0 5px 0;
    font-size: 15px;
}

.category-trending {
    font-size: 11px;
    color: #6C757D;
    text-transform: uppercase;
}

/* Promo Box */
.promo-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #F0F4FF; /* Latar belakang promo lebih lembut */
    border-radius: 8px;
    text-align: center;
}

.btn-subscribe {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-subscribe:hover {
    background-color: #A31F1F;
}

/* --- RESPONSIVE UNTUK LAYAR KECIL --- */
@media (max-width: 992px) {
    .content-grid {
        flex-direction: column; /* Ubah menjadi satu kolom vertikal */
    }

    .trending-sidebar {
        order: -1; /* Pindahkan Populer ke atas agar terlihat duluan di mobile */
    }
}

/* --- FOOTER STYLES --- */
.main-footer {
    background-color: #212529; /* Warna gelap untuk kontras */
    color: #F8F9FA;
    padding: 40px 0 20px 0;
    font-size: 14px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #495057;
    margin-bottom: 20px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h2 {
    color: white;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.footer-col p {
    color: #ADB5BD;
    line-height: 1.5;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #ADB5BD;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.social-links a {
    margin-right: 15px;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
}

.copyright {
    text-align: center;
    color: #ADB5BD;
    font-size: 12px;
}

.copyright a {
    color: #ADB5BD;
    text-decoration: underline;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .footer-col {
        min-width: 100%;
    }
    .footer-col ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .footer-col li {
        margin-bottom: 0;
    }
    .social-links {
        text-align: center;
    }
}

/* --- DETAIL ARTIKEL STYLES --- */

.article-container {
    padding-top: 30px;
}

.article-layout {
    display: flex;
    gap: 40px;
}

.main-article-content {
    flex: 3; /* Ambil bagian terbesar */
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.category-detail {
    background-color: var(--accent-color);
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
}

.main-article-content h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 10px 0 20px 0;
    font-weight: 800;
}

.article-meta-info {
    font-size: 14px;
    color: #6C757D;
    margin-bottom: 20px;
}

.article-meta-info .separator-dot {
    margin: 0 8px;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 600;
}

.article-figure {
    margin: 20px 0;
    text-align: center;
}

.article-figure img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

.article-figure figcaption {
    font-size: 13px;
    color: #6C757D;
    margin-top: 8px;
    text-align: left;
    padding: 0 10px;
}

/* Tipografi Isi Artikel */
.article-body {
    font-size: 18px; /* Ukuran besar untuk kenyamanan membaca */
    line-height: 1.7;
    color: #343A40;
}

.lead-paragraph {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.article-body h2 {
    font-size: 28px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--primary-color);
}

.article-body p a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Tags */
.tags {
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 14px;
}

.tags a {
    display: inline-block;
    background-color: #E9ECEF;
    color: #6C757D;
    padding: 5px 10px;
    border-radius: 20px;
    margin-right: 8px;
    font-weight: 500;
}

/* Sidebar Artikel */
.article-sidebar {
    flex: 1; /* Ambil bagian lebih kecil */
}

.article-sidebar h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
}

.related-news-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.related-news-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.related-news-list a {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    color: #343A40;
}

.related-news-list a:hover {
    color: var(--primary-color);
}

.ad-block {
    height: 300px;
    background-color: #E9ECEF;
    text-align: center;
    padding-top: 120px;
    color: #6C757D;
    border-radius: 8px;
}


/* Responsive Detail Artikel */
@media (max-width: 992px) {
    .article-layout {
        flex-direction: column;
    }
    .article-sidebar {
        order: -1; /* Pindahkan sidebar ke atas konten utama di mobile */
    }
    .main-article-content {
        padding: 20px;
    }
    .main-article-content h1 {
        font-size: 32px;
    }
    .article-body {
        font-size: 16px;
    }
}

/* --- KATEGORI PAGE STYLES --- */

/* Judul Utama Kategori */
.category-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 10px;
}

.category-name {
    color: var(--primary-color);
}

.category-name-small {
    color: var(--primary-color);
    text-transform: uppercase;
}

/* 1. Featured Card Kategori */
.category-featured {
    margin-bottom: 30px;
}

.featured-card {
    display: flex;
    background-color: var(--light-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.featured-card img {
    width: 45%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.featured-content {
    width: 55%;
    padding: 30px;
}

.category-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.featured-content h3 {
    font-size: 30px;
    line-height: 1.2;
    margin: 10px 0 20px 0;
    font-weight: 800;
}

.featured-content p {
    color: #495057;
    margin-bottom: 15px;
}

/* 2. Main Content Grid Kategori */
.category-content-grid {
    display: flex;
    gap: 30px;
}

.category-list-wrapper {
    flex: 2; /* Kolom list mengambil 2/3 */
}

.category-sidebar {
    flex: 1; /* Kolom sidebar mengambil 1/3 */
}

.category-list-wrapper h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* List Item dengan Gambar (List Item Media) */
.list-item-media {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.list-item-media img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0; /* Pastikan gambar tidak menyusut */
}

.category-tag-small {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-item-media h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 5px 0 8px 0;
}

.list-item-media p {
    color: #6C757D;
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
}

/* Sidebar Populer Kategori (Re-use trending-list style dari beranda) */
.category-sidebar h3 {
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 20px;
}

.ad-block-sidebar {
    height: 250px;
    background-color: #E9ECEF;
    text-align: center;
    padding-top: 100px;
    color: #6C757D;
    border-radius: 8px;
    margin-top: 30px;
}

/* Pagination */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    transition: background-color 0.3s;
}

.pagination a.active, .pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive Kategori */
@media (max-width: 992px) {
    .featured-card {
        flex-direction: column;
    }
    .featured-card img, .featured-content {
        width: 100%;
        height: auto;
    }

    .category-content-grid {
        flex-direction: column;
    }

    .category-list-wrapper {
        order: 2;
    }

    .category-sidebar {
        order: 1; /* Pindahkan sidebar ke atas */
        padding-top: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .list-item-media {
        flex-direction: column;
        gap: 10px;
    }

    .list-item-media img {
        width: 100%;
        height: 180px;
    }
}

/* Warna oranye sebagai latar belakang banner */
:root {
    --banner-color: #F8942A; /* Ganti dengan warna oranye yang sesuai */
    --light-bg: #f4f4f4; /* Warna latar belakang di bawah kurva */
}

/* --- STYLING BANNER MELENGKUNG --- */

.category-banner-wrapper {
    background-color: var(--banner-color);
    padding: 60px 0 0; /* Padding atas lebih besar */
    position: relative; /* Penting untuk menempatkan gelombang */
    color: white;
}

/* Penataan Konten di dalam Banner */
.category-banner-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 10;
}

.category-title-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
}

.category-title-banner a {
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    opacity: 0.8;
}

.category-title-banner a:hover {
    opacity: 1;
}

/* --- TEKNIK GELOMBANG DENGAN BORDER-RADIUS --- */

.wave-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px; /* Atur ketinggian gelombang */
    overflow: hidden;
}

/* Menciptakan bentuk melengkung menggunakan ::before */
.wave-shape::before {
    content: '';
    position: absolute;
    top: -50px; /* Geser ke atas untuk membuat lengkungan */
    left: -20%;
    right: -20%;
    height: 150%;
    background-color: var(--light-bg); /* Warna latar belakang halaman di bawahnya */
    border-radius: 0 0 50% 50% / 0 0 100% 100%; /* Membuat bentuk elips yang besar */
    transform: rotate(180deg); /* Putar untuk membuat cekungan ke bawah */
}

/* Memastikan konten utama (main) dimulai di bawah kurva */
.category-page {
    margin-top: 0;
}

/* Responsif: Kecilkan gelombang di mobile */
@media (max-width: 768px) {
    .category-banner-wrapper {
        padding: 60px 0 0;
    }
    .wave-shape {
        height: 60px;
    }
    .wave-shape::before {
        top: -30px;
    }
    .category-title-banner {
        font-size: 24px;
    }
}
