.related-posts-section {
    width: 100%;
    margin-top: 60px;
    margin-bottom: 60px;
}

.related-posts-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.related-posts-title {
    flex: 0 0 auto;
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
    color: #1f2933;
}

.related-posts-line {
    width: 100%;
    height: 1px;
    background: #e5e5e5;
}

/* Slider wrapper */
.related-posts-wrapper {
    position: relative;
    width: 100%;
}

/* Slider */
.related-posts-slider {
    display: flex;
    align-items: stretch;
    gap: 44px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0 0 4px;
}

.related-posts-slider::-webkit-scrollbar {
    display: none;
}

/* Card */

.related-post-card {
    flex: 0 0 calc((100% - 88px) / 3);
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

/* Image */
.related-post-image-link {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    text-decoration: none;
    overflow: hidden;
}

.related-post-image {
    display: block;
    width: 100%;
/*     height: 185px; */
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-post-card:hover .related-post-image {
    transform: scale(1.03);
}

.related-post-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #888;
    font-size: 14px;
}

/* Content */
.related-post-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 15px 20px;
}

/* =========================
   META
========================= */

.related-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
    color: #777b89;
    font-size: 11px;
    width: 100%;
}

.related-post-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.related-post-category {
    color: #f23536;
    font-weight: 600;
    text-transform: capitalize;
}

.related-post-date {
    position: relative;
    padding-left: 10px;
}

.related-post-date::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 3px;
    background: #999;
    border-radius: 50%;
    transform: translateY(-50%);
}

.related-post-meta-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}

.related-post-views {
    position: relative;
    padding-left: 10px;
}

.related-post-title {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: 0.3px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-title a {
    color: #252525;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-post-title a:hover {
    color: #f23536;
}

.related-post-excerpt {
    color: #737373;
    font-size: 15px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}


.related-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.related-post-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #777b89;
    font-size: 12px;
} 
.related-post-author img {
    width: 33px;
    height: 33px;
    flex: 0 0 36px;
    border-radius: 50%;
    object-fit: cover;
}

.related-post-author-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.related-post-author-name {
    color: #555;
    font-size: 12px;
    line-height: 15px;
    font-weight: 600;
} 

.related-post-author-role {
    margin-top: 2px;
    color: #999;
    font-size: 11px;
    line-height: 14px;
}

/* Read More */

.related-post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    margin-top: 5px;
    color: #f23536;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-post-read-more:hover {
    color: #c91f29;
}

.read-more-arrow {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.related-post-read-more:hover .read-more-arrow {
    transform: translateX(4px);
}

.related-post-read-more:focus-visible {
    outline: 2px solid #f23536;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Arrows */

.related-posts-arrow {
    position: absolute;
    top: 105%;
    z-index: 5;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #707070;
    border-radius: 50%;
    background: #ffffff;
    color: #333;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.related-posts-arrow:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.related-posts-prev {
    left: calc(50% - 45px);
}

.related-posts-next {
    right: calc(50% - 45px);
}

.related-posts-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.related-posts-arrow .bi {
    font-size: 18px;
    font-family: monospace; 
}


/* Tablet */

@media (max-width: 991px) {
    .related-posts-slider {
        gap: 24px;
    }

    .related-post-card {
        flex: 0 0 calc((100% - 24px) / 2);
    }

    .related-post-image {
        height: 210px;
    }
}

/* Mobile */

@media (max-width: 575px) {
    .related-posts-section {
        margin-top: 40px;
    }

    .related-posts-header {
        margin-bottom: 20px;
    }

    .related-posts-slider {
        gap: 16px;
    }

    .related-post-card {
        flex: 0 0 85%;
    }

    .related-post-image {
        height: 200px;
    }
}


@media (min-width: 992px) and (max-width:1200px){
    .related-posts-slider{
        gap:35px
    }
}
