/* ==========================================================================
   NEWS TICKER (TEKS BERJALAN ALA DETIKCOM) - VERSI PIPIH
   ========================================================================== */
.news-ticker-wrapper {
    display: flex;
    width: 100%;
    height: 32px; /* Dibuat jauh lebih pipih, persis Detikcom */
    background-color: #0050a0;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Kotak Merah "Today's Recap" */
.ticker-label {
    background-color: #e50000;
    color: #ffffff;
    font-weight: 800;
    font-style: italic;
    font-size: 11px; /* Huruf dikecilkan agar proporsional */
    padding: 0 10px 0 12px; /* Jarak padding dikurangi */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 88% 100%, 0% 100%); 
    width: 100px; /* Lebar kotak merah diciutkan */
    flex-shrink: 0;
}

/* Pembungkus Teks Berjalan */
.ticker-content-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Teks yang meluncur */
.ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker-scroll 25s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

/* Gaya Judul Artikel */
.ticker-content a {
    color: #ffffff;
    text-decoration: none;
    font-size: 12px; /* Teks berita juga disesuaikan ukurannya */
    font-weight: 500;
}

.ticker-content a:hover {
    text-decoration: underline;
}

.ticker-separator {
    color: #ffffff;
    margin: 0 15px;
    font-size: 14px;
    opacity: 0.6;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ==========================================================================
   HANYA TAMPIL DI MOBILE (SEMBUNYIKAN DI DESKTOP)
   ========================================================================== */
@media (min-width: 768px) {
    .news-ticker-wrapper {
        display: none !important;
    }
}

/* ==========================================================================
   LAYOUT BERANDA (DENGAN BATAS JUDUL 3 BARIS & GAMBAR SIKU)
   ========================================================================== */

.main-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 25px;
}

/* Kolom Kiri: Konten Utama */
.content-area {
    flex: 1;
    min-width: 300px;
}

/* Judul Section */
.page-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 15px;
}

.page-title {
    font-size: 18px !important;
    font-weight: 700 !important; /* Bold yang tegas tapi tidak terlalu gemuk */
    color: #333333 !important; /* Warna hitam elegan sesuai contoh gambar */
    text-transform: capitalize !important; /* Huruf besar di awal kata saja agar mirip contoh */
    margin: 0 !important;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; /* Font bersih standar media */
    letter-spacing: -0.3px !important; /* Memberikan kesan modern */
}

/* --- STYLE LIST ITEM --- */
.search-result-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
}

/* Gambar: Kotak di Mobile & Siku (Tajam) */
.post-thumbnail-square {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background-color: #f5f5f5;
    border-radius: 0 !important; /* Paksa siku */
    overflow: hidden;
}

.post-thumbnail-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important; /* Paksa siku */
}

/* Kolom Teks */
.post-content-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.post-cat-label {
    font-size: 11px !important;
    font-weight: 700 !important; /* Bold yang tegas namun bersih */
    color: #333333 !important; /* Warna hitam elegan sesuai contoh gambar */
    text-transform: capitalize !important; /* Huruf kapital di awal kata agar lebih elegan */
    text-decoration: none !important;
    margin-bottom: 5px !important;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; /* Font sistem modern */
    letter-spacing: -0.1px !important; /* Rapatan teks halus agar tidak renggang */
}
/* Judul: Batasan Maksimal 3 Baris */
.post-title-list {
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
    margin: 0 0 8px 0;
    
    /* Efek Titik-titik (...) pada baris ke-3 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-title-list a {
    color: #000000;
    text-decoration: none;
}

.post-date-list {
    font-size: 12px;
    color: #888888;
}

/* --- TAMPILAN DESKTOP (16:9 & JUDUL LEBIH BESAR) --- */
@media (min-width: 768px) {
    .post-thumbnail-square {
        width: 260px;
        height: auto;
        aspect-ratio: 16 / 9; /* Rasio melebar */
    }

    .post-title-list {
        font-size: 22px;
        margin-bottom: 12px;
        line-height: 1.4;
        -webkit-line-clamp: 3; /* Tetap 3 baris di desktop */
    }

    .post-date-list {
        font-size: 14px;
    }
}

/* --- AREA SIDEBAR KANAN --- */
.sidebar-area {
    width: 330px;
    flex-shrink: 0;
}


/* Responsif: Sidebar pindah ke bawah */
@media (max-width: 991px) {
    .sidebar-area {
        width: 100%;
    }
}

/* ==========================================================================
   TOMBOL INDEKS BERITA (VERSI RINGKAS & SIMPEL)
   ========================================================================== */
.indeks-link-wrapper {
    text-align: center;
    margin: 20px 0 40px 0; /* Memberi ruang di bawah sebelum footer */
}

.btn-indeks-berita {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff;
    color: #444444;
    padding: 8px 18px; /* Ukuran lebih kecil dan ramping */
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    border: 1.5px solid #eeeeee; /* Garis lebih tipis dan halus */
    border-radius: 4px; /* Sedikit lengkungan agar tidak terlalu kaku */
    transition: all 0.2s ease;
}

.btn-indeks-berita:hover {
    background-color: #f9f9f9;
    border-color: #cccccc;
    color: #000000;
}

.btn-indeks-berita svg {
    width: 14px; /* Ikon diperkecil */
    height: 14px;
    stroke: #888888;
}

/* Di mobile tidak usah full width, biarkan mungil di tengah */
@media (max-width: 768px) {
    .btn-indeks-berita {
        display: inline-flex; 
        width: auto; 
    }
}

/* ==========================================================================
   FEATURED SLIDER HEADLINE - DESKTOP STYLE
   ========================================================================== */

.headline-slider-wrapper {
    margin-bottom: 35px;
    position: relative;
}

.slider-container {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 12px; /* Sudut melengkung halus */
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.45, 0, 0.55, 1);
}

