/**
 * استایل اصلی وبلاگ کواد وب
 * نسخه نهایی - کامل، مدرن، مینیمال و حرفه‌ای
 * 
 * @package QuadWeb
 * @version 3.0.0
 */

/* ============================================
   تنظیمات پایه
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lahzeh', 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    background-color: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.8;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   اسکرول بار
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #c0c8d0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4a90d9;
}
::selection {
    background: #4a90d9;
    color: #ffffff;
}

/* ============================================
   محتوای اصلی
   ============================================ */

.site-main {
    padding: 40px 0 60px;
    min-height: 60vh;
}

.row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}
.col-main { min-width: 0; }
.col-sidebar { min-width: 0; }

/* ============================================
   Hero - فوق‌حرفه‌ای
   ============================================ */

/* ============================================
   Hero - آسمانی و روشن
   ============================================ */

.hero-section {
    background: linear-gradient(145deg, #1a3a6b 0%, #2d6da8 40%, #4a90d9 100%);
    padding: 60px 50px;
    border-radius: 20px;
    color: #ffffff;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 40px rgba(26, 26, 46, 0.15);
}

.hero-section .floating-balls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-section .ball {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: floatBall 14s ease-in-out infinite;
}

.hero-section .ball-1 { width: 120px; height: 120px; background: rgba(255,255,255,0.3); top: -30px; left: -30px; animation-delay: 0s; }
.hero-section .ball-2 { width: 80px; height: 80px; background: rgba(255,255,255,0.2); top: 20%; right: -20px; animation-delay: 2s; }
.hero-section .ball-3 { width: 160px; height: 160px; background: rgba(255,255,255,0.05); bottom: -40px; left: 10%; animation-delay: 4s; }
.hero-section .ball-4 { width: 60px; height: 60px; background: rgba(255,255,255,0.15); top: 50%; right: 10%; animation-delay: 6s; }
.hero-section .ball-5 { width: 100px; height: 100px; background: rgba(255,255,255,0.06); bottom: 20%; right: 25%; animation-delay: 3s; }
.hero-section .ball-6 { width: 90px; height: 90px; background: rgba(255,255,255,0.1); top: 10%; left: 30%; animation-delay: 5s; }

@keyframes floatBall {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -40px) scale(1.1); }
    50% { transform: translate(-30px, -70px) scale(0.9); }
    75% { transform: translate(30px, -30px) scale(1.05); }
}

.hero-section .hero-icon {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.10);
    padding: 18px;
    border-radius: 18px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.06);
}
.hero-section .hero-icon svg {
    stroke: #ffffff;
    width: 56px;
    height: 56px;
}
.hero-section .hero-title {
    font-size: 36px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.hero-section .hero-description {
    font-size: 17px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
    max-width: 520px;
    font-weight: 400;
}

/* ============================================
   کارت‌های مقاله - نسخه نهایی
   ============================================ */

.posts-grid {
    display: grid;
    gap: 30px;
}

.post-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10);
    transform: translateY(-4px);
    border-color: rgba(74, 144, 217, 0.20);
}

/* ============================================
   تصویر - استاندارد با ارتفاع مناسب
   ============================================ */

.post-card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.post-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.post-card:hover .post-card-image img {
    transform: scale(1.04);
}

/* ============================================
   پلاس‌هولدر تصویر (وقتی عکس نداریم)
   ============================================ */

