/* Related Posts Box Styles */
.rpb-wrapper {
    margin-top: 40px;
    margin-bottom: 40px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-family: inherit;
}

.rpb-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
    display: inline-block;
    color: #333;
}

/* Latest Section */
.rpb-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rpb-list-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    gap: 15px;
}

.rpb-thumb-small {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
}

.rpb-img-small {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rpb-content-small {
    flex-grow: 1;
}

.rpb-post-title-small {
    margin: 0 0 5px 0;
    font-size: 0.95em;
}

.rpb-post-title-small a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
}

.rpb-post-title-small a:hover {
    color: #0073aa;
}

/* Date removed */

/* RTL Support */
.rpb-rtl .rpb-title {
    border-bottom: 2px solid #ddd;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .rpb-list-item {
        align-items: flex-start;
    }
}

/* INLINE RELATED POSTS STYLES */
.rpb-inline-wrapper {
    margin: 40px 0;
    font-family: inherit;
    position: relative;
    clear: both;
    width: 100%;
}

.rpb-inline-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.rpb-inline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: rgba(0, 115, 170, 0.2);
}

.rpb-card-header {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px 5px;
}

.rpb-inline-label {
    background: #eef4f9;
    color: #0073aa;
    font-size: 0.85em;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
    border: 1px solid rgba(0,115,170,0.1);
}

.rpb-card-body {
    display: flex;
    align-items: stretch;
    position: relative;
    padding-bottom: 5px;
}

.rpb-inline-thumb {
    width: 140px;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    border-radius: 12px;
    margin: 0 0 15px 15px; /* RTL margin */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Fix RTL margins */
.rpb-rtl .rpb-inline-thumb {
    margin: 0 0 15px 15px;
}
.rpb-inline-wrapper:not(.rpb-rtl) .rpb-inline-thumb {
    margin: 0 15px 15px 0;
}

.rpb-inline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.rpb-placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.rpb-placeholder-img svg {
    width: 48px;
    height: 48px;
}

.rpb-inline-card:hover .rpb-inline-img {
    transform: scale(1.1);
}

.rpb-inline-content {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px 15px 10px;
}

/* Author Meta Styles */
.rpb-author-meta {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.rpb-author-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: 10px; /* RTL */
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    object-fit: cover;
}

.rpb-inline-wrapper:not(.rpb-rtl) .rpb-author-img {
    margin-left: 0;
    margin-right: 10px;
}

.rpb-author-text {
    font-size: 0.9em;
    color: #555;
    background: #f7f9fa;
    padding: 6px 12px;
    border-radius: 20px 20px 20px 4px; /* Speech bubble effect */
    border: 1px solid #eee;
    line-height: 1.4;
}

.rpb-inline-wrapper:not(.rpb-rtl) .rpb-author-text {
    border-radius: 20px 20px 4px 20px;
}

.rpb-author-name {
    font-weight: 700;
    color: #333;
}

.rpb-inline-title {
    margin: 0 0 8px 0 !important;
    font-size: 1.25em !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}

.rpb-inline-title a {
    text-decoration: none;
    color: #1a202c;
    transition: color 0.2s ease;
}

.rpb-inline-title a:hover {
    color: #0073aa;
}

/* Meta removed */

.rpb-inline-arrow {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    color: #0073aa;
    text-decoration: none !important;
    font-size: 1.5em;
    transition: all 0.3s ease;
    border-left: 1px solid #edf2f7;
}

.rpb-inline-arrow svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.rpb-inline-card:hover .rpb-inline-arrow {
    background: #0073aa;
    color: #fff;
}

.rpb-inline-card:hover .rpb-inline-arrow svg {
    transform: translateX(5px);
}

/* RTL Support for Inline */
.rpb-rtl .rpb-inline-arrow svg {
    transform: rotate(180deg);
}

.rpb-rtl .rpb-inline-card:hover .rpb-inline-arrow svg {
    transform: rotate(180deg) translateX(5px);
}

.rpb-rtl .rpb-inline-arrow {
    border-left: 0;
    border-right: 1px solid #edf2f7;
}

@media (max-width: 600px) {
    .rpb-inline-card {
        height: auto;
    }

    .rpb-card-body {
        flex-direction: column;
        padding-bottom: 0;
    }

    .rpb-inline-thumb {
        width: 100%;
        height: 180px;
        min-width: 0;
        margin: 0 0 15px 0 !important;
        border-radius: 0;
    }
    
    .rpb-inline-content {
        padding: 0 15px 15px 15px;
    }

    .rpb-inline-arrow {
        width: 100%;
        height: 40px;
        border-right: 0;
        border-top: 1px solid #edf2f7;
    }
    
    .rpb-card-header {
        padding: 10px 15px 0;
    }
}

.rpb-rtl .rpb-inline-arrow {
    border-left: 0;
    border-right: 1px solid #edf2f7;
}

.rpb-rtl .rpb-inline-arrow svg {
    transform: scaleX(-1);
}

.rpb-rtl .rpb-inline-card:hover .rpb-inline-arrow svg {
    transform: scaleX(-1) translateX(5px);
}

/* Position Specific Colors */
.rpb-inline-quarter .rpb-inline-label {
    background: #ed8936;
    box-shadow: 0 4px 10px rgba(237,137,54,0.3);
}

.rpb-inline-quarter .rpb-inline-title a:hover {
    color: #ed8936;
}

.rpb-inline-quarter .rpb-inline-arrow {
    color: #ed8936;
}

.rpb-inline-quarter .rpb-inline-card:hover .rpb-inline-arrow {
    background: #ed8936;
    color: #fff;
}

@media (max-width: 600px) {
    .rpb-inline-card {
        flex-direction: column;
        height: auto;
    }

    .rpb-inline-thumb {
        width: 100%;
        height: 180px;
        min-width: 0;
    }
    
    .rpb-inline-content {
        padding: 15px;
    }
    
    .rpb-inline-arrow {
        width: 100%;
        height: 40px;
        border-left: 0;
        border-top: 1px solid #edf2f7;
    }
    
    .rpb-rtl .rpb-inline-arrow {
        border-right: 0;
        border-top: 1px solid #edf2f7;
    }
    
    .rpb-inline-card:hover .rpb-inline-arrow svg {
        transform: translateX(5px); /* On mobile, keep arrow direction natural or maybe down? Let's stick to simple */
    }
    
    .rpb-rtl .rpb-inline-card:hover .rpb-inline-arrow svg {
        transform: scaleX(-1) translateX(5px);
    }
}