.slider-item {
    min-width: 100%;
    position: relative;
    aspect-ratio: 16 / 9;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay Gradasi Hitam agar teks terbaca jelas */
.slider-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

/* Konten Teks di Atas Gambar */
.slider-caption {
    position: absolute;
    bottom: 40px;
    left: 30px;
    right: 30px;
    z-index: 2;
    color: #ffffff;
}

/* Kategori dengan Garis Bawah Merah */
.slider-cat {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 5px;
}

.slider-cat::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px; /* Panjang garis merah */
    height: 3px;
    background-color: #e53935;
}

/* Judul Besar dan Tebal */
.slider-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px 0;
    max-width: 90%;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slider-meta {
    font-size: 13px;
    color: #cccccc;
    display: block;
}

/* --- NAVIGASI PANAH BULAT --- */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s ease;
    opacity: 0; /* Sembunyi, muncul saat hover container */
}

.slider-container:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev { left: 20px; }
.next { right: 20px; }

/* --- INDIKATOR DOTS DI POJOK KANAN --- */
.slider-dots {
    position: absolute;
    bottom: 25px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #e53935; /* Warna merah untuk yang aktif */
    width: 25px; /* Lebih panjang saat aktif */
}

/* --- ADJUSTMENT DESKTOP --- */
@media (min-width: 1024px) {
    .slider-title {
        font-size: 36px; /* Judul makin gahar di layar gede */
    }
    
    .slider-caption {
        left: 50px;
        bottom: 50px;
    }
}

/* ==========================================================================
   OPTIMASI SLIDER MOBILE (VERSI MUNGIL & RAMPING)
   ========================================================================== */

