/* ========================================
   استایل‌های تکمیلی وبلاگ
   blog.css
   ======================================== */

/* ==================== هیرو وبلاگ ==================== */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0D1642 100%);
    padding: 50px 0 60px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(121, 134, 203, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-hero .breadcrumb {
    justify-content: center;
    margin-bottom: 24px;
}

.blog-hero .breadcrumb a {
    color: rgba(255,255,255,0.6);
}

.blog-hero .breadcrumb a:hover {
    color: #fff;
}

.blog-hero .breadcrumb .sep {
    color: rgba(255,255,255,0.3);
    margin: 0 4px;
}

.blog-hero .breadcrumb .current {
    color: rgba(255,255,255,0.8);
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.4;
}

.gradient-text {
    background: linear-gradient(135deg, #7986CB, #C5CAE9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* جستجوی هیرو */
.hero-search-box {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-search-box form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.hero-search-box .search-icon {
    margin: 0 12px;
    color: var(--grey-500);
    flex-shrink: 0;
}

.hero-search-box input {
    flex: 1;
    padding: 14px 8px;
    border: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--grey-900);
    outline: none;
    background: transparent;
}

.hero-search-box .btn {
    flex-shrink: 0;
    padding: 12px 24px;
}

/* ==================== نوار دسته‌بندی ==================== */
.categories-bar {
    background: #fff;
    border-bottom: 1px solid var(--grey-200);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.categories-scroll {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--grey-100);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.cat-chip:hover {
    background: var(--light);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

.cat-chip.active {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
}

.cat-chip .cat-icon {
    font-size: 1rem;
}

.cat-chip .cat-count {
    background: rgba(0,0,0,0.08);
    padding: 1px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-family: var(--font-num);
}

.cat-chip.active .cat-count {
    background: rgba(255,255,255,0.2);
}

/* ==================== لایه‌بندی وبلاگ ==================== */
.blog-main {
    background: var(--grey-100);
    padding: 50px 0 80px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.blog-content {
    order: 2;
    min-width: 0;
}

.blog-sidebar {
    order: 1;
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--grey-300) transparent;
}

/* ==================== پست ویژه ==================== */
.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    transition: box-shadow 0.3s ease;
}

.featured-post:hover {
    box-shadow: var(--shadow-xl);
}

.featured-image {
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.featured-content {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.post-category {
    background: var(--light);
    color: var(--primary-dark);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-date,
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 14px;
}

.featured-title a {
    color: var(--grey-900);
}

.featured-title a:hover {
    color: var(--primary);
}

.featured-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 24px;
}

.featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--grey-700);
}

.post-author img {
    border-radius: 50%;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more-btn:hover {
    gap: 10px;
    color: var(--primary-dark);
}

/* ==================== عنوان بخش ==================== */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--grey-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-bar {
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
    display: inline-block;
}

/* دکمه‌های تغییر نما */
.view-toggle {
    display: flex;
    gap: 4px;
    background: #fff;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--grey-500);
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--primary);
}

.view-btn.active {
    background: var(--primary);
    color: #fff;
}

/* ==================== گرید مقالات ==================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    transition: all 0.3s ease;
}

.posts-grid.list-view {
    grid-template-columns: 1fr;
}

.posts-grid.list-view .post-card {
    display: grid;
    grid-template-columns: 280px 1fr;
}

.posts-grid.list-view .post-card-image {
    height: 100%;
    min-height: 200px;
}

/* ==================== کارت مقاله ==================== */
.post-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    transform: translateY(-6px);
}

.post-card-image {
    position: relative;
    height: 210px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.08);
}

.post-card-cat {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    background: var(--lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-400);
}

.post-card-body {
    padding: 24px;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.meta-date,
.meta-reading {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--grey-500);
}

.post-card-title {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
}

.post-card-title a {
    color: var(--grey-900);
}

.post-card:hover .post-card-title a {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--grey-200);
}

