/* =========================================================
   SEARCH PAGE: GRID 3 (DESKTOP) & LIST (MOBILE)
   ========================================================= */

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.desktop-only { display: block; }
.mobile-only { display: none; }

/* 1. SEARCH HEADER (VERSI BERSIH & COMPACT) */
.search-header-box { 
    padding: 20px 0 10px 0; /* Mengurangi padding agar tidak terlalu melompong */
    border-bottom: none; 
    margin-bottom: 30px; 
}

/* Tulisan "Hasil Pencarian" (Boleh tetap di CSS meski HTML-nya sudah dihapus) */
.search-title { display: none; } 

.search-form-wrap { 
    display: flex; 
    max-width: 500px; 
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Tambahkan sedikit bayangan halus agar lebih modern */
    border-radius: 4px;
    overflow: hidden;
}

.search-input { 
    flex: 1; 
    padding: 12px 15px; 
    border: 1px solid #ddd; 
    border-right: none; 
    border-radius: 4px 0 0 4px; 
    outline: none; 
    font-size: 15px;
}

.search-submit { 
    background: #111; 
    color: #fff; 
    border: none; 
    padding: 0 25px; 
    border-radius: 0 4px 4px 0; 
    cursor: pointer; 
    font-weight: 700;
    transition: background 0.3s;
}

.search-submit:hover { 
    background: #cc0000; /* Berubah merah saat disorot agar interaktif */
}

.search-count { 
    font-size: 14px; 
    color: #888; 
    font-style: italic; /* Gaya miring agar membedakan dengan teks utama */
}

.search-count span { 
    color: #cc0000; 
    font-weight: 700; 
}

/* 2. DESKTOP GRID (3 KOLOM) */
@media screen and (min-width: 1024px) {
    .search-content-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* KUNCI: Per 3 Kolom */
        gap: 30px;
    }
    .desktop-card {
        background: #fff;
        transition: transform 0.3s;
    }
    .desktop-card:hover { transform: translateY(-5px); }
    .d-img-box { position: relative; height: 200px; overflow: hidden; border-radius: none; }
    .d-img-box img { width: 100%; height: 100%; object-fit: cover; }
    .d-cat-badge { position: absolute; bottom: 10px; left: 10px; background: #262727; color: #fff; font-size: 10px; padding: 4px 10px; font-weight: 800; text-transform: uppercase; }
    .d-info { padding: 15px 0; }
    .d-title { font-size: 18px; line-height: 1.4; margin-bottom: 10px; font-weight: 700; }
    .d-title a { color: #111; text-decoration: none; }
    .d-meta { font-size: 12px; color: #999; }
}

/* 3. MOBILE LIST STYLE (SESUAI REQUEST) */
@media screen and (max-width: 1023px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
    
    .search-content-grid { display: block; }
    .mobile-style-card {
        padding: 15px 0;
        border-bottom: 1px solid #f2f2f2;
        display: flex;
        width: 100%;
    }

    /* Kategori Vertikal */
    .m-cat-col { display: flex; align-items: center; width: 35px; position: relative; }
    .m-cat-text { writing-mode: vertical-lr; transform: rotate(180deg); font-size: 10px; font-weight: 800; color: #1f2020; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
    .m-cat-line { width: 1px; height: 70%; background: #ddd; margin-left: 8px; }

    /* Thumbnail Kotak */
    .m-thumb-col { flex: 0 0 85px; height: 85px; }
    .m-square-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

    /* Area Teks */
    .m-content-col { flex: 1; padding-left: 15px; }
    .m-title { font-size: 15px; font-weight: 700; line-height: 1.3; margin: 0 0 5px 0; }
    .m-title a { color: #111; text-decoration: none; }
    .m-meta { font-size: 11px; color: #888; display: flex; gap: 5px; }
    .m-author { color: #272928; font-weight: 700; }
}

/* =========================================================
   STYLE PAGINATION (NAVIGASI HALAMAN)
   ========================================================= */

.pagination-wrap {
    margin-top: 50px;
    padding-top: 30px;
    border-top: none;
    text-align: center;
    width: 100%;
}

/* Container utama dari WordPress */
.pagination-wrap .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Gaya dasar angka dan tombol (Prev/Next) */
.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #ddd;
    color: #111;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Angka halaman yang sedang aktif */
.pagination-wrap .page-numbers.current {
    background: #111;
    color: #fff;
    border-color: #111;
    cursor: default;
}

/* Titik-titik (dots) jika halaman banyak */
.pagination-wrap .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

/* Efek Hover (Saat kursor menempel) */
.pagination-wrap a.page-numbers:hover {
    background: #cc0000; /* Merah biar senada dengan hover tombol Cari */
    color: #fff;
    border-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(204, 0, 0, 0.2);
}

/* =========================================================
   PAGINATION MOBILE ADJUSTMENT
   ========================================================= */

@media screen and (max-width: 767px) {
    .pagination-wrap {
        margin-top: 10px;
    }
    
    .pagination-wrap .page-numbers {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    /* Sembunyikan teks Prev/Next di HP agar tidak sesak, ganti simbol saja */
    .pagination-wrap .prev.page-numbers,
    .pagination-wrap .next.page-numbers {
        font-size: 18px;
    }
}

/* =========================================================
   CENTERING SEARCH HEADER (KHUSUS DESKTOP)
   ========================================================= */

@media screen and (min-width: 1024px) {
    /* 1. Mengetengahkan wadah utama */
    .search-header-box {
        text-align: center;
        padding: 50px 0 20px 0;
    }

    /* 2. Mengetengahkan form pencarian (Box) */
    .search-form-wrap {
        /* margin-left & right: auto adalah kunci untuk ngetengahin block element */
        margin: 0 auto 20px auto !important; 
        max-width: 600px; /* Kita lebarkan sedikit biar lebih gagah di desktop */
    }

    /* 3. Mengetengahkan teks "Ditemukan..." */
    .search-count {
        text-align: center;
        width: 100%;
        display: block;
    }
}