/*
TAKIN THEME - BASE & DESKTOP CSS
--------------------------------
Color Palette:
- Primary Text/Accent: #0e1330 (Deep Navy)
- Highlight/Hover: #0073f0 (Bright Blue)
- Background Highlight: #01f8f5 (Cyan)
*/

/* --- تعریف متغیرهای CSS برای هدر و رنگ‌ها --- */
:root {
    --header-height: 120px; /* ارتفاع ثابت برای هدر در دسکتاپ */
    --header-padding: 20px; 
    --header-margin-top: 20px; 
    --color-primary: #0e1330; 
    --color-accent: #0073f0; 
    --max-site-width: 1200px; 
}

/* 1. فونت‌ها و تنظیمات کلی */
@font-face {
    font-family: 'IRANYekanX';
    src: url('fonts/IRANYekanX-Light.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANYekanX';
    src: url('fonts/IRANYekanX-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}


/* 2. تنظیمات کلی */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IRANYekanX', sans-serif !important;
    
    /* FIX: گرادینت جذاب و مدرن با استفاده از رنگ‌های پالت شما */
    background: linear-gradient(
        135deg, 
        #F2F4FD 0%,           /* شروع روشن */
        #BFE2FF 50%,          /* انتقال ملایم به آبی روشن */
        rgba(1, 248, 245, 0.4) 100% /* پایان با هینت ملایم Cyan شما */
    ) !important; 
    
    color: var(--color-primary);
    line-height: 1.6;
    direction: rtl; 
    padding: var(--header-padding) !important; 
    min-height: 100vh;
    overflow-x: hidden; 
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

.site-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 130px;
}

.content-sidebar-wrapper {
    display: flex;
    max-width: var(--max-site-width);
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    flex-grow: 1;
}

/* 3. استایل هدر (Header) و ناوبری (Navigation) - Fixed Desktop */
.site-header.minimal-style-header {
    position: fixed;
    top: var(--header-margin-top); 
    right: 50%;
    transform: translateX(50%);
    z-index: 999;
    max-width: var(--max-site-width);
    width: calc(100% - var(--header-padding) * 2); 
    
    padding: 10px 25px; 
    
    /* Glassmorphism Styles */
    background: rgba(255, 255, 255, 0.2); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    
    transition: top 0.3s ease, opacity 0.3s ease; 
    
    /* اعمال ارتفاع ثابت و تنظیم چیدمان داخلی (دسکتاپ) */
    height: var(--header-height); 
    min-height: unset; 
    display: flex;
    flex-direction: column; 
    justify-content: space-around; 
    opacity: 1;
}

/* کوچک‌تر کردن لوگو و عنوان سایت (دسکتاپ) */
.site-branding-container img {
    max-height: 60px; 
    width: auto;
}

.site-branding-container .site-title a {
    font-size: 1.5rem; 
}

.site-branding-container .site-description {
    font-size: 0.8rem; 
}


.mobile-menu-toggle {
    display: none; /* مخفی کردن دکمه منوی موبایل در دسکتاپ */
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-branding-container {
    display: flex;
    align-items: center;
    gap: 10px; 
}

/* تنظیمات منوی ناوبری (دسکتاپ) */
.main-navigation .nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0; 
    justify-content: flex-start; 
    gap: 15px; 
    width: 100%;
    font-weight: bold;
}

.main-navigation .nav-menu li a {
    font-size: 0.9rem; 
    padding: 5px 10px;
    border-radius: 10px;
    transition: background-color 0.3s;
}
.main-navigation .nav-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--color-accent);
}

/* 4. استایل کارت‌ها (Glassmorphism) */
.post-card, .widget, .comments-area, .author-box {
    background: rgba(255, 255, 255, 0.2); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

/* --- استایل کارت‌های صفحه اصلی/آرشیو (RTL-Friendly) - دسکتاپ --- */
.post-card.list-item {
    display: flex;
    flex-direction: row; 
    align-items: stretch;
    gap: 20px;
    padding: 25px;
}


.post-card.list-item .post-thumbnail {
    flex-shrink: 0;
    width: 130px;      /* قبلاً 180 بود */
    min-height: 130px; /* هماهنگ با عرض */
    height: 130px;
    border-radius: 16px;
    overflow: hidden;
}

.post-card.list-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.post-card.list-item .post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-card.list-item .post-content {
    flex-grow: 1;
    padding: 0; 
    min-width: 0; /* FIX: جلوگیری از بیرون زدگی متن در فلکس‌باکس */
}

/* گرد کردن تمام تصاویر داخل کارت‌ها و محتوا */
.post-card img, 
.post-thumbnail img,
.post-content-body img {
    border-radius: 20px;
}

/* استایل متای بالای پست (دسته‌بندی، تاریخ، نظرات) */
.post-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #666;
}