.post-card-footer .post-author {
    font-size: 0.82rem;
}

.post-card-footer .post-author img {
    width: 28px;
    height: 28px;
}

.read-more {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lighter);
    border-radius: 50%;
    color: var(--primary);
    transition: all 0.2s;
}

.read-more:hover {
    background: var(--primary);
    color: #fff;
}

/* ==================== صفحه‌بندی ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: var(--font-num);
    transition: all 0.2s ease;
}

.pagination a {
    background: #fff;
    color: var(--grey-700);
    border: 1px solid var(--grey-300);
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary-dark);
    color: #fff;
    border: 1px solid var(--primary-dark);
}

.pagination .dots {
    background: transparent;
    border: none;
    color: var(--grey-500);
}

.pagination .prev,
.pagination .next {
    gap: 6px;
    font-family: var(--font-main);
}

/* ==================== ویجت سایدبار ==================== */
.widget {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--grey-200);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* جستجو */
.widget-search {
    padding: 16px;
}

.widget-search .search-form {
    display: flex;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.widget-search .search-form:focus-within {
    border-color: var(--primary);
}

.widget-search input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-family: var(--font-main);
    font-size: 0.88rem;
    outline: none;
}

.widget-search button {
    padding: 12px 16px;
    background: var(--primary-dark);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.widget-search button:hover {
    background: var(--secondary);
}

/* درباره وبلاگ */
.about-card {
    text-align: center;
}

.about-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    object-fit: contain;
}

.about-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 8px;
}

.about-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--grey-200);
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: var(--font-num);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--grey-500);
}

/* پربازدیدترین‌ها */
.popular-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--grey-100);
    transition: all 0.2s;
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-item:first-child {
    padding-top: 0;
}

.popular-item:hover h4 {
    color: var(--primary);
}

.popular-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lighter);
    color: var(--primary-dark);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-num);
    flex-shrink: 0;
}

.popular-item:first-child .popular-rank {
    background: var(--primary);
    color: #fff;
}

.popular-thumb {
    width: 65px;
    height: 55px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-thumb .no-thumb {
    width: 100%;
    height: 100%;
    background: var(--grey-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.popular-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--grey-900);
    line-height: 1.5;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.popular-meta {
    font-size: 0.75rem;
    color: var(--grey-500);
}

/* دسته‌بندی‌ها */
.categories-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.categories-list li a:hover {
    background: var(--lighter);
    color: var(--primary-dark);
    padding-right: 18px;
}

.cat-count {
    background: var(--grey-100);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-family: var(--font-num);
    color: var(--grey-700);
}

/* برچسب‌ها */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 5px 14px;
    background: var(--grey-100);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tag-item:hover {
    background: var(--primary);
    color: #fff;
}

/* تبلیغاتی */
.widget-promo {
    padding: 0;
    overflow: hidden;
}

.promo-card {
    background: linear-gradient(135deg, var(--primary-dark), #0D1642);
    color: #fff;
    padding: 28px;
    text-align: center;
}

.promo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-bottom: 14px;
}

.promo-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.promo-card p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
}

.promo-features {
    text-align: right;
    margin-bottom: 20px;
}

.promo-features li {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    padding: 4px 0;
}

.btn-block {
    display: block;
    width: 100%;
}

.widget-promo .btn-primary {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
}

.widget-promo .btn-primary:hover {
    background: var(--light);
    border-color: var(--light);
}

/* پشتیبانی */
.support-card {
    text-align: center;
}

.support-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.support-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 8px;
}

.support-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.7;
}

.support-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-telegram {
    background: #0088cc;
    color: #fff;
    border-color: #0088cc;
}

.btn-telegram:hover {
    background: #006da3;
    border-color: #006da3;
    color: #fff;
}

/* ==================== Progress Bar مطالعه ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    width: 0;
    transition: width 0.1s linear;
}

/* ==================== Back to Top ==================== */
.back-to-top {
    position: fixed;
    bottom: 100px;
    left: 28px;
    width: 44px;
    height: 44px;
    background: var(--primary-dark);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--secondary);
    transform: translateY(-4px);
}