.post-card-image-placeholder {
    background: linear-gradient(145deg, #eef2f7, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-image-placeholder svg {
    stroke: #4a90d9;
    opacity: 0.15;
    width: 56px;
    height: 56px;
}

/* ============================================
   محتوای کارت
   ============================================ */

.post-card-content {
    padding: 22px 26px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   دسته‌بندی
   ============================================ */

.post-card-category {
    margin-bottom: 8px;
}

.post-card-category a {
    display: inline-block;
    background: rgba(74, 144, 217, 0.10);
    color: #4a90d9;
    padding: 2px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-card-category a:hover {
    background: #4a90d9;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ============================================
   عنوان
   ============================================ */

.post-card-title {
    font-size: 19px;
    margin: 6px 0 10px;
    line-height: 1.4;
    font-weight: 700;
}

.post-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card-title a:hover {
    color: #4a90d9;
}

/* ============================================
   توضیح کوتاه
   ============================================ */

.post-card-excerpt {
    color: #4a4a6a;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   متا اطلاعات (تاریخ، زمان مطالعه، بازدید)
   ============================================ */

.post-card-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #6a6a8a;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}

.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card-meta svg {
    stroke: #8a8aaa;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================
   تگ‌ها
   ============================================ */

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
}

.post-card-tags .tag-link {
    display: inline-block;
    background: #f0f4ff;
    padding: 2px 12px;
    border-radius: 100px;
    font-size: 11px;
    color: #4a90d9;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-card-tags .tag-link:hover {
    background: #4a90d9;
    color: #ffffff;
    transform: translateY(-1px);
}

.tag-more {
    font-size: 11px;
    color: #8a8aaa;
    padding: 2px 6px;
}

/* ============================================
   واکنش‌گرایی - لپ‌تاپ بزرگ
   ============================================ */

@media (min-width: 1200px) {
    .post-card-image {
        height: 320px;
    }
}

/* ============================================
   واکنش‌گرایی - لپ‌تاپ معمولی
   ============================================ */

@media (max-width: 1199px) and (min-width: 993px) {
    .post-card-image {
        height: 280px;
    }
}

/* ============================================
   واکنش‌گرایی - تبلت
   ============================================ */

@media (max-width: 992px) {
    .posts-grid {
        gap: 24px;
    }

    .post-card-image {
        height: 220px;
    }
}

/* ============================================
   واکنش‌گرایی - موبایل
   ============================================ */

@media (max-width: 768px) {
    .posts-grid {
        gap: 20px;
    }

    .post-card-image {
        height: 190px;
    }

    .post-card-content {
        padding: 18px 20px 20px;
    }

    .post-card-title {
        font-size: 17px;
    }

    .post-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .post-card-meta {
        gap: 10px;
        font-size: 11px;
    }
}

/* ============================================
   واکنش‌گرایی - موبایل کوچک
   ============================================ */

@media (max-width: 480px) {
    .posts-grid {
        gap: 16px;
    }

    .post-card-image {
        height: 160px;
    }

    .post-card-content {
        padding: 14px 16px 16px;
    }

    .post-card-title {
        font-size: 16px;
    }

    .post-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .post-card-meta {
        gap: 8px;
        font-size: 10px;
        flex-wrap: wrap;
    }

    .post-card-tags .tag-link {
        font-size: 10px;
        padding: 1px 10px;
    }

    .post-card-tags {
        margin-top: 10px;
    }
}
/* ============================================
   سایدبار - حرفه‌ای
   ============================================ */

.sidebar-widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 26px 28px;
    margin-bottom: 26px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.sidebar-widget:hover {
    border-color: rgba(74, 144, 217, 0.12);
    transform: translateY(-2px);
}
.sidebar-widget h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4ff;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a2e;
}
.sidebar-widget h4 svg {
    stroke: #4a90d9;
    width: 20px;
    height: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: center;
}
.stat-item {
    background: #f0f4ff;
    padding: 16px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.stat-item:hover {
    background: #4a90d9;
    transform: translateY(-2px);
}
.stat-item:hover .stat-number,
.stat-item:hover .stat-label {
    color: #ffffff;
}
.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #4a90d9;
    transition: all 0.3s ease;
}
.stat-label {
    font-size: 13px;
    color: #4a4a6a;
    transition: all 0.3s ease;
}

.categories-list {
    list-style: none;
    padding: 0;
}
.categories-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
}
.categories-list li:last-child {
    border-bottom: none;
}
.categories-list a {
    display: flex;
    justify-content: space-between;
    color: #1a1a2e;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}
.categories-list a:hover {
    color: #4a90d9;
    padding-right: 4px;
}
.categories-list .count {
    color: #8a8aaa;
    font-size: 12px;
    background: #f0f2f5;
    padding: 0 10px;
    border-radius: 100px;
}

.popular-list {
    list-style: none;
    padding: 0;
}
.popular-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}
.popular-list li:last-child {
    border-bottom: none;
}
.popular-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a1a2e;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}
.popular-list a:hover {
    color: #4a90d9;
}
.popular-list .views {
    font-size: 12px;
    color: #8a8aaa;
    display: flex;
    align-items: center;
    gap: 4px;
}
.popular-list .views svg {
    stroke: #8a8aaa;
    width: 14px;
    height: 14px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tags-cloud .tag-item {
    display: inline-block;
    background: #f0f4ff;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 13px;
    color: #4a90d9;
    text-decoration: none;
    transition: all 0.3s ease;
}
.tags-cloud .tag-item:hover {
    background: #4a90d9;
    color: #ffffff;
    transform: translateY(-1px);
}
.tags-cloud .tag-item .count {
    font-size: 10px;
    opacity: 0.6;
}

/* ============================================
   صفحه‌بندی
   ============================================ */

.pagination {
    margin-top: 32px;
    text-align: center;
}
.pagination-list {
    display: flex;
    justify-content: center;
    gap: 4px;
    list-style: none;
    padding: 0;
}
.pagination-list li a,
.pagination-list li span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 12px;
    background: #ffffff;
    color: #1a1a2e;
    border: 1px solid #e8ecf0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}
.pagination-list li a:hover {
    background: #4a90d9;
    color: #ffffff;
    border-color: #4a90d9;
    transform: translateY(-1px);
}
.pagination-list li a:hover svg {
    stroke: #ffffff;
}
.pagination-list li .current {
    background: #4a90d9;
    color: #ffffff;
    border-color: #4a90d9;
}
.pagination-list li .disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pagination-list li svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ============================================
   حالت خالی
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 30px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8ecf0;
}
.empty-icon svg {
    margin-bottom: 18px;
    stroke: #4a90d9;
    opacity: 0.3;
}
.empty-state h3 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
}
.empty-state p {
    color: #6a6a8a;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Lahzeh', 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    font-size: 14px;
    text-decoration: none;
}
.btn-primary {
    background: #4a90d9;
    color: #ffffff;
}
.btn-primary:hover {
    background: #3a7bc8;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 144, 217, 0.25);
}
.btn-secondary {
    background: #f5f7fa;
    color: #1a1a2e;
}
.btn-secondary:hover {
    background: #e8ecf0;
}

/* ============================================
   صفحه دسته‌بندی
   ============================================ */

.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}
.category-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4a90d9, #6db3f2);
    flex-shrink: 0;
}
.category-header-icon svg {
    stroke: #ffffff;
    width: 28px;
    height: 28px;
}
.category-header-content { flex: 1; }
.category-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}
.category-description {
    font-size: 14px;
    color: #6a6a8a;
    margin: 4px 0 0;
}

