/* ==========================================================================
   PAGE DEFAULT - LAYOUT 2 KOLOM (Width: 1000px, Sidebar: 220px)
   File: assets/css/page.css
   Mencakup: Page Layout, Filter Bar (60:40), Tag/Category List, Pagination
   ========================================================================== */

/* ==========================================================================
   1. WRAPPER UTAMA (Width: 1000px)
   ========================================================================== */
.btp-content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0 60px;
    box-sizing: border-box;
}

.page-article {
    background: #ffffff;
    font-family: 'Manrope', sans-serif;
}

/* ==========================================================================
   2. HEADER HALAMAN
   ========================================================================== */
.page-header {
    padding: 10px 0 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-inside-title {
    font-size: 18px;
    font-weight: 800;
    color: #000;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-main-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
    display: none;
}

/* ==========================================================================
   3. BODY: 2 KOLOM (Total 1000px)
   ========================================================================== */
.page-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    align-items: flex-start;
}

/* ==========================================================================
   4. KOLOM KIRI: MENU NAVIGASI (Sidebar)
   ========================================================================== */
.page-sidebar {
    width: 220px;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.page-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-menu-list li {
    border-bottom: 1px solid #f0f0f0;
}

.page-menu-list li:last-child {
    border-bottom: none;
}

.page-menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    width: 100%;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-menu-list a::after {
    content: '›';
    font-size: 22px;
    color: #999;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.page-menu-list a:hover,
.page-menu-list li.current-menu-item a,
.page-menu-list a.active {
    color: #ef672f;
}

.page-menu-list a:hover::after,
.page-menu-list li.current-menu-item a::after,
.page-menu-list a.active::after {
    color: #ef672f;
    transform: translateX(3px);
}

/* ==========================================================================
   5. KOLOM KANAN: KONTEN
   ========================================================================== */
.page-content {
    min-width: 0;
    font-family: 'Manrope', sans-serif;
    color: #333;
}

.page-content h1, .page-content h2, .page-content h3, .page-content h4 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 24px 0 12px 0;
}
.page-content h2 { font-size: 22px; }
.page-content h3 { font-size: 18px; }
.page-content h4 { font-size: 16px; }

.page-content p {
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 16px 0;
    color: #444;
}

.page-content ul, .page-content ol { margin: 0 0 16px 24px; padding: 0; }
.page-content li { margin-bottom: 6px; font-size: 15px; line-height: 1.6; color: #444; }

.page-content a { color: #1a73e8; text-decoration: none; font-weight: 600; }
.page-content a:hover { text-decoration: underline; }
.page-content strong, .page-content b { font-weight: 700; color: #1a1a1a; }

.page-content blockquote {
    background: #f9f9f9;
    border-left: 4px solid #e60012;
    margin: 20px 0;
    padding: 16px 20px;
    font-style: italic;
    color: #555;
}

.page-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 16px 0; }

.page-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.page-content th, .page-content td { border: 1px solid #e0e0e0; padding: 10px 12px; text-align: left; }
.page-content th { background: #f5f5f5; font-weight: 700; }

/* ==========================================================================
   6. FILTER BAR (Indeks Berita) - RASIO 60:40
   ========================================================================== */
.bgn-list-filter {
    background: #f5f5f5;
    padding: 14px 20px;
    margin-bottom: 24px;
    border-radius: 6px;
}

.bgn-list-filter-inner { max-width: 100%; margin: 0; padding: 0; }

.bgn-list-filter-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}

/* Grup dasar */
.bgn-filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* ✅ KUNCI RASIO: 60% vs 40% */
.bgn-filter-group--date { flex: 3; }
.bgn-filter-group--cat { flex: 2; }

.bgn-filter-label {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
}

/* Input & Select mengisi sisa ruang di dalam grup */
.bgn-filter-date,
.bgn-filter-select {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    background: #ffffff;
    color: #333;
    height: 40px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    flex: 1;
    min-width: 0;
}

.bgn-filter-date:focus,
.bgn-filter-select:focus { outline: none; border-color: #1a3a8f; }
.bgn-filter-select { cursor: pointer; }

.bgn-filter-date::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; }
.bgn-filter-date::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.bgn-filter-search-btn {
    padding: 0 22px;
    background: #1a3a8f;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
    height: 40px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bgn-filter-search-btn:hover { background: #0f2a6f; }

.bgn-filter-reset {
    color: #e60012;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.bgn-filter-reset:hover { color: #b3000e; text-decoration: underline; }

.bgn-list-filter-info {
    padding: 12px 16px;
    background: #f9f9f9;
    border-left: 3px solid #e60012;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #555;
    font-family: 'Manrope', sans-serif;
}
.bgn-list-filter-info strong { color: #1a1a1a; margin-right: 8px; font-weight: 700; }

/* ==========================================================================
   7. TAG LIST & CATEGORY LIST (Persis latest-2-news-item)
   ========================================================================== */
.bgn-tag-list,
.bgn-category-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 24px;
}

/* --- MOBILE (< 1000px) --- */
.bgn-tag-list .bgn-category-item,
.bgn-category-list .bgn-category-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.bgn-tag-list .bgn-category-item:last-child,
.bgn-category-list .bgn-category-item:last-child { border-bottom: none; }
.bgn-tag-list .bgn-category-item:hover,
.bgn-category-list .bgn-category-item:hover { box-shadow: none; }

.bgn-tag-list .bgn-category-link,
.bgn-category-list .bgn-category-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* ✅ FIX: Hilangkan underline dari CSS global tema */
.bgn-category-link,
.bgn-tag-list .bgn-category-link,
.bgn-category-list .bgn-category-link,
.bgn-category-link *,
.bgn-tag-list .bgn-category-link *,
.bgn-category-list .bgn-category-link * {
    text-decoration: none !important;
}

.bgn-tag-list .bgn-category-thumb,
.bgn-category-list .bgn-category-thumb {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0;
    flex-shrink: 0;
    background: #f0f0f0;
}

.bgn-tag-list .bgn-category-thumb img,
.bgn-category-list .bgn-category-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.3s ease;
}

.bgn-tag-list .bgn-category-item:hover .bgn-category-thumb img,
.bgn-category-list .bgn-category-item:hover .bgn-category-thumb img { transform: scale(1.05); }

.bgn-tag-list .bgn-category-content,
.bgn-category-list .bgn-category-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    justify-content: flex-start; padding-top: 2px;
}

.bgn-tag-list .bgn-category-title-post,
.bgn-category-list .bgn-category-title-post {
    font-family: 'Manrope', sans-serif;
    font-size: 15px; font-weight: 800; color: #2a2a2a;
    line-height: 1.4; margin: 0 0 4px 0;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
    text-decoration: none; transition: color 0.2s ease;
    letter-spacing: -0.2px;
    text-shadow: 0 0.5px 0.5px rgba(0, 0, 0, 0.08);
}

.bgn-tag-list .bgn-category-link:hover .bgn-category-title-post,
.bgn-category-list .bgn-category-link:hover .bgn-category-title-post { color: #0066cc; }

.bgn-tag-list .bgn-category-meta,
.bgn-category-list .bgn-category-meta {
    display: flex; align-items: center; gap: 6px; margin-bottom: 0;
}

.bgn-tag-list .bgn-category-cat,
.bgn-category-list .bgn-category-cat,
.bgn-tag-list .bgn-category-separator,
.bgn-category-list .bgn-category-separator { display: none; }

.bgn-tag-list .bgn-category-date,
.bgn-category-list .bgn-category-date {
    font-size: 11px; color: #888; font-weight: 400;
}

.bgn-tag-list .bgn-category-excerpt,
.bgn-category-list .bgn-category-excerpt { display: none; }

/* --- DESKTOP (≥ 1000px) --- */
@media (min-width: 1000px) {
    .bgn-tag-list .bgn-category-item,
    .bgn-category-list .bgn-category-item {
        display: flex; align-items: center; gap: 20px; padding: 20px 0;
    }
    .bgn-tag-list .bgn-category-link,
    .bgn-category-list .bgn-category-link { align-items: center; gap: 20px; }
    
    .bgn-tag-list .bgn-category-thumb,
    .bgn-category-list .bgn-category-thumb { width: 210px; height: 140px; }
    .bgn-tag-list .bgn-category-thumb img,
    .bgn-category-list .bgn-category-thumb img { transition: transform 0.4s ease; }
    
    .bgn-tag-list .bgn-category-content,
    .bgn-category-list .bgn-category-content { justify-content: center; padding-top: 0; }
    
    .bgn-tag-list .bgn-category-title-post,
    .bgn-category-list .bgn-category-title-post {
        font-size: 18px; font-weight: 700; margin: 0 0 8px 0;
        -webkit-line-clamp: 2; text-shadow: none;
    }
    
    .bgn-tag-list .bgn-category-meta,
    .bgn-category-list .bgn-category-meta { display: flex; align-items: center; gap: 6px; }
    .bgn-tag-list .bgn-category-cat,
    .bgn-category-list .bgn-category-cat { display: block; font-size: 13px; color: #555; font-weight: 600; }
    .bgn-tag-list .bgn-category-separator,
    .bgn-category-list .bgn-category-separator { display: inline; margin: 0 6px; color: #ccc; }
    .bgn-tag-list .bgn-category-date,
    .bgn-category-list .bgn-category-date { font-size: 12px; color: #888; font-weight: 400; }
}

/* --- SMALL MOBILE (< 360px) --- */
@media (max-width: 360px) {
    .bgn-tag-list .bgn-category-thumb,
    .bgn-category-list .bgn-category-thumb { width: 80px; height: 80px; }
    .bgn-tag-list .bgn-category-title-post,
    .bgn-category-list .bgn-category-title-post { font-size: 14px; }
    .bgn-tag-list .bgn-category-date,
    .bgn-category-list .bgn-category-date { font-size: 10px; }
}

/* ==========================================================================
   8. EMPTY STATE
   ========================================================================== */
.bgn-tag-empty, .bgn-category-empty {
    text-align: center; padding: 60px 20px; color: #888;
    font-size: 14px; font-family: 'Manrope', sans-serif;
}
.bgn-tag-empty svg, .bgn-category-empty svg { margin-bottom: 12px; opacity: 0.5; }

/* ==========================================================================
   9. LIST PAGINATION - UNIVERSAL (CENTER ALIGN CENTER 100% PERFECT)
   Text: Prev & Next (Tanpa Panah)
   ========================================================================== */
.list-pagination {
    width: 100%;
    text-align: center;
    margin: 40px 0 20px 0;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.list-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
}

.list-pagination li {
    margin: 0; padding: 0; list-style: none;
    display: flex; align-items: center;
}

/* Reset semua pseudo-element agar TIDAK ADA PANAH */
.list-pagination .page-numbers::before,
.list-pagination .page-numbers::after,
.list-pagination .list-page-prev::before,
.list-pagination .list-page-prev::after,
.list-pagination .list-page-next::before,
.list-pagination .list-page-next::after {
    content: none !important;
    display: none !important;
}

/* Item dasar (Angka) - POLOS */
.list-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    color: #1a1a1a;
    border-radius: 0;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    text-decoration: none;
    transition: color 0.2s ease;
    border: none;
    line-height: 1;
}

.list-pagination .page-numbers:hover {
    background: transparent;
    color: #1a3a8f;
}

/* Current/Active page - BIRU SOLID */
.list-pagination .page-numbers.current {
    background: #1a3a8f;
    color: #ffffff;
    font-weight: 700;
    cursor: default;
    min-width: 32px;
    height: 32px;
    border-radius: 4px;
}

.list-pagination .page-numbers.current:hover {
    background: #1a3a8f;
    color: #ffffff;
}

/* Prev & Next Button - Teks Polos Bold */
.list-pagination .list-page-prev,
.list-pagination .list-page-next {
    min-width: auto;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
}

.list-pagination .list-page-prev:hover,
.list-pagination .list-page-next:hover {
    color: #1a3a8f;
    background: transparent;
}

/* Dots (...) */
.list-pagination .page-numbers.dots {
    background: transparent;
    color: #1a1a1a;
    cursor: default;
    border: none;
    min-width: auto;
    padding: 0;
}

.list-pagination .page-numbers.dots:hover {
    background: transparent;
    color: #1a1a1a;
}

/* ==========================================================================
   10. RESPONSIVE: MOBILE (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Wrapper & Sidebar */
    .btp-content-wrapper { padding: 16px 16px 40px 16px; }
    .page-sidebar {
        display: none !important; visibility: hidden !important;
        width: 0 !important; height: 0 !important;
        margin: 0 !important; padding: 0 !important; overflow: hidden !important;
    }
    .page-body { grid-template-columns: 1fr; gap: 0; }
    
    /* Header */
    .page-header-desktop { display: none !important; }
    .page-main-title { display: block !important; }
    .page-header { flex-direction: column; align-items: flex-start; padding: 10px 0 16px; margin-bottom: 16px; }
    
    /* Content Typography */
    .page-content p, .page-content li { font-size: 14px; }
    .page-content h2 { font-size: 20px; }
    .page-content h3 { font-size: 17px; }

    /* Filter Bar Mobile */
    .bgn-list-filter { padding: 14px 16px; margin-bottom: 16px; }
    .bgn-list-filter-form { flex-wrap: wrap; gap: 16px; justify-content: flex-start; }
    
    /* Reset rasio 60:40 di mobile → full width */
    .bgn-filter-group,
    .bgn-filter-group--date,
    .bgn-filter-group--cat {
        width: 100%; flex: none;
        flex-direction: column; align-items: flex-start; gap: 8px;
    }
    .bgn-filter-label { width: 100%; margin-bottom: 2px; }
    .bgn-filter-date, .bgn-filter-select, .bgn-filter-search-btn {
        width: 100%; box-sizing: border-box;
    }
    .bgn-filter-search-btn { margin-top: 4px; }
    .bgn-filter-reset { width: 100%; text-align: center; margin-top: 8px; }
    .bgn-list-filter-info { font-size: 12px; padding: 10px 12px; }

    /* Pagination Mobile */
    .list-pagination { margin: 30px 0 16px 0; padding: 16px 0; }
    .list-pagination ul { gap: 16px; }
    .list-pagination .page-numbers { font-size: 15px; }
    .list-pagination .page-numbers.current { min-width: 28px; height: 28px; font-size: 14px; }
    .list-pagination .list-page-prev,
    .list-pagination .list-page-next { display: none; }
}

@media (max-width: 360px) {
    .page-main-title { font-size: 20px; }
    .page-inside-title { font-size: 24px; }
    .bgn-list-filter { padding: 12px 12px; }
    
    .list-pagination ul { gap: 12px; }
    .list-pagination .page-numbers { font-size: 14px; }
    .list-pagination .page-numbers.current { min-width: 26px; height: 26px; font-size: 13px; }
}