.post-meta-top .post-cat-link {
    background: rgba(0, 115, 240, 0.1);
    color: var(--color-accent);
    padding: 2px 8px;
    border-radius: 5px;
}

/* استایل عنوان پست‌ها - با اولویت بالا */
h1.post-title,
h2.post-title,
h2.post-title a,
.post-title,
.post-title a {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: block !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.4;
    font-size: 1.0rem;
    margin-bottom: 10px;
}

/* 5. استایل محتوای اصلی و سایدبار (دسکتاپ) */
.main-content {
    flex: 3;
    padding-left: 30px;
}

.sidebar {
    flex: 1;
    min-width: 300px;
}

/* --- استایل مطالب مرتبط (Related Posts) --- */
.related-posts-list {
    display: flex;
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    gap: 20px;
    padding: 10px 0;
    list-style: none;
    margin: 0; 
    padding-left: 0;
}

.related-post {
    flex: 0 0 280px; 
    padding: 15px;
    background: rgba(255, 255, 255, 0.3); /* باکس داخلی ملایم برای هر آیتم */
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.5);
}

.related-posts-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-primary);
}

.related-post .post-title a {
    font-size: 0.9rem; 
    line-height: 1.3;
    white-space: normal !important; 
    overflow: visible !important; 
    text-overflow: clip !important;
    height: auto !important;
}
/* ----------------------------------------------------------------------------------- */

/* --- استایل اختصاصی ویجت پربازدیدترین مطالب (حالت باکسی) --- */
.popular-posts-widget .posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* فاصله بین آیتم‌ها برای رفع مشکل نزدیکی */
    padding: 0;
    list-style: none;
}

.popular-posts-widget .post-item {
    background: rgba(255, 255, 255, 0.4); /* پس‌زمینه باکسی و شیشه‌ای */
    border: 1px solid rgba(255, 255, 255, 0.5); /* حاشیه ظریف */
    border-radius: 12px; /* گرد کردن گوشه‌ها */
    padding: 12px 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.popular-posts-widget .post-item:hover {
    background: rgba(255, 255, 255, 0.8); /* روشن‌تر شدن هنگام هاور */
    transform: translateY(-3px); /* حرکت جزئی به بالا */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

/* چسبنده کردن ویجت پربازدیدترین مطالب هنگام اسکرول */
.popular-posts-widget {
    position: -webkit-sticky; /* برای پشتیبانی مرورگرهای قدیمی‌تر */
    position: sticky;
    top: 160px; /* فاصله از بالا (ارتفاع هدر 120 + فاصله اضافه) */
    z-index: 90;
}

/* استایل عنوان ویجت پربازدیدترین مطالب */
.popular-posts-widget .widget-title {
    margin-bottom: 25px; /* فاصله بیشتر عنوان از لیست */
    padding-bottom: 15px; /* فاصله داخلی پایین عنوان */
    border-bottom: 2px solid rgba(0, 115, 240, 0.3); /* خط جداکننده زیر عنوان */
    font-weight: 900; /* ضخیم‌تر کردن فونت */
    color: var(--color-accent); /* رنگ متمایز (آبی) */
}

/* --- استایل باکس "مطلبی یافت نشد" و دکمه‌ها --- */
.no-posts {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.no-posts h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.no-posts p {
    margin-bottom: 30px;
    color: #666;
    font-size: 1rem;
}

.no-posts .search-form-wrapper {
    width: 100%;
    max-width: 450px;
    margin-bottom: 25px;
}

/* استایل دکمه استاندارد */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    font-family: 'IRANYekanX', sans-serif;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 115, 240, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 19, 48, 0.25);
}

/* --- استایل فرم جستجو (search-field و search-submit) --- */
.search-form {
    position: relative; /* برای قرار دادن دکمه جستجو در داخل اینپوت */
    width: 100%;
}

.search-field {
    width: 100%;
    padding: 12px 50px 12px 20px; /* فضای راست برای دکمه، فضای چپ برای متن */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.3);
    font-family: 'IRANYekanX', sans-serif;
    font-size: 0.95rem;
    color: var(--color-primary);
    transition: all 0.3s ease;
    height: 50px; /* ارتفاع ثابت برای هماهنگی با دکمه */
}

