﻿: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;
    --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.4rem, 4vw, 1.8rem);
        font-weight: 800;
        color: var(--text);
        margin: 0 0 8px;
    }

    .blog-header p {
        color: var(--text-muted);
        font-size: 14px;
        margin: 0;
    }

.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;
    position: relative;
}

    .post-card:hover {
        border-color: var(--gold-dim);
        transform: translateY(-3px);
    }

.remove-bm {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(10,12,15,0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,87,87,0.3);
    color: #ff5a7a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: var(--transition);
    font-size: 14px;
}

    .remove-bm:hover {
        background: rgba(255,87,87,0.2);
        border-color: #ff5a7a;
    }

.post-thumb {
    aspect-ratio: 16/10;
    background: var(--surface-2);
    overflow: hidden;
    display: block;
    text-decoration: none;
}

    .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 0 16px;
    }

    .empty-state a {
        display: inline-block;
        color: var(--gold);
        text-decoration: none;
        font-weight: 700;
        font-size: 13px;
        padding: 8px 18px;
        border: 1px solid var(--gold-dim);
        border-radius: 999px;
        transition: var(--transition);
    }

        .empty-state a:hover {
            background: var(--gold);
            color: var(--bg);
        }

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

    .loading .spinner {
        width: 32px;
        height: 32px;
        border: 2px solid var(--border-strong);
        border-top-color: var(--gold);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin: 0 auto 12px;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@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;
    }
}