/* Header Khusus Halaman Blog menggunakan gambar bg.png */
.blog-header { background-image: url('images/bg.png'); background-size: cover; background-position: top center; background-repeat: no-repeat; padding-bottom: 60px; }
.blog-header .nav-links a { color: #FDA827; }
.blog-header .nav-links a.active-link { color: white; border-bottom: 2px solid white; padding-bottom: 5px; }

/* KUNCI: Menyesuaikan jarak judul blog karena navbar sekarang melayang (fixed) */
.blog-hero-content { padding-top: 160px !important; }

.blog-wrapper { margin-top: -30px; padding-top: 40px; padding-bottom: 100px; background: transparent; }

/* Section Judul */
.section-title { color: var(--heading-brown); font-size: 1.8rem; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.section-title span.icon { font-size: 1.5rem; }

/* ========================================================
   SECTION HIGHLIGHT & TRENDING (ANTI ADBLOCK)
   ======================================================== */
.highlight-section { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 60px; position: relative; z-index: 10; }

/* --- SLIDER CAROUSEL --- */
.carousel-container { width: 100%; overflow: hidden; }
.carousel-viewport { width: 100%; border-radius: 20px; overflow: hidden; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.1); background-color: #fffdf5; min-height: 250px; }
.carousel-track { display: flex; transition: transform 0.5s ease-in-out; width: 100%; }
.slide { flex: 0 0 100%; width: 100%; position: relative; height: 400px; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0)); padding: 60px 30px 30px 30px; color: white; }
.slide-category { background-color: var(--primary-orange); padding: 4px 10px; border-radius: 5px; font-size: 0.8rem; font-weight: bold; display: inline-block; margin-bottom: 10px; }
.slide-title { font-size: 1.5rem; margin-bottom: 10px; line-height: 1.3; }
.slide-date { font-size: 0.85rem; color: #d1d5db; }
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 15px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background-color: #d1d5db; cursor: pointer; transition: 0.3s; }
.dot.active { background-color: var(--primary-orange); width: 25px; border-radius: 10px; }

/* --- TRENDING SIDEBAR --- */
.trending-list { display: flex; flex-direction: column; gap: 20px; }
.trending-card { display: flex; gap: 15px; align-items: center; background: white; padding: 15px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid #f3f4f6; transition: 0.3s; text-decoration: none; color: inherit; }
.trending-card:hover { transform: translateX(5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-color: var(--primary-orange); }
.trending-img { width: 90px; height: 90px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.trending-text h4 { font-size: 1rem; color: var(--heading-brown); line-height: 1.3; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trending-text p { 
    font-size: 0.85rem; 
    color: #6b7280; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    margin: 0;
    line-height: 1.4;
}

/* ========================================================
   SECTION BLOG GRID (4 KOLOM DESKTOP) & PAGINATION
   ======================================================== */
.news-board-section { position: relative; z-index: 10; }
.news-board-header { display: flex; flex-direction: column; margin-bottom: 30px; gap: 15px; }

/* Category Filter Pills */
.categories-filter { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-btn { background: white; border: 1px solid #d1d5db; color: #4b5563; padding: 6px 16px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; cursor: pointer; transition: 0.3s; }
.cat-btn.active, .cat-btn:hover { background: var(--primary-orange); color: white; border-color: var(--primary-orange); }

/* Grid Artikel */
.blog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; min-height: 400px; }
.blog-card { background: var(--card-bg); border-radius: 15px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #fce8bd; display: flex; flex-direction: column; transition: 0.3s ease; text-decoration: none; color: inherit; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2); }
.blog-img-wrapper { position: relative; height: 180px; }
.blog-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.blog-badge { position: absolute; top: 10px; left: 10px; background-color: var(--primary-orange); color: white; padding: 4px 10px; border-radius: 8px; font-size: 0.75rem; font-weight: bold; z-index: 2; }
.blog-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.blog-content h3 { font-size: 1.1rem; color: var(--heading-brown); margin-bottom: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-date { font-size: 0.8rem; color: #9ca3af; margin-bottom: 10px; }
.blog-content p { font-size: 0.9rem; color: #6b7280; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }

/* Pagination */
.pagination-container { display: flex; justify-content: flex-start; margin-top: 40px; }
.pagination { display: flex; gap: 8px; align-items: center; }
.page-btn { width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; border-radius: 8px; background: white; border: 1px solid #e5e7eb; color: #4b5563; font-weight: bold; cursor: pointer; transition: 0.3s; }
.page-btn:hover { background: #fce8bd; }
.page-btn.active { background: var(--primary-orange); color: white; border-color: var(--primary-orange); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- SEARCH BAR --- */
.search-container {
    width: 100%;
    margin-top: 10px;
}
.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
    background-color: #fffdf5;
}
.search-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    background-color: white;
}

@media (max-width: 768px) {
    .search-input { max-width: 100%; }
}

/* ========================================================
   RESPONSIF MOBILE / HP (TATA LETAK KETAT)
   ======================================================== */
@media (max-width: 1024px) {
    .highlight-section { grid-template-columns: 1fr; display: flex; flex-direction: column; gap: 30px; } 
    .trending-list { flex-direction: row; flex-wrap: wrap; } 
    .trending-card { flex: 1 1 calc(33.333% - 20px); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .section-title { font-size: 1.5rem; }
    
    /* --- SLIDER (HP) --- */
    .slide { height: 250px; }
    .slide-overlay { padding: 40px 15px 15px 15px; }
    .slide-title { font-size: 1.2rem; }

    /* --- SIDEBAR TRENDING / POPULAR (HP) --- */
    .trending-list { flex-direction: column; gap: 4vw; }
    .trending-card { 
        flex-direction: column; 
        padding: 0; 
        background: var(--card-bg);
        border: 1px solid #fce8bd; 
        border-radius: 3vw;
        overflow: hidden;
        box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
    }
    .trending-img { width: 100%; height: 42vw; border-radius: 0; object-fit: cover; }
    .trending-text { padding: 4vw; width: 100%; }
    .trending-text h4 { font-size: 4vw; margin-bottom: 2vw; line-height: 1.4; color: var(--heading-brown); }
    .trending-text p { font-size: 3vw; color: #9ca3af; margin: 0; }

    /* --- BLOG & NEWS GRID (HP) --- */
    .news-board-header { align-items: center; text-align: center; }
    .categories-filter { justify-content: center; }
    
    /* Memaksa tampil 2 Kolom menyamping */
    .blog-grid { 
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 3vw; 
    }
    
    .blog-card { border-radius: 3vw; }
    .blog-img-wrapper { height: 32vw; } 
    .blog-badge { font-size: 2.2vw; padding: 1vw 2.5vw; top: 1.5vw; left: 1.5vw; border-radius: 1.5vw; }
    .blog-content { padding: 3vw; }
    .blog-content h3 { font-size: 3.5vw !important; margin-bottom: 1.5vw; line-height: 1.4; }
    .blog-date { font-size: 2.5vw; margin-bottom: 1.5vw; }
    .blog-content p { font-size: 2.8vw !important; margin-bottom: 0; } 

    .pagination-container { justify-content: center; margin-top: 8vw; }
}

/* ========================================================
   PENYESUAIAN FOOTER KHUSUS HALAMAN BLOG
   ======================================================== */
.blog-wrapper {
    margin-bottom: 0 !important;
}

.blog-wrapper + footer {
    padding-top: 80px;
}

@media (max-width: 992px) {
    .blog-wrapper + footer {
        padding-top: 12vw;
    }
}