.search-field:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 115, 240, 0.2);
}

.search-field::placeholder {
    color: #555;
    opacity: 0.8;
}

.search-submit {
    position: absolute;
    right: 6px; /* در نسخه RTL، راست قرار می‌گیرد */
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-accent);
    border: none;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    font-size: 0; /* مخفی کردن متن دکمه */
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%23ffffff'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.search-submit:hover {
    background-color: var(--color-primary);
    transform: translateY(-50%) scale(1.05);
}

/* --- استایل صفحه نتایج جستجو --- */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.search-title {
    font-size: 1.4rem;
    margin: 0;
    color: var(--color-primary);
}

.search-query {
    color: var(--color-accent);
    font-style: italic;
    padding: 0 5px;
}

.search-count {
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #555;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.search-result .result-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.search-result .result-thumbnail {
    flex-shrink: 0;
    width: 180px;
    height: 130px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.search-result .result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-result:hover .result-thumbnail img {
    transform: scale(1.1);
}

.search-result .result-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.search-result .result-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-top: 10px;
}

.search-result .read-more-link {
    color: var(--color-accent);
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 5px;
}

/* --- استایل اختصاصی صفحه نوشته (Single Post) --- */

/* هدر نوشته */
.single-post .post-header {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 20px;
}

.single-post .post-title {
    font-size: 1.5rem; /* بزرگتر کردن عنوان */
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--color-primary);
    line-height: 1.4;
    text-align: center; /* وسط چین کردن عنوان برای زیبایی بیشتر */
}

/* تصویر شاخص */
.single-post .post-thumbnail {
    margin-bottom: 25px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* سایه جذاب */
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* اطلاعات متا (نویسنده، تاریخ و...) */
.single-post .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
    margin-top: 15px;
    justify-content: center; /* وسط چین کردن متا */
    align-items: center;
}

.single-post .post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-post .post-meta i {
    color: var(--color-accent);
    font-size: 1.1rem;
}

/* بدنه محتوا */
.post-content-body {
    font-size: 1.1rem; /* افزایش خوانایی */
    line-height: 2;
    color: #333;
}

.post-content-body p {
    margin-bottom: 25px;
    text-align: justify;
}

.post-content-body h2, 
.post-content-body h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--color-primary);
    font-weight: bold;
}

.post-content-body h2 { font-size: 1.6rem; }
.post-content-body h3 { font-size: 1.4rem; }

/* برچسب‌ها */
.post-tags {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags a {
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #555;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-tags a:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* --- استایل بخش نظرات (هماهنگ با مطالب مرتبط) --- */
.comments-area {
    margin-top: 30px;
    /* استایل کلی باکس (شیشه‌ای) قبلاً در .post-card تعریف شده است */
}

.comments-area .comments-title,
.comments-area .comment-reply-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-primary);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .comment {
    margin-bottom: 20px;
}

.comment-body {
    background: rgba(255, 255, 255, 0.3); /* باکس داخلی ملایم */
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.comment-body:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-author img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.comment-author .fn {
    font-weight: bold;
    font-style: normal;
    font-size: 1rem;
    color: var(--color-primary);
}

.comment-metadata {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.comment-metadata a {
    color: #666;
    text-decoration: none;
}

.comment-content {
    line-height: 1.8;
    font-size: 0.95rem;
    color: #333;
}

.reply {
    text-align: left;
    margin-top: 10px;
}

.comment-reply-link {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 115, 240, 0.1);
    color: var(--color-accent);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    text-decoration: none;
}

.comment-reply-link:hover {
    background: var(--color-accent);
    color: #fff;
}

/* استایل فرم ارسال نظر */
.comment-respond {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.3);
    font-family: 'IRANYekanX', sans-serif;
    transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--color-accent);
}

.form-submit .submit {
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'IRANYekanX', sans-serif;
}

.form-submit .submit:hover {
    background-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 115, 240, 0.3);
}

/* --- استایل متمایز برای نظرات نویسنده (ادمین) --- */
.comment-list .bypostauthor > .comment-body {
    background: rgba(0, 115, 240, 0.1); /* پس‌زمینه آبی ملایم */
    border: 1px solid rgba(0, 115, 240, 0.3); /* حاشیه آبی */
    box-shadow: 0 5px 15px rgba(0, 115, 240, 0.1);
}