/* ============================================
   صفحه تگ
   ============================================ */

.tag-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}
.tag-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    flex-shrink: 0;
}
.tag-header-icon svg {
    stroke: #ffffff;
    width: 28px;
    height: 28px;
}
.tag-header-content { flex: 1; }
.tag-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}
.tag-description {
    font-size: 14px;
    color: #6a6a8a;
    margin: 4px 0 0;
}

/* ============================================
   صفحه نمایش مقاله
   ============================================ */

.breadcrumb {
    margin-bottom: 24px;
}
.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    font-size: 13px;
    color: #6a6a8a;
}
.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 6px;
}
.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    color: #b0b0c0;
    font-size: 18px;
}
.breadcrumb-list li a {
    color: #4a90d9;
    text-decoration: none;
    transition: color 0.3s ease;
}
.breadcrumb-list li a:hover {
    color: #3a7bc8;
}
.breadcrumb-list li.active {
    color: #1a1a2e;
}

.post-header {
    margin-bottom: 28px;
}
.post-category {
    margin-bottom: 12px;
}
.post-category a {
    display: inline-block;
    background: #4a90d9;
    color: #ffffff;
    padding: 3px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}
.post-category a:hover {
    background: #3a7bc8;
    transform: translateY(-1px);
}
.post-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.3;
    margin: 0 0 16px;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    font-size: 13px;
    color: #6a6a8a;
    padding: 14px 0;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
}
.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.post-meta svg {
    width: 16px;
    height: 16px;
    stroke: #8a8aaa;
}
.post-status-draft {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}
.post-status-draft svg {
    stroke: #92400e;
}