@media (max-width: 767px) {
    .headline-slider-wrapper {
        margin: 10px 0 20px 0;
        padding: 0;
    }

    .slider-container {
        border-radius: 0;
        overflow: visible;
        background: transparent; /* Pastikan background container bening */
    }

    .slider-track {
        display: flex;
        overflow-x: auto;
        /* Biar kartu berhenti pas di awal (kiri), bukan di tengah */
        scroll-snap-type: x mandatory; 
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        /* Padding kiri disamakan dengan container konten kamu agar sejajar */
        padding: 0 15px 10px 15px; 
        gap: 12px;
        background: transparent;
    }

    .slider-item {
        flex: 0 0 75%; 
        min-width: 75%;
        height: 300px; 
        /* Titik magnet berhenti di awal (kiri) kartu */
        scroll-snap-align: start; 
        border-radius: 5px;
        overflow: hidden;
        position: relative;
    }

    .slider-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .slider-image-overlay {
        height: 100%;
        background: linear-gradient(to bottom, transparent 10%, rgba(0,0,0,0.85) 100%);
    }

    /* Gaya Teks Tengah & Mungil */
    .slider-caption {
        bottom: 20px;
        left: 10px;
        right: 10px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

	.slider-nav {
        display: none !important;
    }
	
    .slider-cat {
        background: #333;
        color: #fff;
        padding: 2px 8px;
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
        border-radius: 2px;
        margin-bottom: 8px;
        width: fit-content;
    }
	
	.slider-cat::after {
        display: none !important;
    }

    .slider-title {
        font-size: 13px; /* Ukuran teks lebih kecil */
        font-weight: 700;
        line-height: 1.3;
        color: #ffffff;
        margin: 0 0 8px 0;
        /* Maksimal 3 baris */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .slider-meta {
        font-size: 10px;
        color: rgba(255,255,255,0.6);
    }

    /* Titik navigasi mini */
    .slider-dots {
        position: static;
        justify-content: center;
        margin-top: 12px;
        gap: 5px;
    }

    .dot {
        width: 6px;
        height: 3px;
        background: #ddd;
        border-radius: 2px;
    }

    .dot.active {
        background: #000000;
        width: 12px;
    }
}

/* ==========================================================================
   TRENDING TAGS STYLE (FINAL: ALIGNED LEFT FOR MOBILE)
   ========================================================================== */

.trending-tags-container {
    /* Perkecil padding atas menjadi 0 agar benar-benar mepet */
    padding: 0px 15px 25px 15px; 
    background: #fff;
    border-bottom: none !important; 
    
    /* Naikkan elemen lebih tinggi ke arah slider */
    margin-top: -15px; 
    
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.trending-tags-header {
    font-size: 19px;
    font-weight: 700;
    color: #2c529d; 
    margin-bottom: 20px;
}

.trending-tags-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px 10px;
}

.trending-tag-item {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    white-space: normal; 
    line-height: 1.2;
}

.tag-hash {
    color: #ff5722; 
    font-weight: 800;
    font-size: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* --- ADJUSTMENT KHUSUS MOBILE (GESER KIRI) --- */
@media (max-width: 480px) {
    .trending-tags-container {
        /* Mengurangi padding kiri agar teks lebih mepet ke pinggir kiri layar */
        padding-left: 10px; 
        padding-right: 15px;
    }

    .trending-tags-header {
        font-size: 18px;
        /* Jika judul masih kurang ke kiri, gunakan margin negatif sedikit */
        margin-left: -2px; 
        margin-bottom: 15px;
    }

    .trending-tags-grid {
        /* Menggeser seluruh grid tag sedikit ke kiri */
        margin-left: -2px; 
        gap: 12px 5px;
    }

    .trending-tag-item {
        font-size: 13.5px; 
    }
}

/* ==========================================================================
   FIXED: EDITOR'S PICKS (NO BORDER, ALIGNED, & TIGHTER SPACING)
   ========================================================================== */

/* 1. Hapus garis artikel ke-3 agar tidak ada double garis di atas Editor's Pick */
.post-grid article:nth-child(3) {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. Kontainer Utama: Dibuat lebih naik */
.editor-picks-wrapper {
    padding: 0 0 30px 0; /* Padding atas dinolkan */
    background: #fff;
    width: 100%;
    margin-top: 17px; /* Menarik konten ke atas agar rapat */
    border: none !important;
}

.editor-picks-label {
    font-size: 19px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 20px;
    text-transform: capitalize;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.editor-picks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 Kolom */
    gap: 20px 15px;
}

.pick-item {
    display: flex;
    flex-direction: column;
}

.pick-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.pick-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pick-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.pick-title a {
    color: #111;
    text-decoration: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* --- RESPONSIVE MOBILE: 2 KOLOM & GESER KIRI --- */
@media (max-width: 768px) {
    .editor-picks-wrapper {
        margin-top: 18px; /* Tarik lebih kuat di mobile */
    }

    .editor-picks-label {
        font-size: 18px;
        margin-left: -2px; /* Geser judul sedikit ke kiri agar sejajar */
    }

    .editor-picks-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobile: 2 Kolom */
        gap: 15px 10px;
        margin-left: -2px; /* Geser grid sedikit ke kiri */
    }

    /* Tampilkan hanya 4 artikel di mobile */
    .editor-picks-grid .pick-item:nth-child(n+5) {
        display: none;
    }

    .pick-title {
        font-size: 13px;
    }
}

/* --- OPTIMASI DESKTOP --- */
@media (min-width: 1024px) {
    .editor-picks-grid {
        gap: 25px 15px;
    }
}

/* ==========================================================================
   HORIZONTAL SCROLL BLOCK (POSISI 7)
   ========================================================================== */

.horizontal-block-wrapper {
    padding: 20px 0;
    width: 100%;
	margin-top: -15px;
    background: #fff;
}

.horizontal-block-title {
    font-size: 19px;
    font-weight: 700;
    color: #333333; /* Merah sesuai gambar referensi */
    margin-bottom: 15px;
    border-bottom: 2px solid #cc0000;
    display: inline-block;
    padding-bottom: 5px;
}

.horizontal-scroll-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 Kolom sejajar */
    gap: 15px;
}

.scroll-item {
    display: flex;
    flex-direction: column;
}

.scroll-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.scroll-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroll-item-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.scroll-item-title a {
    color: #111;
    text-decoration: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- MOBILE VERSION (SCROLLABLE) --- */
@media (max-width: 480px) {
    .horizontal-scroll-container {
        display: flex; /* Ubah grid ke flex agar bisa scroll samping */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    /* Hilangkan scrollbar agar estetik */
    .horizontal-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .scroll-item {
        flex: 0 0 75%; /* Setiap item selebar 75% layar agar item sebelahnya terlihat sedikit */
        scroll-snap-align: start;
    }
    
    .scroll-item-title {
        font-size: 13px;
    }
}

/* --- HAPUS GARIS ARTIKEL KE-7 --- */
.post-grid article:nth-child(7) {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

