/* ============================================
   blog.css - استایل اختصاصی بلاگ
   ============================================ */

/* ============================================
   Blog Hero Section
   ============================================ */
.blog-hero {
    padding: 120px 20px 40px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.1), transparent 70%);
    position: relative;
}

.blog-hero .section-tag {
    display: inline-block;
    background: rgba(79, 70, 229, 0.15);
    color: #4f46e5;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.blog-hero .section-title {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, rgba(248, 250, 252, 0.68));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero .section-desc {
    color: rgba(248, 250, 252, 0.68);
    font-size: 15px;
    margin-bottom: 28px;
}

.blog-hero .search-form {
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 5;
}

.blog-hero .search-form input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.25s;
}

.blog-hero .search-form input:focus {
    border-color: #4f46e5;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.blog-hero .search-form button {
    padding: 14px 26px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.25s;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5);
}

.blog-hero .search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.6);
}

/* ============================================
   Blog Main Layout
   ============================================ */
.blog-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
    z-index: 5;
}

/* ============================================
   Sidebar
   ============================================ */
.blog-main .sidebar {
    position: sticky;
    top: 90px;
}

.blog-main .widget {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
}

.blog-main .widget h3 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
    color: #fff;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li { margin-bottom: 6px; }

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(248, 250, 252, 0.68);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.category-list a:hover,
.category-list a.active {
    background: rgba(79, 70, 229, 0.15);
    color: #4f46e5;
}

.category-list a span {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 9px;
    border-radius: 8px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags-cloud .tag {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.tags-cloud .tag:hover,
.tags-cloud .tag.active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

/* ============================================
   Posts Grid
   ============================================ */
.posts-area {
    min-width: 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.post-card {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 5;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.6), 0 0 30px rgba(79, 70, 229, 0.15);
}

.post-card .post-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a24, #2a2a34);
}

.post-card .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-card .post-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card .post-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 11px;
    color: rgba(248, 250, 252, 0.42);
    margin-bottom: 12px;
}

.post-card .post-meta .category {
    background: rgba(79, 70, 229, 0.15);
    color: #4f46e5;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
}

.post-card h2 {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 10px;
    color: #fff;
}

.post-card h2 a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.post-card h2 a:hover {
    color: #4f46e5;
}

