/* ==================== */
/* صفحه وبلاگ */
/* رنگ‌بندی: سفید، آبی کم، خاکستری خیلی کم */
/* ==================== */

/* ==================== هدر وبلاگ ==================== */
.blog-header {
    background: linear-gradient(135deg, #d4e6f2 0%, #e1eff7 100%);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 50px;
}

.blog-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    color: #2c5f8a;
    margin-bottom: 15px;
}

.blog-header p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: #8aaec8;
    opacity: 0.85;
}

/* ==================== لایه‌بندی اصلی ==================== */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

/* ==================== ستون اصلی ==================== */
.blog-main {
    min-width: 0;
}

/* هشدار جستجو */
.search-alert {
    background: #e1eff7;
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: #5a8bb5;
}

.search-alert i {
    color: #6b9fc2;
}

.search-alert strong {
    color: #2c5f8a;
}

.results-badge {
    background: #d4e6f2;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2c5f8a;
}

/* ==================== پست ویژه ==================== */
.featured-post {
    background: linear-gradient(135deg, #6b9fc2 0%, #5a8bb5 100%);
    border-radius: 24px;
    padding: 35px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.featured-post::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.featured-post::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.featured-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
}

.featured-post h2 {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-post p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 80%;
}

.featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a8bb5;
    transition: all 0.3s ease;
}

.featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .featured-post {
        padding: 25px 20px;
    }
    
    .featured-post p {
        max-width: 100%;
    }
}

/* ==================== گرید پست‌ها ==================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* کارت پست */
.post-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eef2f5;
    box-shadow: 0 2px 12px rgba(44, 95, 138, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(44, 95, 138, 0.1);
    border-color: #d4e6f2;
}

.post-image-link {
    display: block;
    text-decoration: none;
}

.post-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f5f8fa;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 95, 138, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.image-overlay i {
    font-size: 2rem;
    color: #ffffff;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.post-card:hover .image-overlay {
    opacity: 1;
}

.post-card:hover .image-overlay i {
    transform: translateX(0);
}

.post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    background: #d4e6f2;
    color: #2c5f8a;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.post-category:hover {
    background: #c5dae8;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.7rem;
    color: #aac4d4;
}

.post-meta i {
    margin-left: 5px;
    font-size: 0.65rem;
}

.post-date,
.post-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.post-title a {
    text-decoration: none;
    color: #2c5f8a;
    transition: all 0.3s ease;
}

.post-title a:hover {
    color: #6b9fc2;
}

.post-excerpt {
    font-size: 0.8rem;
    color: #8aaec8;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f8fa;
    padding: 7px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b9fc2;
    transition: all 0.3s ease;
    width: fit-content;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover {
    background: #e1eff7;
    color: #2c5f8a;
}

.read-more:hover i {
    transform: translateX(-5px);
}

/* ==================== سایدبار ==================== */
.blog-sidebar {
    min-width: 0;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 30px;
    border: 1px solid #eef2f5;
    box-shadow: 0 2px 8px rgba(44, 95, 138, 0.03);
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c5f8a;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4e6f2;
    display: inline-block;
}

/* فرم جستجو در سایدبار */
.search-form-sidebar {
    width: 100%;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: #fafcfd;
    border: 1px solid #e0eaf0;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #8ab3d0;
    box-shadow: 0 0 0 2px rgba(107, 159, 194, 0.1);
}

.search-input-sidebar {
    flex: 1;
    padding: 12px 18px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #5a8bb5;
}

.search-input-sidebar:focus {
    outline: none;
}

.search-input-sidebar::placeholder {
    color: #c5dae8;
}

.search-btn-sidebar {
    background: #6b9fc2;
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
}

.search-btn-sidebar:hover {
    background: #5a8bb5;
}

/* لیست دسته‌بندی‌ها */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    text-decoration: none;
    color: #8aaec8;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eef2f5;
}

.category-list li a:hover {
    color: #2c5f8a;
}

.category-list li a i {
    color: #6b9fc2;
    font-size: 0.8rem;
}

.category-count {
    background: #f5f8fa;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b9fc2;
}

/* پست‌های محبوب */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-post-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f5;
    transition: all 0.3s ease;
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post-item:hover {
    transform: translateX(-5px);
}

.popular-post-image {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f8fa;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-info h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c5f8a;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.popular-post-info span {
    font-size: 0.65rem;
    color: #aac4d4;
}

.popular-post-info span i {
    margin-left: 4px;
}

/* برچسب‌ها */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #f5f8fa;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    color: #8aaec8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #d4e6f2;
    color: #2c5f8a;
    transform: translateY(-2px);
}

/* ==================== حالت خالی ==================== */
.empty-blog {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #eef2f5;
}

.empty-blog i {
    font-size: 4rem;
    color: #c5dae8;
    margin-bottom: 15px;
}

.empty-blog h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c5f8a;
    margin-bottom: 10px;
}

.empty-blog p {
    color: #aac4d4;
    margin-bottom: 20px;
}

.btn-back-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #6b9fc2;
    color: #ffffff;
    padding: 10px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back-blog:hover {
    background: #5a8bb5;
    transform: translateY(-2px);
}

/* ==================== صفحه‌بندی ==================== */
.pagination-container {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-link {
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #e0eaf0;
    border-radius: 30px;
    color: #6b9fc2;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-link:hover {
    background: #e1eff7;
    color: #2c5f8a;
    border-color: #c5dae8;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #e0eaf0;
    border-radius: 10px;
    color: #6b9fc2;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-number:hover {
    background: #e1eff7;
    border-color: #c5dae8;
    color: #2c5f8a;
}

.page-number.active {
    background: #d4e6f2;
    color: #2c5f8a;
    border-color: #c5dae8;
    font-weight: 600;
}

@media (max-width: 768px) {
    .page-numbers {
        display: none;
    }
    
    .pagination {
        justify-content: space-between;
        width: 100%;
    }
}

/* ==================== انیمیشن‌ها ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }