/* ========================================
   Paginated Posts Shortcode
   [bongdako_paginated_posts]
   ======================================== */

.dbk-pgposts {
    background: #fff;
    padding: 16px 0;
}

.dark .dbk-pgposts {
    background: #1a1a1a;
}

/* ---------- Header ---------- */
.dbk-pgposts__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.dbk-pgposts__icon {
    line-height: 1;
    flex-shrink: 0;
}

.dbk-pgposts__icon img {
    display: block;
}

.dbk-pgposts__heading {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.02em;
}

/* ---------- Posts list ---------- */
.dbk-pgposts__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100px;
}

.dbk-pgposts__list--loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ---------- Post item ---------- */
.dbk-pgposts__item {
    display: grid;
    grid-template-columns: 377px 1fr;
    gap: 16px;
    text-decoration: none;
    color: #1a1a1a;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.2s ease;
}

.dbk-pgposts__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dbk-pgposts__item:hover {
    opacity: 0.8;
}

/* ---------- Image ---------- */
.dbk-pgposts__item-img {
    width: 377px;
    height: 173px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* ---------- Body ---------- */
.dbk-pgposts__item-body {
    min-width: 0;
}

.dbk-pgposts__item-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dbk-pgposts__item-title:hover {
    color: #2563eb;
}

.dbk-pgposts__item-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.dbk-pgposts__item-excerpt {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Pagination ---------- */
.dbk-pgposts__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.dbk-pgposts__page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.dbk-pgposts__page-btn:hover {
    border-color: #888;
    background: #f5f5f5;
}

.dbk-pgposts__page-btn--active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    font-weight: 600;
}

.dbk-pgposts__page-btn--active:hover {
    background: #333;
    border-color: #333;
}

.dbk-pgposts__page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    color: #888;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .dbk-pgposts__item {
        grid-template-columns: 1fr;
    }

    .dbk-pgposts__item-img {
        width: 100%;
        height: auto;
        aspect-ratio: 377 / 173;
    }
}
