/* ==========================================================
   DIYNEWS ARCHIVE MODEL LIST EDITION (PERFECT RESPONSIVE)
   Version : 1.1
   ========================================================== */

/* Base Container */
.diy-container { 
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%; /* Memastikan kontainer tidak tumpah di HP */
}

/* ==========================================================
   HERO SECTION (RESPONSIVE OPTIMIZATION)
   ========================================================== */
.diy-hero-wrapper { 
    position: relative; 
    width: 100%; 
    height: 450px; 
    border-radius: 16px; 
    overflow: hidden; 
    margin: 40px 0; 
    background: #e5e7eb; 
}

.diy-hero-overlay { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    padding: 40px; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); 
    color: white; 
}

.diy-category-pill { 
    display: inline-block; 
    padding: 6px 12px; 
    background: #dc2626; 
    color: white; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    border-radius: 4px; 
    margin-bottom: 12px; 
}

.diy-hero-title { 
    font-size: 2.25rem; 
    line-height: 1.2; 
    font-weight: 800; 
}

/* Dropdown Filters */
.diy-filters { 
    display: flex; 
    gap: 16px; 
    margin: 40px 0; 
    padding: 24px 0; 
    border-top: 1px solid #e5e7eb; 
    border-bottom: 1px solid #e5e7eb; 
}

.diy-select { 
    padding: 10px 20px; 
    border-radius: 8px; 
    border: 1px solid #d1d5db; 
    font-size: 1rem; 
    cursor: pointer; 
    background-color: white;
    width: auto;
    max-width: 100%;
}

/* ==========================================================
   DIYNEWS ARCHIVE LIST LAYOUT (GAMBAR KIRI - TEKS KANAN)
   ========================================================== */
.diy-archive-list { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.diy-archive-item { 
    display: flex; 
    flex-direction: row; 
    gap: 24px; 
    padding: 24px; 
    background: #ffffff; 
    border-radius: 12px; 
    border: 1px solid #f3f4f6; 
    text-decoration: none; 
    color: inherit; 
    transition: all 0.2s ease-in-out; 
    align-items: center; 
}

.diy-archive-item:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); 
}

.diy-thumb { 
    width: 200px; 
    height: 130px; 
    background: #e5e7eb; 
    border-radius: 8px; 
    flex-shrink: 0; 
    overflow: hidden;
}

.diy-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.diy-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1; 
}

.diy-date { 
    font-size: 0.875rem; 
    color: #6b7280; 
    font-weight: 500; 
    display: block; 
}

.diy-content h3 { 
    font-size: 1.25rem; 
    font-weight: 700; 
    margin: 0;
    line-height: 1.4;
    color: #111827;
}

.diy-archive-item:hover h3 {
    color: #1e3a8a; 
}

/* ==========================================================
   DIYNEWS NUMBERED PAGINATION STYLING
   ========================================================== */
.diy-load-more { 
    text-align: center; 
    margin: 40px 0; 
    width: 100%;
}

.diy-pagination-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    background-color: #ffffff;
    padding: 8px 16px;
    border-radius: 50px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    max-width: 100%; /* KUNCI: Mencegah tombol pagination jebol keluar layar HP */
    flex-wrap: wrap; /* KUNCI: Membuat tombol melipat ke bawah jika layar sangat sempit */
}

.diy-pagination-wrapper a, 
.diy-pagination-wrapper .current {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-width: 36px;
    height: 36px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: #4b5563;
    border-radius: 50%; 
    transition: all 0.2s ease-in-out;
}

.diy-pagination-wrapper a:hover {
    background-color: #f3f4f6;
    color: #1e3a8a;
}

.diy-pagination-wrapper .current {
    background-color: #1e3a8a; 
    color: #ffffff !important;
}

.diy-pagination-wrapper .prev,
.diy-pagination-wrapper .next {
    border-radius: 20px !important; 
    font-size: 0.8rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.diy-pagination-wrapper .prev:hover,
.diy-pagination-wrapper .next:hover {
    background-color: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
}

/* ==========================================================
   MEDIA QUERIES (BREAKPOINTS ADJUSTMENT)
   ========================================================== */

/* 1. Layar Ukuran Medium / Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .diy-hero-wrapper { 
        height: 380px; /* Tinggi hero disesuaikan untuk tablet */
    }
    .diy-hero-title { 
        font-size: 1.75rem; /* Mengecilkan judul headline di tablet */
    }
    .diy-hero-overlay {
        padding: 30px;
    }
    .diy-content h3 {
        font-size: 1.15rem; /* Penyesuaian ukuran font list */
    }
}

/* 2. Layar Ukuran Mobile / HP (max-width: 576px) */
@media (max-width: 576px) {
    .diy-hero-wrapper { 
        height: 280px; /* Tinggi hero dibuat kompak di HP */
        margin: 20px 0;
    }
    
    .diy-hero-title { 
        font-size: 1.35rem; /* Judul headline kompak agar pas terbaca */
    }
    
    .diy-hero-overlay {
        padding: 20px;
    }

    .diy-filters {
        margin: 20px 0;
        padding: 15px 0;
    }

    .diy-select {
        width: 100%; /* Dropdown filter melebar penuh di HP */
        text-align: center;
    }
    
    .diy-archive-item {
        padding: 14px;
        gap: 16px; /* Mempersempit jarak antara gambar dan teks di HP */
    }

    .diy-thumb { 
        width: 110px; /* Ukuran gambar mengecil proporsional agar teks dikanan punya ruang */
        height: 85px; 
    }
    
    .diy-content {
        gap: 4px;
    }

    .diy-date {
        font-size: 0.75rem;
    }
    
    .diy-content h3 { 
        font-size: 0.95rem; /* Font judul list optimal untuk dibaca lewat smartphone */
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Batasi maksimal judul list hanya 2 baris saja di HP agar seragam */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Modifikasi Pagination khusus HP agar tidak berdempetan */
    .diy-pagination-wrapper {
        gap: 4px;
        padding: 6px 10px;
    }
    .diy-pagination-wrapper a, 
    .diy-pagination-wrapper .current {
        padding: 4px 8px;
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}