/* ==================== صفحه تکی ==================== */
.single-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0D1642 100%);
    padding: 40px 0 50px;
    color: #fff;
}

.single-header .breadcrumb {
    margin-bottom: 24px;
}

.single-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.single-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.8);
}

.single-category {
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
}

.single-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 16px;
    line-height: 1.5;
}

.single-excerpt {
    text-align: center;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    max-width: 680px;
    margin: 0 auto 28px;
    line-height: 1.8;
}

/* نویسنده و اشتراک */
.single-author-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.single-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.single-author img {
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.author-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    display: block;
}

.author-name {
    font-weight: 600;
    color: #fff;
}

.single-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.share-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.share-btn.telegram { background: #0088cc; color: #fff; }
.share-btn.twitter { background: #1DA1F2; color: #fff; }
.share-btn.linkedin { background: #0077B5; color: #fff; }
.share-btn.copy-link { background: rgba(255,255,255,0.15); color: #fff; }

.share-btn:hover {
    transform: scale(1.12);
    opacity: 0.9;
}

/* تصویر شاخص */
.single-thumbnail {
    margin-top: -40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.single-thumbnail img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* لایه‌بندی تکی */
.single-main {
    background: var(--grey-100);
    padding: 0 0 80px;
}

.single-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.single-content {
    order: 2;
}

.single-layout .blog-sidebar {
    order: 1;
}

/* TOC */
.toc-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--grey-200);
    overflow: hidden;
}

.toc-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 18px 24px;
    background: var(--lighter);
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--grey-900);
    transition: background 0.2s;
}

.toc-toggle:hover {
    background: var(--light);
}

.toc-arrow {
    margin-right: auto;
    transition: transform 0.3s;
}

.toc-box.collapsed .toc-arrow {
    transform: rotate(-90deg);
}

.toc-box.collapsed .toc-content {
    display: none;
}

.toc-content {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-content a {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.toc-content a:hover {
    background: var(--lighter);
    color: var(--primary-dark);
    padding-right: 20px;
}

.toc-content a.toc-h3 {
    padding-right: 32px;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

/* محتوای مقاله */
.entry-content {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 50px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

/* دکمه کپی کد */
.code-copy-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* برچسب‌های مقاله */
.single-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 24px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--grey-700);
}

.single-tags .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ادامه برچسب‌ها */
.single-tags .tags-list a {
    padding: 5px 14px;
    background: var(--grey-100);
    border-radius: 50px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.single-tags .tags-list a:hover {
    background: var(--primary);
    color: #fff;
}

/* ==================== باکس نویسنده ==================== */
.author-box {
    display: flex;
    gap: 24px;
    padding: 30px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid var(--grey-200);
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--light);
}

.author-content {
    flex: 1;
}

.author-content .author-label {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.author-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 8px;
    display: block;
}

.author-name a {
    color: var(--grey-900);
}

.author-name a:hover {
    color: var(--primary);
}

.author-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== مقالات مرتبط ==================== */
.related-posts {
    margin-bottom: 30px;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--grey-900);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.related-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.related-thumb {
    height: 160px;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover .related-thumb img {
    transform: scale(1.06);
}

.related-info {
    padding: 16px;
}

.related-info h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--grey-900);
    line-height: 1.5;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.related-card:hover .related-info h4 {
    color: var(--primary);
}

.related-date {
    font-size: 0.78rem;
    color: var(--grey-500);
}

/* ==================== نظرات ==================== */
.comments-section {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.comments-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--grey-900);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--grey-200);
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.82rem;
    font-family: var(--font-num);
}

.comment-list {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 24px;
}

.comment-body {
    display: flex;
    gap: 16px;
}

.comment-body .comment-avatar {
    flex-shrink: 0;
}

.comment-body .comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-content {
    flex: 1;
    background: var(--grey-100);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--grey-900);
}