.post-cover {
    margin: 20px 0 30px;
    border-radius: 16px;
    overflow: hidden;
}
.post-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    font-size: 17px;
    line-height: 2;
    color: #1a1a2e;
}
.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: 700;
}
.post-content p {
    margin-bottom: 18px;
}
.post-content ul,
.post-content ol {
    margin-bottom: 18px;
    padding-right: 24px;
}
.post-content ul li,
.post-content ol li {
    margin-bottom: 6px;
}
.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}
.post-content blockquote {
    padding: 16px 24px;
    background: #f0f4ff;
    border-right: 4px solid #4a90d9;
    border-radius: 8px;
    margin: 16px 0;
    font-style: italic;
    color: #4a4a6a;
}
.post-content pre {
    background: #1a1a2e;
    color: #e8edf2;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.7;
    margin: 16px 0;
}
.post-content code {
    font-family: monospace;
    font-size: 14px;
}
.post-content pre code {
    background: transparent;
    padding: 0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    border-top: 1px solid #f0f2f5;
    margin-top: 30px;
}
.tags-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #4a4a6a;
}
.tags-label svg {
    width: 18px;
    height: 18px;
    stroke: #4a4a6a;
}
.post-tags .tag-link {
    display: inline-block;
    background: #f0f4ff;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 13px;
    color: #4a90d9;
    text-decoration: none;
    transition: all 0.3s ease;
}
.post-tags .tag-link:hover {
    background: #4a90d9;
    color: #ffffff;
    transform: translateY(-1px);
}

.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid #f0f2f5;
    margin-top: 10px;
}
.share-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #4a4a6a;
}
.share-label svg {
    width: 18px;
    height: 18px;
    stroke: #4a4a6a;
}
.share-telegram,
.share-twitter,
.share-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e8ecf0;
    background: #ffffff;
    color: #4a4a6a;
    cursor: pointer;
    font-family: inherit;
}
.share-telegram svg,
.share-twitter svg,
.share-copy svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
.share-telegram:hover {
    background: #0088cc;
    color: #ffffff;
    border-color: #0088cc;
}
.share-twitter:hover {
    background: #1da1f2;
    color: #ffffff;
    border-color: #1da1f2;
}
.share-copy:hover {
    background: #4a90d9;
    color: #ffffff;
    border-color: #4a90d9;
}

.related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f2f5;
}
.related-posts h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}
.related-posts h3 svg {
    width: 24px;
    height: 24px;
    stroke: #4a90d9;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.related-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.related-card a {
    text-decoration: none;
    color: inherit;
}
.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.related-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    padding: 12px 16px 4px;
    margin: 0;
    line-height: 1.4;
}
.related-card .related-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #8a8aaa;
    padding: 0 16px 14px;
}
.related-card .related-date svg {
    width: 14px;
    height: 14px;
    stroke: #8a8aaa;
}

/* ============================================
   واکنش‌گرایی - تبلت
   ============================================ */

@media (max-width: 992px) {
    .row {
        grid-template-columns: 1fr;
    }
    .hero-section {
        padding: 40px 30px;
        min-height: 240px;
    }
    .hero-section .hero-title {
        font-size: 28px;
    }
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   واکنش‌گرایی - موبایل
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 30px 20px;
        min-height: 200px;
        border-radius: 14px;
    }
    .hero-section .hero-title {
        font-size: 22px;
    }
    .hero-section .hero-description {
        font-size: 14px;
    }
    .hero-section .hero-icon {
        padding: 12px;
    }
    .hero-section .hero-icon svg {
        width: 40px;
        height: 40px;
    }
    .hero-section .ball-1,
    .hero-section .ball-2,
    .hero-section .ball-3,
    .hero-section .ball-4,
    .hero-section .ball-5,
    .hero-section .ball-6 {
        display: none;
    }

    .post-card-image {
        height: 200px;
    }
    .post-card-content {
        padding: 18px 20px 20px;
    }
    .post-card-title {
        font-size: 18px;
    }
    .post-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    .post-card-meta {
        gap: 12px;
        font-size: 11px;
    }

    .category-header,
    .tag-header {
        padding: 18px 20px;
        flex-direction: column;
        text-align: center;
    }
    .category-header-icon,
    .tag-header-icon {
        width: 48px;
        height: 48px;
    }
    .category-header-icon svg,
    .tag-header-icon svg {
        width: 24px;
        height: 24px;
    }
    .category-title,
    .tag-title {
        font-size: 20px;
    }

    .post-title {
        font-size: 24px;
    }
    .post-meta {
        gap: 10px 16px;
        font-size: 12px;
    }
    .post-content {
        font-size: 15px;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .related-card img {
        height: 120px;
    }
    .post-share {
        gap: 8px;
    }
    .share-telegram,
    .share-twitter,
    .share-copy {
        padding: 4px 12px;
        font-size: 12px;
    }
}

/* ============================================
   واکنش‌گرایی - موبایل کوچک
   ============================================ */

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .hero-section {
        padding: 24px 16px;
        min-height: 170px;
        border-radius: 12px;
    }
    .hero-section .hero-title {
        font-size: 18px;
    }
    .hero-section .hero-description {
        font-size: 13px;
    }

    .post-card-image {
        height: 170px;
    }
    .post-card-content {
        padding: 14px 16px 16px;
    }
    .post-card-title {
        font-size: 16px;
    }
    .post-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    .post-card-meta {
        gap: 10px;
        font-size: 11px;
        flex-wrap: wrap;
    }
    .post-card-tags .tag-link {
        font-size: 10px;
        padding: 1px 10px;
    }

    .sidebar-widget {
        padding: 18px 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-item {
        padding: 12px 8px;
    }
    .stat-number {
        font-size: 20px;
    }

    .pagination-list li a,
    .pagination-list li span {
        padding: 6px 12px;
        font-size: 13px;
    }

    .category-header,
    .tag-header {
        padding: 16px 14px;
        gap: 12px;
    }
    .category-header-icon,
    .tag-header-icon {
        width: 40px;
        height: 40px;
    }
    .category-header-icon svg,
    .tag-header-icon svg {
        width: 20px;
        height: 20px;
    }
    .category-title,
    .tag-title {
        font-size: 18px;
    }
    .category-description,
    .tag-description {
        font-size: 13px;
    }

    .post-title {
        font-size: 20px;
    }
    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
    .post-header {
        margin-bottom: 20px;
    }
    .post-cover {
        margin: 12px 0 20px;
    }
    .post-content {
        font-size: 14px;
    }
    .post-content h2 {
        font-size: 20px;
    }
    .post-content h3 {
        font-size: 18px;
    }

    .empty-state {
        padding: 40px 20px;
    }
    .empty-state h3 {
        font-size: 18px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}


/* ============================================
   صفحه جستجو
   ============================================ */

.search-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.search-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4a90d9, #6db3f2);
    flex-shrink: 0;
}

.search-header-icon svg {
    stroke: #ffffff;
    width: 28px;
    height: 28px;
}

.search-header-content {
    flex: 1;
}

.search-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.search-subtitle {
    font-size: 14px;
    color: #6a6a8a;
    margin: 2px 0 0;
}

/* ============================================
   فرم جستجو
   ============================================ */

.search-form {
    margin-bottom: 30px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 0 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.search-input-wrapper:focus-within {
    border-color: #4a90d9;
    box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.08);
}

.search-input-icon {
    width: 20px;
    height: 20px;
    stroke: #8a8aaa;
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    padding: 16px 14px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #1a1a2e;
    outline: none;
    font-family: inherit;
}

.search-input-wrapper input::placeholder {
    color: #b0b0c0;
}

.search-input-wrapper button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #4a90d9, #6db3f2);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.search-input-wrapper button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.search-input-wrapper button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 144, 217, 0.25);
}

/* ============================================
   اطلاعات نتایج جستجو
   ============================================ */

.search-result-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 28px;
    font-size: 15px;
    color: #4a4a6a;
}

.result-count {
    font-weight: 700;
    color: #4a90d9;
    font-size: 18px;
}

.result-query {
    font-weight: 700;
    color: #1a1a2e;
}

