﻿:root {
    --bg: #0a0c0f;
    --surface: #12161a;
    --surface-2: #181d22;
    --border: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.1);
    --text: #f0f0f0;
    --text-muted: #888;
    --gold: #cea277;
    --gold-dim: rgba(206,162,119,0.15);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

.blog-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 16px 80px;
    direction: rtl;
}

.blog-header {
    text-align: center;
    margin-bottom: 32px;
}

    .blog-header h1 {
        font-size: clamp(1.5rem, 4vw, 2rem);
        font-weight: 800;
        color: var(--text);
        margin: 0 0 8px;
    }

    .blog-header p {
        color: var(--text-muted);
        font-size: 14px;
        max-width: 600px;
        margin: 0 auto;
        line-height: 1.7;
    }

.sort-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.sort-btn {
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

    .sort-btn:hover {
        color: var(--gold);
        border-color: var(--gold-dim);
    }

    .sort-btn.active {
        background: var(--gold);
        color: var(--bg);
        border-color: var(--gold);
    }

.search-bar {
    max-width: 500px;
    margin: 0 auto 20px;
    position: relative;
}

    .search-bar i {
        position: absolute;
        top: 50%;
        right: 14px;
        transform: translateY(-50%);
        color: var(--text-muted);
        font-size: 14px;
        pointer-events: none;
    }

    .search-bar input {
        background: var(--surface);
        border: 1px solid var(--border-strong);
        color: var(--text);
        border-radius: 999px;
        padding: 11px 44px 11px 16px;
        font-size: 13px;
        width: 100%;
        transition: var(--transition);
    }

        .search-bar input:focus {
            border-color: var(--gold);
            outline: none;
            box-shadow: 0 0 0 3px var(--gold-dim);
        }

        .search-bar input::placeholder {
            color: #555;
        }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

    .post-card:hover {
        border-color: var(--gold-dim);
        transform: translateY(-3px);
    }

.post-thumb {
    aspect-ratio: 16/10;
    background: var(--surface-2);
    overflow: hidden;
    position: relative;
}

    .post-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s var(--transition);
    }

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .post-thumb-placeholder i {
        font-size: 36px;
        color: var(--gold);
        opacity: 0.2;
    }

.post-cat-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(10,12,15,0.85);
    backdrop-filter: blur(6px);
    color: var(--gold);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid var(--gold-dim);
}

.post-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.6;
    margin: 0 0 8px;
}

    .post-title a {
        color: inherit;
        text-decoration: none;
    }

.post-card:hover .post-title {
    color: var(--gold);
}

.post-excerpt {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .post-meta-item i {
        color: var(--gold);
        font-size: 12px;
    }

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

    .empty-state i {
        font-size: 48px;
        color: var(--gold);
        opacity: 0.3;
        margin-bottom: 14px;
    }

    .empty-state h3 {
        color: var(--text);
        font-size: 16px;
        margin: 0 0 6px;
    }

    .empty-state p {
        font-size: 13px;
        margin: 0;
    }

.pagination-wrap {
    margin-top: 32px;
}

    .pagination-wrap .page-link {
        background: var(--surface) !important;
        border: 1px solid var(--border-strong) !important;
        color: var(--text) !important;
        margin: 0 2px;
        border-radius: 8px !important;
        min-width: 36px;
        text-align: center;
        font-size: 13px;
    }

    .pagination-wrap .page-item.active .page-link {
        background: var(--gold) !important;
        border-color: var(--gold) !important;
        color: var(--bg) !important;
    }

    .pagination-wrap .page-item.disabled .page-link {
        opacity: 0.4;
    }

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-wrap {
        padding: 24px 12px 60px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .post-body {
        padding: 14px;
    }

    .post-title {
        font-size: 14px;
    }

    .sort-bar {
        gap: 4px;
    }

    .sort-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}
