
/* -------------------- وبلاگ -------------------- */



/* استایل برای هر بلوک پست */
.blog-posts {
    display: grid; /* برای چینش گرید یا فلکس */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 2 یا 3 ستونه کردن پست ها */
    gap: 30px; /* فاصله بین پست ها */
    padding: 0 20px;
}

.post-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* استایل برای تصویر شاخص */
.post-item img.wp-post-image {
    max-width: 100%; /* تصویر از کادر خارج نشود */
    height: auto; /* حفظ نسبت ابعاد */
    border-radius: 5px;
    margin-bottom: 15px; /* فاصله از عنوان */
    display: block; /* برای حذف فضای خالی زیر تصویر */
    margin: 0px auto;
}

/* استایل برای عنوان پست */
.post-item h2 {
    font-size: 24px;
    margin-top: 0;
    text-align: center;
    margin: 15px auto;
}

.post-item h2 a {
    color: #34495e;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
}

.post-item h2 a:hover {
    color: #059FB7;
}

/* استایل برای خلاصه پست */
.post-item p {
    padding: 0 25px;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
}


/* -----   Post   ----- */

/* ---  فونت های فارسی (در صورت نیاز - حتما اطمینان حاصل کنید که این فونت ها در پروژه شما فراخوانی شده اند) --- */
body,
h1, h2, h3, h4, h5, h6,
p, a, li, input, textarea, button {
    font-family: 'Vazirmatn', sans-serif; /* مثال: فونت وزیرمتن */
    /* اگر فونت دیگری دارید، نام آن را اینجا جایگزین کنید. */
    /* اطمینان حاصل کنید که فونت از طریق @font-face یا لینک CDN در فایل header.php فراخوانی شده است. */
}

/* ---  کانتینر اصلی سایت و چیدمان دو ستونه (برای محتوا و سایدبار) --- */
.site-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    flex-direction: row-reverse; /* کلید اصلی! */
}

.content-area
{
    margin-left: 30px;
}

#secondary, #sidebar, .widget-area, .main-sidebar {
    flex-basis: 280px;
    flex-shrink: 0;
    /* سایر استایل‌ها مثل قبل */
}

/* ---  استایل دهی به محتوای اصلی پست (بخشی که #primary و #main را شامل می‌شود) --- */

.content-area {
    flex: 1; /* این عنصر فضای موجود رو پر می‌کنه */
    /* اینجا margin-right به جای margin-left میزاریم تا از سایدبار در سمت چپ فاصله بگیره */
    margin-right: 30px; /* فاصله از سمت راست سایدبار (اگر سایدبار چپ باشد) */
    background-color: #fff; /* پس‌زمینه بلوک محتوا */
    padding: 30px; /* فضای داخلی بلوک محتوا */
    border-radius: 8px; /* گوشه‌های گرد */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* سایه ملایم */
    direction: rtl; /* برای محتوای فارسی */
    text-align: right; /* تراز متن به راست */
}

/* ---  استایل دهی به عناصر داخلی پست (عناوین، پاراگراف‌ها، تصاویر شاخص و ...) --- */
/* عنوان پست */
.entry-title-single, .post-title, #main h1, #main h2 {
    font-size: 38px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
    text-align: center;
}

/* متادیتا پست */
.entry-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    text-align: right;
}

/* استایل پیش‌فرض برای تمام اندازه‌ها */
.post-thumbnail img {
    max-width: 100%; /* تصویر در موبایل از عرض صفحه بزرگتر نمی‌شود */
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 8px;
}

/* استایل اضافی برای دسکتاپ (عرض‌های بیشتر از ۳۰۰ پیکسل) */
@media (min-width: 450px) {
    .post-thumbnail img {
        max-width: 300px; /* تصویر در دسکتاپ از 300 پیکسل بزرگتر نمی‌شود */
    }
}


/* محتوای اصلی پست (پاراگراف ها، لینک ها، لیست ها و...) */
.entry-content {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.entry-content p {
    margin-bottom: 1em;
}

.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
    color: #333;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.4;
    text-align: right;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1em;
    padding-right: 25px;
}

.entry-content li {
    margin-bottom: 0.5em;
}

/* ---  استایل دهی به ناوبری پست (قبلی/بعدی) --- */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    margin-bottom: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-navigation .nav-previous, .post-navigation .nav-next {
    flex: 1;
    text-align: right; /* قبلی سمت راست */
}

.post-navigation .nav-next {
    text-align: left; /* بعدی سمت چپ */
}

.post-navigation a {
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.post-navigation a:hover {
    background-color: #0056b3;
}

/* ---  استایل دهی به بخش نظرات (Comments) --- */
#comments {
    margin-top: 50px;
    background-color: #f2f2f2;
    padding: 30px;
    border-radius: 8px;
    direction: rtl;
    text-align: right;
}

#comments h2.comments-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 25px;
    text-align: right;
}

/* فرم ارسال نظر */
#commentform {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
}

#commentform label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    text-align: right;
}

#commentform textarea {
    min-height: 120px;
    resize: vertical;
}

#commentform input[type="submit"] {
    background-color: #28a745;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

#commentform input[type="submit"]:hover {
    background-color: #218838;
}

/* لیست نظرات */
.commentlist {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.comment {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.comment-author {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.comment-metadata {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.comment-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

@media (max-width: 992px) {
    .site-content-wrapper {
        flex-direction: column-reverse;
        padding: 20px 15px;
    }

    #primary,
    .content-area,
    #secondary,
    #sidebar,
    .widget-area,
    .main-sidebar {
        width: 100%;
        margin: 0;
    }

    #secondary,
    #sidebar,
    .widget-area,
    .main-sidebar {
        margin-top: 30px;
    }
}
