/* ============================================
   CATEGORY GRID (Style sama dengan Pilihan Redaksi)
   ============================================ */
.category-grid-wrapper {
    background: #ffffff;
    margin-top: 24px;
}

.category-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.category-grid-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.category-grid-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #e60012;
    border-radius: 2px;
}

.category-grid-see-all {
    display: none; /* Hidden di mobile */
}

.category-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
}

.category-grid-item {
    cursor: pointer;
}

.category-grid-image {
    width: 100%;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.category-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-grid-content {
    /* Tanpa padding */
}

.category-grid-link {
    font-size: 13px;
    font-weight: 800;
    font-family:'manrope';
    color: #1a1a1a;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing:-0.2;
}

.category-grid-link:hover {
    color: #f5a623;
}

.category-grid-category {
    font-size: 11px;
    color: #888;
    font-weight: 500;
    margin-bottom: 4px;
}

/* ============================================
   DESKTOP VERSION (min-width: 1024px)
   ============================================ */
@media (min-width: 1024px) {
    body { max-width: 100%; }

    .category-grid-wrapper {
        max-width: 1024px;
        margin: 24px auto;
    }

    .category-grid-header {
        margin-bottom: 20px;
    }

    .category-grid-title {
        font-size: 20px;
    }

    .category-grid-title::before {
        display: none;
    }

    /* See-All Link dengan Perfect Center Alignment */
    .category-grid-see-all {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 14px;
        font-weight: 600;
        color: #464747;
        text-decoration: none;
        line-height: 1; /* Mencegah baseline teks menggeser ikon */
        transition: color 0.2s ease;
    }

    .category-grid-see-all:hover {
        color: #1557b0;
    }

    /* SVG Arrow dengan display block untuk alignment presisi */
    .category-grid-see-all .latest-header-arrow {
        width: 16px;
        height: 16px;
        display: block; /* Menghilangkan inline ghost space */
        transition: transform 0.2s ease;
    }

    .category-grid-see-all:hover .latest-header-arrow {
        transform: translateX(4px);
    }

    .category-grid-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .category-grid-image {
        height: 120px;
        border-radius: 6px;
        margin-bottom: 12px;
    }

    .category-grid-link {
        font-size: 13px;
        font-family: 'Manrope', sans-serif;
        line-height: 1.4;
        margin-bottom: 6px;
        -webkit-line-clamp: 3;
    }

    .category-grid-category {
        font-size: 12px;
        color: #e67700;
        font-weight: 700;
        text-transform: capitalize;
        margin-bottom: 4px;
    }
}

/* ============================================
   CATEGORY GRID - MOBILE MORE BUTTON
   ============================================ */
.category-grid-mobile-more {
    display: flex;
    justify-content: center;
    padding-top: 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

.category-grid-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    margin-bottom: 20px;
    background: #f8f8f8;
    color: #e67700;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.category-grid-more-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.category-grid-more-arrow {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.category-grid-more-btn:hover .category-grid-more-arrow {
    transform: translateX(4px);
}

/* Desktop: Hide mobile more button */
@media (min-width: 1024px) {
    .category-grid-mobile-more {
        display: none !important;
    }
}

/* ============================================
   CATEGORY GRID VIDEO: Responsive Post Count
   ============================================ */

/* Desktop (Layar >= 1024px): Sembunyikan post ke-4 */
@media (min-width: 1024px) {
    .category-grid .category-grid-item:nth-child(4) {
        display: none;
    }
}

/* Mobile (Layar < 1024px): Pastikan post ke-4 tampil (default) */
@media (max-width: 1023px) {
    .category-grid .category-grid-item:nth-child(4) {
        display: block; /* Atau flex/grid sesuai layout asli Anda */
    }
}