/* Related Posts (Artikel Terkait) — Mobile horizontal card layout
   rp4wp plugin sidebar widget restyle
   ---------------------------------------------------- */

/* ---- Desktop: light cleanup ---- */
.rp4wp-related-posts h3 {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #3F4153 !important;
}

.rp4wp-related-posts ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rp4wp-related-posts li {
    list-style: none !important;
}

/* "Lihat Semua Artikel" link */
.cihos-related-see-all {
    display: block;
    text-align: center;
    padding: 12px 0 4px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #2B7ACC;
    text-decoration: none;
}

.cihos-related-see-all:hover {
    text-decoration: underline;
    color: #4A9FE5;
}

/* Tag pill — hidden on desktop, shown on mobile */
.cihos-rp-tag-pill {
    display: none;
}

/* ---- Mobile: hide inline related posts, keep sidebar only ---- */
@media (max-width: 767px) {
    .kl-blog-post-body .rp4wp-related-posts {
        display: none !important;
    }

    /* Reduce gap between article and sidebar related posts */
    body.single-post aside,
    body.single-post aside .zn_sidebar {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .rp4wp-related-posts {
        padding: 16px 0 !important;
    }

    .rp4wp-related-posts h3 {
        font-size: 18px !important;
        margin-bottom: 16px !important;
    }

    .rp4wp-related-posts ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .rp4wp-related-posts li {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid #EBEBEB !important;
    }

    .rp4wp-related-posts li:first-child {
        padding-top: 0 !important;
    }

    .rp4wp-related-posts li:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    /* Thumbnail */
    .rp4wp-related-posts .rp4wp-related-post-image {
        flex: 0 0 80px !important;
        width: 80px !important;
        height: 80px !important;
        overflow: hidden !important;
        border-radius: 8px !important;
    }

    .rp4wp-related-posts .rp4wp-related-post-image a {
        display: block !important;
        width: 80px !important;
        height: 80px !important;
    }

    .rp4wp-related-posts .rp4wp-related-post-image img {
        width: 80px !important;
        height: 80px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }

    /* Title text */
    .rp4wp-related-posts .rp4wp-related-post-content {
        flex: 1 1 0% !important;
        min-width: 0 !important;
    }

    .rp4wp-related-posts .rp4wp-related-post-content a {
        font-size: 14px !important;
        line-height: 20px !important;
        color: #111111 !important;
        text-decoration: none !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .rp4wp-related-posts .rp4wp-related-post-content a:hover {
        color: #2B7ACC !important;
    }

    /* Tag pill */
    .cihos-rp-tag-pill {
        display: inline-block !important;
        margin-top: 2px !important;
        padding: 2px 10px !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        line-height: 18px !important;
        color: #2B7ACC !important;
        background: #E8F1FA !important;
        border-radius: 12px !important;
        white-space: nowrap !important;
    }
}