.post-card .excerpt {
    color: rgba(248, 250, 252, 0.68);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .read-more {
    color: #4f46e5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    align-self: flex-start;
}

.post-card .read-more:hover {
    transform: translateX(-5px);
    color: #6d63ff;
}

/* Small cards */
.post-card.small .post-body { padding: 16px; }
.post-card.small h3 { font-size: 14px; margin-bottom: 8px; }
.post-card.small h3 a { color: #fff; text-decoration: none; }
.post-card.small h3 a:hover { color: #4f46e5; }
.post-card.small .excerpt { font-size: 12px; margin-bottom: 8px; }

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    min-width: 42px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.pagination a:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    transform: translateY(-2px);
}

.pagination .current {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #fff;
    border-color: #4f46e5;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.1);
    backdrop-filter: blur(20px);
}

.empty-state .icon {
    font-size: 64px;
    opacity: 0.3;
    display: block;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}

.empty-state p {
    color: rgba(248, 250, 252, 0.68);
    margin-bottom: 24px;
    font-size: 14px;
}

.empty-state .btn {
    display: inline-block;
}

/* ============================================
   Article Page (صفحه جزئیات)
   ============================================ */
.article-main {
    max-width: 820px;
    margin: 0 auto;
    padding: 110px 20px 80px;
    position: relative;
    z-index: 5;
}

.article {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
    color: rgba(248, 250, 252, 0.42);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

.breadcrumb a {
    color: rgba(248, 250, 252, 0.68);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover { color: #4f46e5; }
.breadcrumb span { color: rgba(248, 250, 252, 0.42); }

/* Article Header */
.article-header {
    margin-bottom: 30px;
}

.article-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
    color: rgba(248, 250, 252, 0.68);
    margin-bottom: 18px;
}

.article-meta .category {
    background: rgba(79, 70, 229, 0.15);
    color: #4f46e5;
    padding: 5px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
}

.article-header h1 {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 18px;
    color: #fff;
    letter-spacing: -0.5px;
}

.article-header .lead {
    font-size: 16px;
    color: rgba(248, 250, 252, 0.68);
    line-height: 1.9;
    margin-bottom: 26px;
    padding-right: 18px;
    border-right: 3px solid #4f46e5;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.08);
}

.author-avatar {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.author-info strong {
    display: block;
    font-size: 14px;
    color: #fff;
    font-weight: 700;
}

.author-info span {
    font-size: 11px;
    color: rgba(248, 250, 252, 0.5);
}

/* Cover */
.article-cover {
    margin: 32px 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.article-cover img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    font-size: 16px;
    line-height: 2;
    color: #e8e8e8;
    margin: 32px 0;
    word-wrap: break-word;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 40px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(79, 70, 229, 0.3);
    color: #fff;
    line-height: 1.5;
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 30px 0 14px;
    color: #fff;
    line-height: 1.6;
}

.article-content p {
    margin-bottom: 18px;
    color: #d8d8d8;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin: 18px 24px 18px 0;
    padding-right: 0;
}

.article-content li {
    margin-bottom: 10px;
    color: #d8d8d8;
    line-height: 1.9;
}

.article-content li::marker { color: #4f46e5; }

.article-content a {
    color: #6d63ff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(109, 99, 255, 0.5);
    transition: all 0.2s;
}

.article-content a:hover {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.article-content strong {
    color: #fff;
    font-weight: 800;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 24px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.article-content blockquote {
    padding: 20px 24px;
    background: rgba(79, 70, 229, 0.08);
    border-right: 4px solid #4f46e5;
    border-radius: 12px;
    margin: 24px 0;
    font-style: italic;
    color: #e8e8e8;
    line-height: 1.9;
}

.article-content blockquote p {
    margin: 0;
    color: #e8e8e8;
}

.article-content code {
    background: rgba(15, 23, 42, 0.8);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #ffb700;
}

.article-content pre {
    background: rgba(15, 23, 42, 0.9);
    padding: 20px;
    border-radius: 14px;
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid rgba(226, 232, 240, 0.1);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: #e8e8e8;
}

.article-content hr {
    border: none;
    border-top: 1px solid rgba(226, 232, 240, 0.1);
    margin: 40px 0;
}

/* Article Tags */
.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.1);
}

.article-tags strong {
    font-size: 13px;
    color: rgba(248, 250, 252, 0.68);
}

.article-tags .tag {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.article-tags .tag:hover {
    background: #4f46e5;
    color: #fff;
}

/* Share Section */
.share-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 14px;
    margin-bottom: 32px;
    border: 1px solid rgba(226, 232, 240, 0.08);
}

.share-section strong {
    font-size: 13px;
    color: rgba(248, 250, 252, 0.68);
    margin-left: 8px;
}

.share-btn {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    transition: all 0.25s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.telegram { background: #0088cc; }
.share-btn.whatsapp { background: #25d366; }

/* Related Posts */
.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #fff;
}

/* Back Link */
.back-link {
    text-align: center;
    margin-top: 50px;
}

.back-link .btn {
    display: inline-block;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .blog-hero { padding: 100px 16px 30px; }
    .blog-hero .section-title { font-size: 28px; }
    .blog-hero .search-form { flex-direction: column; }

    .blog-main {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 30px 16px 60px;
    }

    .blog-main .sidebar { position: static; }

    .posts-grid { grid-template-columns: 1fr; }

    .article-main { padding: 100px 16px 60px; }
    .article { padding: 28px 20px; border-radius: 18px; }
    .article-header h1 { font-size: 24px; }
    .article-header .lead { font-size: 14px; padding-right: 14px; }
    .article-content { font-size: 15px; }
    .article-content h2 { font-size: 20px; }
    .article-content h3 { font-size: 17px; }
    .share-section { padding: 14px; }
}

@media (max-width: 600px) {
    .blog-hero { padding: 90px 12px 24px; }
    .blog-hero .section-title { font-size: 22px; }
    .blog-hero .section-desc { font-size: 13px; }

    .blog-main { padding: 24px 12px 40px; }

    .article-main { padding: 90px 12px 40px; }
    .article { padding: 20px 16px; border-radius: 16px; }
    .article-header h1 { font-size: 20px; }
    .article-meta { gap: 10px; font-size: 11px; }
    .article-content { font-size: 14px; line-height: 1.9; }
    .article-content h2 { font-size: 18px; margin: 28px 0 14px; }
    .article-content h3 { font-size: 16px; }
    .breadcrumb { font-size: 11px; }

    .share-section { flex-direction: column; align-items: stretch; }
    .share-btn { text-align: center; }

    .post-card h2 { font-size: 15px; }
    .post-card .post-body { padding: 18px; }
}