﻿/* ================================
     Followyab Blog List - Modern UI
     ================================ */
/* ----- Hero ----- */
.blog-list-hero {
    background: linear-gradient(135deg,#6366f1,#4f46e5);
    padding: 70px 0;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-list-hero:before,
.blog-list-hero:after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
    filter: blur(2px);
}

.blog-list-hero:before {
    top: -220px;
    left: -220px;
}

.blog-list-hero:after {
    bottom: -240px;
    right: -240px;
    background: rgba(236,72,153,.15);
}

.blog-list-hero h1 {
    font-size: 38px;
    font-weight: 800;
    margin: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.blog-list-hero p {
    margin-top: 10px;
    opacity: .92;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

/* ----- Wrapper ----- */
.blog-list-wrapper {
    background: #f8fafc;
    padding: 60px 0;
}

    /* ----- Cards Grid spacing ----- */
    .blog-list-wrapper .row > [class*="col-"] {
        margin-bottom: 30px;
    }

/* ----- Card ----- */
.blog-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .blog-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 30px 70px rgba(0,0,0,.12);
    }

.blog-card-image {
    display: block;
    position: relative;
    overflow: hidden;
}

    .blog-card-image img {
        width: 100%;
        height: 210px;
        object-fit: cover;
        transition: transform .35s ease;
        display: block;
    }

.blog-card:hover .blog-card-image img {
    transform: scale(1.04);
}

.blog-card-image:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.10) 100%);
    opacity: .9;
    pointer-events: none;
}

/* ----- Body ----- */
.blog-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

    .blog-card-body h2 {
        font-size: 18px;
        font-weight: 800;
        line-height: 1.7;
        margin: 0;
    }

        .blog-card-body h2 a {
            color: #111827;
            text-decoration: none;
            transition: color .2s ease;
        }

            .blog-card-body h2 a:hover {
                color: #4f46e5;
            }

.excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 2.0;
    margin: 12px 0 0 0;
    min-height: 56px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* دو خط */
    -webkit-box-orient: vertical;
}

/* ----- Meta ----- */
.blog-card-meta {
    margin-top: auto;
    padding-top: 14px;
    font-size: 13px;
    color: #9ca3af;
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px dashed #eef2f7;
}

    .blog-card-meta span {
        display: inline-flex;
        align-items: center;
    }

/* ----- Sidebar ----- */
.blog-sidebar {
    position: sticky;
    top: 120px;
    background: #fff;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 20px 45px rgba(0,0,0,.06);
}

    .blog-sidebar h4 {
        font-size: 15px;
        font-weight: 800;
        margin: 0 0 12px 0;
        color: #111827;
        border-right: 3px solid #6366f1;
        padding-right: 10px;
    }

    .blog-sidebar ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .blog-sidebar li {
        margin: 6px 0;
    }

    .blog-sidebar a {
        display: block;
        padding: 10px 12px;
        border-radius: 12px;
        color: #374151;
        text-decoration: none;
        background: #f9fafb;
        border: 1px solid #eef2f7;
        transition: all .2s ease;
        font-size: 14px;
        line-height: 1.6;
    }

        .blog-sidebar a:hover {
            background: #eef2ff;
            border-color: #c7d2fe;
            color: #4338ca;
            transform: translateX(-2px);
        }

    .blog-sidebar li.active a {
        background: linear-gradient(135deg,#6366f1,#4f46e5);
        border-color: transparent;
        color: #fff;
        font-weight: 700;
    }

/* ----- Pagination ----- */
.pagination {
    margin: 25px 0 0 0;
    display: inline-flex;
    gap: 8px;
    padding: 0;
}

    .pagination > li {
        display: inline-block;
    }

        .pagination > li > a,
        .pagination > li > span {
            border: 1px solid #e5e7eb !important;
            background: #fff;
            color: #111827;
            border-radius: 12px !important;
            padding: 10px 14px;
            line-height: 1;
            transition: all .2s ease;
            font-weight: 600;
        }

            .pagination > li > a:hover {
                background: #f3f4f6;
                border-color: #d1d5db !important;
                color: #111827;
            }

        .pagination > li.active > a,
        .pagination > li.active > span {
            background: linear-gradient(135deg,#6366f1,#4f46e5) !important;
            border-color: transparent !important;
            color: #fff !important;
        }


.author-sidebar-header {
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e5e7eb;
}

    .author-sidebar-header h4 {
        margin: 0;
        font-size: 15px;
        font-weight: 800;
        color: #111827;
    }

.author-avatar-sidebar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 14px auto 10px;
    display: block;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.author-name {
    font-size: 15px;
    font-weight: 700;
    margin: 6px 0;
    color: #1f2937;
}

.author-description {
    font-size: 14px;
    line-height: 1.9;
    color: #6b7280;
    margin: 8px 0 12px;
    text-align: right;
}

.author-meta {
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
}



/* ----- Responsive ----- */
@media (max-width: 992px) {
    .blog-list-hero h1 {
        font-size: 30px;
    }

    .blog-list-wrapper {
        padding: 35px 0;
    }

    .blog-card-image img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .blog-card-image img {
        height: 190px;
    }

    .excerpt {
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 480px) {
    .blog-list-hero {
        padding: 55px 0;
    }

        .blog-list-hero h1 {
            font-size: 26px;
        }

    .blog-card-body {
        padding: 18px;
    }
}

/* =========================
   Mobile: Sidebar first
   ========================= */
@media (max-width: 767px) {

    .blog-list-wrapper .row {
        display: flex;
        flex-direction: column;
    }

    .blog-sidebar-col {
        order: 1; /* اول */
        margin-bottom: 25px;
    }

    .blog-posts-col {
        order: 2; /* بعد */
    }
}
