﻿/* --- Hero --- */
.sb-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.sb-cover {
    height: 220px;
    background: linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.05));
}

.sb-heroHead {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
}

.sb-heroCard {
    width: 100%;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 16px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
}

.sb-name {
    font-weight: 900;
    margin: 0;
}

.sb-sub p {
    margin: 0;
    color: #444;
    line-height: 1.9;
}

/* --- Cards --- */
.sb-grid .card {
    height: 100%;
    overflow: hidden;
}

.sb-cardCover {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #f5f5f5;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

    .sb-cardCover img {
        width: 100%;
        height: 100%;
        display: block;
    }

.sb-cover--cover {
    object-fit: cover;
}

.sb-cover--contain {
    object-fit: contain;
    background: #fff;
}

/* --- Meta row --- */
.sb-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

    .sb-meta .badge {
        font-weight: 700;
    }

/* --- Read more --- */
.sb-btnRead {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none;
    font-weight: 800;
}

/* --- Avatar group (طبق قالب شما) + جلوگیری از زوم/کراپ --- */
.avatar-group .avatar.avatar-sm {
    width: 34px;
    height: 34px;
}

.avatar-group .avatar img {
    width: 100%;
    height: 100%;
    /*object-fit: contain;*/ /* مهم: بدون زوم */
    background: #fff;
}

/* --- Empty --- */
.sb-empty {
    border: 1px dashed rgba(0,0,0,.20);
    border-radius: 14px;
    padding: 18px;
    background: rgba(0,0,0,.02);
}


/* Modern Blog Card */
.sb-postCard {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(0,0,0,.08);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .sb-postCard:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 40px rgba(0,0,0,.12);
    }

.sb-postMedia {
    position: relative;
    height: 190px;
    background: rgba(0,0,0,.04);
}

.sb-postMediaLink {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.sb-postImg {
    width: 100%;
    height: 100%;
    display: block;
}
    /* وقتی cover هست: object-fit cover ، وقتی contain هست: object-fit contain */
    .sb-postImg.sb-cover--cover {
        object-fit: cover;
    }

    .sb-postImg.sb-cover--contain {
        object-fit: contain;
        background: #fff;
    }

.sb-postOverlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.05));
    opacity: .85;
    transition: opacity .18s ease;
}

.sb-postCard:hover .sb-postOverlay {
    opacity: .95;
}

.sb-postQuick {
    position: absolute;
    inset-inline: 12px;
    bottom: 12px;
    display: flex;
    justify-content: flex-start;
}

.sb-quickBtn {
    border-radius: 999px !important;
    box-shadow: 0 10px 20px rgba(0,0,0,.18);
    font-weight: 800;
}

.sb-postTitle {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1rem * 1.6 * 2);
}

/* Martyr block wrapper (بدون دست زدن به Html خودت) */
.sb-martyrWrap {
    min-height: 55px;
    border-radius: 12px;
    padding: 10px;
    background: rgba(0,0,0,.02);
    border: 1px solid rgba(0,0,0,.06);
}

/* Small "more" link */
.sb-moreLink {
    text-decoration: none;
    font-weight: 700;
}

    .sb-moreLink:hover {
        text-decoration: underline;
    }