.comment-list .bypostauthor > .comment-body::after {
    content: 'نویسنده مطلب'; /* متن برچسب */
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
}

/* --- استایل نظرات تو در تو (Nested Comments) --- */
.comment-list .children {
    list-style: none;
    padding-right: 40px; /* فاصله از راست برای پاسخ‌ها */
    margin: 0;
    border-right: 2px solid rgba(0, 115, 240, 0.2); /* خط راهنما */
}

@media (max-width: 768px) {
    .comment-list .children {
        padding-right: 15px; /* فاصله کمتر در موبایل */
    }
}

/* --- استایل مسیر راهنما (Breadcrumbs) --- */
.rank-math-breadcrumb {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.rank-math-breadcrumb a {
    color: var(--color-primary);
}

.rank-math-breadcrumb a:hover {
    color: var(--color-accent);
}

/* تنظیم سایز و تراز آیکون خانه در مسیر راهنما */
.rank-math-breadcrumb .fa-home {
    font-size: 1.1em;
    vertical-align: -1px; /* تراز عمودی با متن */
}

/* --- استایل فوتر (Footer) --- */
.site-footer {
    margin: 60px auto 30px; /* فاصله از بالا و پایین و وسط‌چین */
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.2); /* هماهنگ با هدر */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* حاشیه کامل دور باکس */
    border-radius: 20px; /* گوشه‌های گرد مثل هدر */
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    max-width: var(--max-site-width);
    width: calc(100% - 40px); /* عرض محدود شده با فاصله از کناره‌ها */
}

.footer-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* بخش ویجت‌ها */
.footer-widgets-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.footer-widget-title {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
    padding-bottom: 5px;
}

/* بخش دسته‌بندی‌ها */
.footer-categories-section {
    margin-bottom: 50px;
    text-align: center;
}

.footer-section-title {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--color-primary);
}

.footer-categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.4);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    color: var(--color-primary);
    font-weight: bold;
    text-decoration: none;
}

.footer-cat-item:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 115, 240, 0.3);
    border-color: var(--color-accent);
}

.footer-cat-item .cat-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.footer-cat-item:hover .cat-count {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* کپی‌رایت */
.site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
    flex-wrap: wrap;
    gap: 15px;
}


/* ===== Pagination Modern Glass Style ===== */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
}

.pagination {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* لینک‌ها */
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--color-primary);
    background: rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}

/* هاور */
.pagination .page-numbers:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,115,240,0.25);
}

/* صفحه فعال */
.pagination .page-numbers.current {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,115,240,0.3);
}

/* قبلی و بعدی */
.pagination .prev,
.pagination .next {
    padding: 0 16px;
    font-size: 0.85rem;
}

/* سه‌نقطه ... */
.pagination .dots {
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}





/*////////////////////////////////////////*/
.related-posts-wrapper {
    position: relative;
    margin-top: 40px;
}

.related-posts-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 20px;
    scroll-snap-type: x mandatory;
}

.related-posts-list::-webkit-scrollbar {
    display: none;
}

.related-post {
    flex: 0 0 260px;
    background: rgba(255, 255, 255, 0.22); /* شیشه‌ای سبک */
    backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 22px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.related-post img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.related-post .post-title a {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 12px 0 8px 0;
    display: block;
    text-decoration: none;
    padding: 0 10px;
}

.related-post .post-title a:hover {
    color: var(--color-accent);
}

.related-post .post-date {
    font-size: 0.8rem;
    color: #555;
    padding: 0 10px 10px 10px;
}

.related-post:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 35px rgba(0,115,240,0.15);
    border-color: rgba(0,115,240,0.35);
}

/* عنوان مطالب مرتبط */
.related-posts-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--color-primary);
    padding-right: 10px;
    border-right: 4px solid var(--color-accent);
}

/* دکمه‌های عقب و جلو */
.rel-nav {
    position: absolute;
    top: 45%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.3);
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.3s ease;
}

.rel-nav:hover {
    background: rgba(255,255,255,0.45);
    transform: scale(1.1);
}

.rel-prev { left: 0; }
.rel-next { right: 0; }

.rel-nav i {
    font-size: 1.2rem;
    color: var(--color-primary);
}

/* موبایل */
@media (max-width: 768px) {
    .related-post {
        flex: 0 0 75%;
    }

    .rel-nav {
        width: 40px;
        height: 40px;
    }

    .rel-nav i {
        font-size: 1rem;
    }
}