.comment-date {
    font-size: 0.78rem;
    color: var(--grey-500);
}

.comment-text {
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 10px;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.comment-awaiting {
    font-size: 0.82rem;
    color: var(--warning);
    font-style: italic;
    margin-bottom: 8px;
}

.comment-reply-link {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.comment-reply-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.comment .children {
    margin-top: 24px;
    padding-right: 40px;
    border-right: 2px solid var(--grey-200);
    list-style: none;
}

/* فرم نظرات */
.reply-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 20px;
}

.comment-notes {
    font-size: 0.85rem;
    color: var(--grey-500);
    margin-bottom: 20px;
}

.comment-form .form-group {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--grey-700);
    margin-bottom: 8px;
}

.comment-form .required {
    color: var(--danger);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.92rem;
    color: var(--grey-900);
    transition: all 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-submit-comment {
    padding: 14px 36px;
}

.comments-closed {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--grey-100);
    border-radius: var(--radius-md);
    color: var(--grey-700);
    font-size: 0.9rem;
}

/* ==================== صفحه آرشیو ==================== */
.archive-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0D1642 100%);
    padding: 50px 0 60px;
    color: #fff;
    text-align: center;
}

.archive-header .breadcrumb {
    justify-content: center;
    margin-bottom: 24px;
}

.archive-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.archive-header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
}

.archive-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.7;
}

.archive-author {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    text-align: right;
}

.archive-author img {
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
}

.archive-stats .stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* سورت */
.sort-options select {
    padding: 8px 16px;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.85rem;
    background: #fff;
    cursor: pointer;
    color: var(--grey-700);
}

/* ==================== صفحه جستجو ==================== */
.search-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0D1642 100%);
    padding: 50px 0 60px;
    color: #fff;
    text-align: center;
}

.search-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.search-header h1 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
}

.search-query {
    color: var(--accent);
}

.search-count {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
}

.search-form-large {
    max-width: 580px;
    margin: 0 auto;
}

.search-form-large form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-form-large .search-icon {
    margin: 0 12px;
    color: var(--grey-500);
    flex-shrink: 0;
}

.search-form-large input {
    flex: 1;
    padding: 14px 8px;
    border: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
}

/* بدون نتیجه */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-results h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--grey-900);
    margin-bottom: 12px;
}

.no-results > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.no-results-tips {
    text-align: right;
    max-width: 300px;
    margin: 0 auto 30px;
}

.no-results-tips li {
    padding: 6px 0;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.suggested-categories {
    margin-bottom: 40px;
}

.suggested-categories h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cat-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.suggested-posts {
    border-top: 1px solid var(--grey-200);
    padding-top: 40px;
}

.suggested-posts h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
}

/* ==================== صفحه 404 ==================== */
.error-page {
    background: var(--grey-100);
    padding: 80px 0 100px;
}

.error-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.error-visual {
    margin-bottom: 30px;
}

.error-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.error-code .digit {
    font-size: 7rem;
    font-weight: 900;
    color: var(--primary-dark);
    font-family: var(--font-num);
    line-height: 1;
}

.error-code .zero svg {
    display: block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning-circle {
    animation: spin 8s linear infinite;
    transform-origin: center;
}

.error-content h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--grey-900);
    margin-bottom: 12px;
}

.error-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.error-search {
    max-width: 480px;
    margin: 0 auto 30px;
}

.error-search form {
    display: flex;
    gap: 10px;
}

.error-search input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.error-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.error-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.error-links {
    padding-top: 40px;
    border-top: 1px solid var(--grey-300);
}

.error-links h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.error-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.error-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--grey-900);
}

.error-link-card .icon {
    font-size: 2rem;
}

.error-link-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    color: var(--primary);
}

