/* ===== Related Posts Block — Frontend Style ===== */

:root {
    --rpb-accent: #1a6ef5;
}

.rpb-wrapper {
    margin: 2.5em 0;
    direction: rtl;
    font-family: inherit;
}

/* ---- Header ---- */
.rpb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.rpb-header__bar {
    display: block;
    width: 4px;
    height: 22px;
    background: var(--rpb-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.rpb-header__title {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--rpb-accent);
    letter-spacing: 0.01em;
}

/* ---- List container ---- */
.rpb-list {
    display: flex;
    flex-direction: column;
    border: 1.5px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.rpb-item + .rpb-item {
    border-top: 1px solid #f0f0f0;
}

/* ---- Item link ---- */
.rpb-item__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.18s ease;
}

.rpb-item__link:hover {
    background: #f8f9ff;
    text-decoration: none;
}

.rpb-item__link:hover .rpb-item__title {
    color: var(--rpb-accent);
}

/* ---- Thumbnail ---- */
.rpb-item__thumb {
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
}

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

/* ---- Body ---- */
.rpb-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rpb-item__title {
    font-size: 0.95em;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
    transition: color 0.15s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rpb-item__excerpt {
    font-size: 0.83em;
    color: #666;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rpb-item__meta {
    display: flex;
    gap: 10px;
    font-size: 0.76em;
    color: #999;
    margin-top: 2px;
}

.rpb-item__meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.rpb-item__meta span::before {
    content: '';
}

.rpb-item__meta span + span::before {
    content: '|';
    margin-left: 10px;
    opacity: 0.4;
}


/* ==============================
   MODE: text-only
   No image, minimal layout
   ============================== */

.rpb-mode-text-only .rpb-item__link {
    padding: 12px 16px;
    gap: 0;
}

.rpb-mode-text-only .rpb-item__title {
    font-size: 0.93em;
}

/* ==============================
   MODE: compact  (default)
   Small square thumb 60×60
   ============================== */

.rpb-mode-compact .rpb-item__thumb {
    width: 62px;
    height: 62px;
}

/* ==============================
   MODE: full
   Larger thumb + excerpt
   ============================== */

.rpb-mode-full .rpb-list {
    gap: 0;
}

.rpb-mode-full .rpb-item__link {
    padding: 14px 16px;
    gap: 14px;
}

.rpb-mode-full .rpb-item__thumb {
    width: 90px;
    height: 72px;
}

.rpb-mode-full .rpb-item__title {
    font-size: 0.97em;
}

/* ---- Responsive ---- */
@media (max-width: 500px) {
    .rpb-mode-full .rpb-item__thumb {
        width: 72px;
        height: 60px;
    }
    .rpb-item__link {
        padding: 11px 13px;
        gap: 10px;
    }
    .rpb-mode-compact .rpb-item__thumb {
        width: 54px;
        height: 54px;
    }
}