/* ============================================
   واکنش‌گرایی
   ============================================ */

@media (max-width: 768px) {
    .search-header {
        padding: 18px 20px;
        flex-direction: column;
        text-align: center;
    }
    .search-header-icon {
        width: 48px;
        height: 48px;
    }
    .search-header-icon svg {
        width: 24px;
        height: 24px;
    }
    .search-title {
        font-size: 20px;
    }
    .search-subtitle {
        font-size: 13px;
    }

    .search-input-wrapper {
        flex-wrap: wrap;
        padding: 12px 16px;
        border-radius: 12px;
    }
    .search-input-wrapper input {
        padding: 12px 12px;
        font-size: 15px;
        width: 100%;
        order: 1;
    }
    .search-input-wrapper button {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
        border-radius: 10px;
        order: 2;
        margin-top: 8px;
    }
    .search-input-icon {
        display: none;
    }

    .search-result-info {
        font-size: 14px;
        padding: 12px 16px;
        justify-content: center;
    }
    .result-count {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .search-header {
        padding: 14px 16px;
        gap: 12px;
    }
    .search-header-icon {
        width: 40px;
        height: 40px;
    }
    .search-header-icon svg {
        width: 20px;
        height: 20px;
    }
    .search-title {
        font-size: 18px;
    }

    .search-input-wrapper {
        padding: 10px 14px;
    }
    .search-input-wrapper input {
        font-size: 14px;
        padding: 10px 10px;
    }
    .search-input-wrapper button {
        font-size: 13px;
        padding: 10px;
    }

    .search-result-info {
        font-size: 13px;
        padding: 10px 14px;
        gap: 4px;
    }
    .result-count {
        font-size: 14px;
    }
}



/* ============================================
   صفحه 404 - مدرن و جذاب
   ============================================ */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 60px 20px;
}

.error-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

/* ===== آیکون ===== */
.error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(74, 144, 217, 0.08);
    margin-bottom: 24px;
}

.error-icon svg {
    width: 40px;
    height: 40px;
    stroke: #4a90d9;
}

/* ===== کد خطا ===== */
.error-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
    color: #1a1a2e;
}

.error-digit {
    display: inline-block;
    animation: errorFloat 3s ease-in-out infinite;
}

.error-digit-center {
    color: #4a90d9;
    animation-delay: 0.5s;
}

.error-digit:nth-child(1) {
    animation-delay: 0s;
}

.error-digit:nth-child(3) {
    animation-delay: 1s;
}

@keyframes errorFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===== عنوان ===== */
.error-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

/* ===== توضیح ===== */
.error-message {
    font-size: 16px;
    color: #6a6a8a;
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== دکمه‌ها ===== */
.error-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.error-actions .btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.error-actions .btn-primary {
    background: #4a90d9;
    color: #ffffff;
    border: none;
}

.error-actions .btn-primary:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 144, 217, 0.25);
}

.error-actions .btn-secondary {
    background: #f0f2f5;
    color: #4a4a6a;
    border: 1px solid #e8ecf0;
}

.error-actions .btn-secondary:hover {
    background: #e8ecf0;
    transform: translateY(-2px);
}

/* ===== لینک‌های کمکی ===== */
.error-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #8a8aaa;
}

.error-help a {
    color: #4a90d9;
    text-decoration: none;
    transition: color 0.3s ease;
}

.error-help a:hover {
    color: #3a7bc8;
    text-decoration: underline;
}

.help-divider {
    color: #d0d0d0;
}

/* ============================================
   واکنش‌گرایی
   ============================================ */

@media (max-width: 768px) {
    .error-code {
        font-size: 60px;
        gap: 4px;
    }
    
    .error-icon {
        width: 64px;
        height: 64px;
    }
    
    .error-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .error-title {
        font-size: 22px;
    }
    
    .error-message {
        font-size: 15px;
    }
    
    .error-actions .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .error-code {
        font-size: 44px;
        gap: 2px;
    }
    
    .error-title {
        font-size: 18px;
    }
    
    .error-message {
        font-size: 14px;
    }
    
    .error-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .error-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .error-help {
        flex-wrap: wrap;
        font-size: 13px;
    }
}