/* ==================== صفحه ثابت ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0D1642 100%);
    padding: 50px 0;
    color: #fff;
    text-align: center;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
}

.page-main {
    background: var(--grey-100);
    padding: 50px 0 80px;
}

.page-content {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 50px;
    box-shadow: var(--shadow-sm);
}

.page-thumbnail {
    margin: -50px -50px 40px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
}

.page-thumbnail img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

/* ==================== بدون مقاله ==================== */
.content-none {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.none-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.content-none h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--grey-900);
    margin-bottom: 12px;
}

.content-none p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 1024px) {
    .blog-layout,
    .single-layout {
        grid-template-columns: 260px 1fr;
        gap: 30px;
    }
    
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        min-height: 280px;
    }
    
    .featured-content {
        padding: 28px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .error-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    
    .blog-layout,
    .single-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        order: 2;
        position: static;
        max-height: none;
    }
    
    .blog-content,
    .single-content {
        order: 1;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid.list-view .post-card {
        grid-template-columns: 1fr;
    }
    
    .single-title {
        font-size: 1.6rem;
    }
    
    .single-meta {
        gap: 10px;
    }
    
    .single-author-share {
        flex-direction: column;
        gap: 20px;
    }
    
    .entry-content {
        padding: 28px 22px;
    }
    
    .comment-form-row {
        grid-template-columns: 1fr;
    }
    
    .comment .children {
        padding-right: 20px;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .error-code .digit {
        font-size: 4.5rem;
    }
    
    .error-code .zero svg {
        width: 80px;
        height: 80px;
    }
    
    .error-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .page-content {
        padding: 28px 22px;
    }
    
    .page-thumbnail {
        margin: -28px -22px 30px;
    }
    
    .categories-bar {
        position: static;
    }
    
    .search-form-large form {
        flex-direction: column;
        gap: 10px;
        padding: 16px;
    }
    
    .search-form-large .search-icon {
        display: none;
    }
    
    .search-form-large input {
        padding: 12px 16px;
        border: 1px solid var(--grey-300);
        border-radius: var(--radius-md);
    }
    
    .search-form-large .btn {
        width: 100%;
    }
    
    .hero-search-box form {
        flex-direction: column;
        gap: 10px;
        padding: 16px;
    }
    
    .hero-search-box .search-icon {
        display: none;
    }
    
    .hero-search-box input {
        padding: 12px 16px;
        border: 1px solid var(--grey-300);
        border-radius: var(--radius-md);
    }
    
    .hero-search-box .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 35px 0 45px;
    }
    
    .blog-hero h1 {
        font-size: 1.5rem;
    }
    
    .blog-hero p {
        font-size: 0.95rem;
    }
    
    .post-card-body {
        padding: 18px;
    }
    
    .post-card-image {
        height: 180px;
    }
    
    .single-title {
        font-size: 1.35rem;
    }
    
    .comments-section {
        padding: 24px 18px;
    }
    
    .error-code .digit {
        fontmedia print {
    .site-header,
    .site-footer,
    .blog-sidebar,
    .floating-telegram,
    .back-to-top,
    .reading-progress,
    .single-share,
    .related-posts,
    .comments-section,
    .toc-box,
    .categories-bar {
        display: none !important;
    }
    
    .blog-layout,
    .single-layout {
        grid-template-columns: 1fr;
    }
    
    .entry-content {
        padding: 0;
        box-shadow: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
}

/* ==================== انیمیشن‌ها ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp 0.5s ease forwards;
}

.post-card:nth-child(1) { animation-delay: 0s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.2s; }
.post-card:nth-child(4) { animation-delay: 0.3s; }
.post-card:nth-child(5) { animation-delay: 0.4s; }
.post-card:nth-child(6) { animation-delay: 0.5s; }

/* ==================== جستجوی زنده ==================== */
.live-search-results {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--grey-100);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--lighter);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item img {
    width: 50px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.result-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--grey-900);
}

.result-date {
    font-size: 0.78rem;
    color: var(--grey-500);
}

.live-search-results .no-results {
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--grey-500);
}