/* ============================================
   BERITA PILIHAN (INCLUDE) - DESKTOP STYLES
   Style: Minimalis, Tanpa Shadow, Tanpa Hover Berlebihan
   ============================================ */

/* Section Container */
.pilihan-news-section {
    margin-bottom: 30px;
    padding: 10px 0;
}

/* Header dengan Border Bottom */
.pilihan-news-header {
    margin-bottom: 20px;
    padding-bottom: 0;
}

.pilihan-news-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark, #1a1a1a);
    margin: 0;
    display: inline-block;
    line-height: 1.2;
}

/* Grid Layout - 3 Kolom Desktop */
.pilihan-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Card - MINIMALIS, TANPA SHADOW */
.pilihan-news-card {
    background: transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Link Wrapper */
.pilihan-news-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail Image - BORDER RADIUS KELILING */
.pilihan-news-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: 8px; /* Border radius keliling */
    margin-bottom: 12px;
    background: #f0f0f0;
}

.pilihan-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px; /* Border radius keliling pada gambar */
}

/* Content Area - PADDING SEPERLUNYA */
.pilihan-news-content {
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category Badge */
.pilihan-news-category {
    display: inline-block;
    background: transparent;
    color: var(--primary, #d32f2f);
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    align-self: flex-start;
}

/* Title */
.pilihan-news-title-item {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-dark, #1a1a1a);
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.pilihan-news-link:hover .pilihan-news-title-item {
    color: var(--primary, #d32f2f);
}

/* Meta Info - Minimalis */
.pilihan-news-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.pilihan-news-meta .author {
    font-weight: 600;
    color: #555;
}

.pilihan-news-meta .separator {
    color: #ddd;
}

.pilihan-news-meta time {
    color: #888;
}

/* ============================================
   BATASI DESKTOP HANYA 3 POST
   ============================================ */
@media (min-width: 768px) {
    .pilihan-news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Sembunyikan post ke-4 dan seterusnya di desktop */
    .pilihan-news-card:nth-child(n+4) {
        display: none !important;
    }
}

/* ============================================
   BERITA KATEGORI - DESKTOP STYLES
   (Style sama persis dengan Berita Pilihan)
   ============================================ */

.kategori-news-section {
    margin-bottom: 30px;
    padding: 10px 0;
}

/* Header dengan Flexbox untuk Title dan See All */
.kategori-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
 
}

.kategori-news-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark, #1a1a1a);
    margin: 0;
    line-height: 1.2;
 }

/* Tombol See All - Pills Merah Compact */
.kategori-see-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d32f2f;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px; /* Pills shape */
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.kategori-see-all:hover {
    background: #b71c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.kategori-see-all svg {
    width: 12px;
    height: 12px;
}
/* Grid Layout - 3 Kolom Desktop */
.kategori-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Card - Minimalis, Tanpa Shadow */
.kategori-news-card {
    background: transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Link Wrapper */
.kategori-news-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail Image - Border Radius Keliling */
.kategori-news-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f0f0f0;
}

.kategori-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Content Area */
.kategori-news-content {
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category Badge - Text Merah Tanpa Background */
.kategori-news-category {
    display: inline-block;
    background: transparent;
    color: var(--primary, #d32f2f);
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    align-self: flex-start;
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.08);
}

/* Title */
.kategori-news-title-item {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-dark, #1a1a1a);
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.06);
}

.kategori-news-link:hover .kategori-news-title-item {
    color: var(--primary, #d32f2f);
}

/* Meta Info */
.kategori-news-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
}

.kategori-news-meta .author {
    font-weight: 600;
    color: #555;
}

.kategori-news-meta .separator {
    color: #ddd;
}

.kategori-news-meta time {
    color: #888;
}

/* ============================================
   KATEGORI 3 - DESKTOP STYLES
   ============================================ */
.kategori3-section { margin-bottom: 30px; padding: 10px 0; }

.kategori3-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
     
}

.kategori3-title { font-size: 1.4rem; font-weight: 800; color: #1a1a1a; margin: 0; line-height: 1.2; }

/* Logika Tombol */
.kategori3-btn-desktop { display: inline-flex; }
.kategori3-mobile-action { display: none; }

.kategori3-see-all {
    display: inline-flex; align-items: center; gap: 6px; background: #d32f2f; color: #fff;
    padding: 6px 14px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
    text-decoration: none; letter-spacing: 0.5px; transition: all 0.2s ease; white-space: nowrap;
}
.kategori3-see-all:hover { background: #b71c1c; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3); }
.kategori3-see-all svg { width: 12px; height: 12px; }

/* Grid Desktop: KUNCI 3 KOLOM */
.kategori3-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
}

/* PENTING: Sembunyikan post ke-4 dan seterusnya di Desktop */
.kategori3-card:nth-child(n+4) {
    display: none !important;
}

/* Card & Content Styles */
.kategori3-card { background: transparent; height: 100%; display: flex; flex-direction: column; }
.kategori3-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.kategori3-thumbnail { position: relative; overflow: hidden; aspect-ratio: 16/9; width: 100%; border-radius: 8px; margin-bottom: 12px; background: #f0f0f0; }
.kategori3-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; transition: transform 0.3s ease; }
.kategori3-card:hover .kategori3-thumbnail img { transform: scale(1.05); }
.kategori3-content { padding: 0 4px; display: flex; flex-direction: column; flex: 1; }
.kategori3-category { display: inline-block; background: transparent; color: #d32f2f; padding: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 8px; align-self: flex-start; }
.kategori3-title-item { font-size: 0.85rem; font-weight: 700; line-height: 1.35; color: #1a1a1a; margin: 0 0 8px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.kategori3-link:hover .kategori3-title-item { color: #d32f2f; }
.kategori3-meta { font-size: 12px; color: #888; display: flex; align-items: center; gap: 6px; margin-top: auto; }
.kategori3-meta .author { font-weight: 600; color: #555; }
.kategori3-meta .separator { color: #ddd; }

/* ============================================
   BATASI DESKTOP HANYA 3 POST
   ============================================ */
@media (min-width: 768px) {
    .kategori-news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Sembunyikan post ke-4 dan seterusnya di desktop */
    .kategori-news-card:nth-child(n+4) {
        display: none !important;
    }
}
 
/* ============================================
   BERITA BY TAG - MOBILE (FIXED)
   ============================================ */

@media (max-width: 767px) {
    .tag-news-section {
        margin-bottom: 20px;
    }

    .tag-news-scroll {
        gap: 12px !important;
    }

    /* Card lebih kecil di mobile */
    .tag-news-card {
        flex: 0 0 200px !important;
        max-width: 200px !important;
        min-width: 200px !important;
        width: 200px !important;
    }

    .tag-news-title-box {
        padding: 10px 8px;
    }

    .tag-news-title-text {
        font-size: 0.75rem;
    }

    .tag-news-title-item {
        font-size: 0.85rem;
    }

    .tag-news-category {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .tag-news-card {
        flex: 0 0 170px !important;
        max-width: 170px !important;
        min-width: 170px !important;
        width: 170px !important;
    }

    .tag-news-title-box {
        padding: 8px 6px;
    }

    .tag-news-title-text {
        font-size: 0.7rem;
    }

    .tag-news-title-item {
        font-size: 0.8rem;
    }
}/* ============================================
   BERITA BY TAG - HORIZONTAL SCROLL (FIXED)
   ============================================ */

.tag-news-section {
    margin-bottom: 30px;
    padding: 10px 0;
    width: 100%;
}

.tag-news-header {
    margin-bottom: 20px;
}

.tag-news-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark, #1a1a1a);
    margin: 0;
    display: inline-block;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* SCROLL CONTAINER - PAKSA FLEX HORIZONTAL */
.tag-news-scroll {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 10px;
    width: 100%;
}

.tag-news-scroll::-webkit-scrollbar {
    display: none;
}

/* CARD - PAKSA LEBAR TETAP */
.tag-news-card {
    flex: 0 0 150px !important;
    max-width: 150px !important;
    min-width: 150px !important;
    width: 150px !important;
    height: auto !important;
    background: transparent;
    flex-shrink: 0 !important;
}

.tag-news-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* Container Thumbnail - Anti Runtuh */
.tag-news-thumbnail {
    position: relative;
    width: 100%;
    height: 230px;
    padding-bottom: 133.33%; /* Rasio 3:4 */
    overflow: hidden;
    border-radius: 8px;
     background: #f0f0f0;
}

/* Gambar Full */
.tag-news-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.tag-news-card:hover .tag-news-thumbnail img {
    transform: scale(1.05);
}

/* Badge "News" - Menempel di Atas Title Box, Sebelah Kiri */
/* Badge "News" - Dinaikan ke atas tepi kotak hitam */
.tag-news-badge {
    position: absolute;
    top: -12px; /* Menarik badge ke atas, melewati tepi kotak hitam */
    left: 0; /* Rapat di sebelah kiri (mengikuti margin kotak) */
    background: #d32f2f;
    color: #fff;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 3;
    line-height: 1.2;
}

/* Blok Hitam dengan Margin Kiri-Kanan (Tidak Rapat ke Tepi) */
.tag-news-title-box {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: calc(100% - 16px);
    margin: 0 8px;
    background-color: #000000;
    padding: 8px 6px 8px 6px; /* Padding: atas kanan bawah kiri */
    padding-top: 4px; /* Tambah ruang untuk badge di atas */
    box-sizing: border-box;
    z-index: 2;
}


/* Teks Judul Lebih Kecil & Compact */
.tag-news-title-text {
    color: #ffffff;
    font-size: 0.65rem; /* Ukuran font diperkecil */
    font-weight: 700;
    line-height: 1.25; /* Line height diketatkan */
    margin: 0;
     display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    letter-spacing: 0.2px;
}
/* Content di Bawah Gambar (Sesuaikan sedikit) */
.tag-news-content {
    padding: 0 2px;
}

.tag-news-category {
    display: inline-block;
    color: var(--primary, #d32f2f);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tag-news-title-item {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark, #1a1a1a);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   LATEST NEWS - LIST HORIZONTAL STYLE
   ============================================ */

.latest-news-section {
    margin-bottom: 30px;
    padding: 10px 0;
}

.latest-news-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    
}

.latest-news-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark, #1a1a1a);
    margin: 0;
    display: inline-block;
    line-height: 1.2;
   
}

/* List Container */
.latest-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Setiap Item Berita */
.latest-news-item {
      padding: 15px 0;
}

.latest-news-item:first-child {
    padding-top: 0;
}

.latest-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.latest-news-link {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.latest-news-link:hover {
    opacity: 0.85;
}


/* Thumbnail di Kiri - Ukuran 164x100px */
.latest-news-thumbnail {
    flex: 0 0 164px;
    width: 164px;
    height: 100px;
    overflow: hidden;
    border-radius: 6px;
    background: #f0f0f0;
}

.latest-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.latest-news-link:hover .latest-news-thumbnail img {
    transform: scale(1.05);
}

/* Konten di Kanan */
.latest-news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Meta Top: Kategori + Timestamp */
.latest-news-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.latest-news-category {
    display: inline-block;
    color: #d32f2f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.latest-news-time {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

/* Judul Berita */
.latest-news-title-item {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-dark, #1a1a1a);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-news-link:hover .latest-news-title-item {
    color: #d32f2f;
}


