/*
Theme Name: HamyarPlus
Author: Gemini AI
Version: 1.1
*/

body {
    
    background: linear-gradient(175deg, #00376a, #ffb347);
    font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: #333;
    margin: 0;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 1320px; /* عرض بیشتر برای ظاهر مدرن */
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

/* --- استایل‌های جدید هدر --- */
.site-header {
    padding-top: 20px; /* اصلاح شده: فقط پدینگ بالا */
    background-color: transparent;
    border-bottom: none;
    position: relative;
    z-index: 100;
}

/* نوار سفید شناور */
.site-header > .container {
    background: rgba(255, 255, 255, 0.15); /* نیمه شفاف */
    background-image: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0.5),
        rgba(255, 255, 255, 0.05)
    );
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.1),
        inset 0 0 15px rgba(255, 255, 255, 0.25);
    padding: 10px 25px;
}



.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* بخش راست: لوگو */
.site-branding {
    flex-shrink: 0;
}
.site-branding .site-title { margin: 0; }
.site-branding .site-description { display: none; }

/* بخش وسط: منو */
.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

/* بخش چپ: آیکون‌ها و دکمه ورود */
.header-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-icons {
    display: flex;
    align-items: center;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid #eee;
}

.header-icons a {
    color: #555;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}
.header-icons a:hover {
    color: #0073aa;
}
.header-icons svg {
    display: block;
}

.login-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #00A9FF;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 169, 255, 0.4);
}

/* --- استایل منوی افقی --- */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
}

.main-navigation li {
    margin: 0 5px;
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: #000;
    background-color: #f5f5f5;
}

/* کانتینر محتوای اصلی - اصلاح شده: فقط برای چیدمان */
.content-container {
    margin-top: 20px;
}

/* --- استایل‌های فوتر و ابزارک‌ها --- */
.site-footer {
    padding: 20px 0;
    background-color: transparent;
    margin-top: 20px;
}

.site-footer > .container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 20px 40px;
}

.footer-widgets-area {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
.footer-widgets-area .widget {
    flex: 1;
    padding: 0 20px;
}
.site-info {
    text-align: center;
    font-size: 14px;
    color: #888;
}

/* --- استایل‌های باکس اطلاعات محصول --- */
.product-details-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    margin-top: 40px;
    overflow: hidden;
}

.details-tabs {
    display: flex;
    background-color: #f0f2f5;
    padding: 10px;
}

.tab-link {
    padding: 10px 25px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border-radius: 8px;
    margin-left: 10px;
    transition: all 0.3s ease;
    background-color: transparent;
    border: none;
}

.tab-link.active {
    background-color: #6c7dff;
    color: #fff;
    box-shadow: 0 2px 10px rgba(108, 125, 255, 0.4);
}

.details-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.product-info-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.info-item {
    background-color: #eef0ff;
    color: #5a68d1;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 15px;
    flex-grow: 1;
    text-align: center;
}

.info-item strong {
    font-weight: 700;
    margin-right: 5px;
}

.download-box-wrapper {
    text-align: center;
}

.download-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #e04040;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.download-button:hover {
    background-color: #c03030;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(224, 64, 64, 0.4);
}

/* --- استایل‌های صفحه نوشته تکی --- */
.single-post-container {
    display: flex;
    flex-direction: row-reverse; /* سایدبار را به سمت چپ می‌برد */
    gap: 30px;
    margin-top: 20px;
}

/* اصلاح شده: فریم جدید برای محتوای اصلی */
.main-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.widget-area {
    flex-basis: 300px;
    flex-shrink: 0;
}

.post-thumbnail-container {
    margin-bottom: 25px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.post-thumbnail-container img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.post-date, .post-categories {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
}

.post-date {
    background-color: #e3f2fd;
    color: #1e88e5;
}

.post-categories {
    background-color: #e8f5e9;
    color: #43a047;
}
.post-categories a {
    color: inherit;
    text-decoration: none;
}
.post-categories a:hover {
    text-decoration: underline;
}

.entry-header {
    margin-bottom: 20px;
    text-align: right;
}

.entry-title {
    font-size: 32px;
    font-weight: 700;
}

.widget-area .widget {
    background-color: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    margin-bottom: 25px;
}

.widget-area .widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* استایل محتوای راهنمای نصب */
.install-guide-content {
    line-height: 1.8;
}
.install-guide-content h1,
.install-guide-content h2,
.install-guide-content h3 {
    font-size: 1.2em;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
}
.install-guide-content p {
    margin-bottom: 15px;
}
.install-guide-content ul,
.install-guide-content ol {
    margin-right: 20px;
    margin-bottom: 15px;
}
.install-guide-content li {
    margin-bottom: 8px;
}

/* --- جدید: استایل‌های بخش نظرات --- */
#comments {
    margin-top: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}
.comments-title, .comment-reply-title {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-list .comment {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.comment-list .children {
    list-style: none;
    padding-right: 30px;
    margin-right: 20px;
    border-right: 2px solid #f0f2f5;
}
.comment-author {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}
.comment-author .avatar {
    border-radius: 50%;
    margin-left: 10px;
}
.comment-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}
.comment-meta a {
    color: #888;
    text-decoration: none;
}
.comment-content p {
    margin: 0;
    line-height: 1.8;
}
.reply {
    margin-top: 10px;
}
.reply a {
    font-size: 13px;
    font-weight: bold;
    color: #0073aa;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.reply a:hover {
    background-color: #f0f2f5;
}
.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    background-color: #fff;
}
.form-submit .submit {
    display: inline-block;
    padding: 10px 25px;
    background-color: #6c7dff; /* رنگ دکمه "اطلاعات" */
    color: #fff;
    text-decoration: none;
    border-radius: 8px; /* مقدار radius دکمه‌های بالا */
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit; /* استفاده از فونت اصلی سایت */
}
.form-submit .submit:hover {
 background-color: #5a68d1; /* رنگ کمی تیره‌تر برای حالت hover */
    transform: none;
    box-shadow: 0 2px 10px rgba(108, 125, 255, 0.4);
}
/* --- استایل‌های مدال جستجو --- */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(240, 242, 245, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 700px;
}

/* --- استایل نهایی و صحیح برای فرم جستجو --- */
.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 15px;
}

.search-field {
    border: none;
    background: none;
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    direction: rtl;
    text-align: right;
    width: 100%;
}

.search-submit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    color: #888;
    margin-right: 8px; /* فاصله آیکون از متن */
}

/* این کد برای اصلاح جایگاه آیکون و متن است */
.search-form label {
    order: 1; /* فیلد متن دومین عنصر باشد */
    flex-grow: 1;
}

.search-submit {
    order: 2; /* آیکون اولین عنصر باشد */
}

.close-search-modal {
    position: absolute;
    top: 30px;
    right: 30px;
    cursor: pointer;
    color: #555;
}

.search-results-container {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.ajax-search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ajax-search-results li a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f5f5f5;
}

.ajax-search-results li a:hover {
    background-color: #f9f9f9;
}

.loading-message, .no-results {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}
/* --- استایل‌های صفحه نتایج جستجو --- */

/* چیدمان اصلی دو ستونه (محتوا و سایدبار) */
.search-page-container {
    display: flex;
    flex-direction: row-reverse; /* سایدبار را به سمت چپ می‌برد */
    gap: 30px;
    margin-top: 20px;
}

.search-page-container .main-content {
    flex: 1;
    min-width: 0;
}

.search-page-container .widget-area {
    flex-basis: 300px;
    flex-shrink: 0;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 24px;
}

/* گرید سه‌ستونه برای نمایش نتایج */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* استایل هر کارت در نتایج جستجو */
.search-result-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
}

.card-title a {
    text-decoration: none;
    color: #333;
}

.card-excerpt {
    font-size: 14px;
    color: #555;
    flex-grow: 1;
    margin-bottom: 20px;
    line-height: 1.7;
}

.card-read-more {
    display: block;
    text-align: center;
    padding: 12px;
    background-color: #f0f2f5;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-read-more:hover {
    background-color: #00A9FF;
    color: #fff;
}

/* واکنش‌گرایی برای تبلت و موبایل */
@media (max-width: 992px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-page-container {
        flex-direction: column;
    }
    .search-results-grid {
        grid-template-columns: 1fr;
    }
}
/* --- بهبود کارت‌های نتایج جستجو --- */

/* محدود کردن خلاصه مطلب به 3 خط */
.card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* تغییر رنگ هاور دکمه "بیشتر بخوانید" */
.card-read-more:hover {
    background-color: #5a68d1;
    color: #fff;
}

/* استایل نگهدارنده اطلاعات متا (نسخه و تاریخ) */
.card-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px; /* فاصله از دکمه بیشتر بخوانید */
}

/* استایل هر کدام از اطلاعات متا */
.meta-item {
    background-color: #eef0ff;
    color: #5a68d1;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.card-meta-info i {
    margin-left: 5px; /* فاصله آیکون از متن */
    font-size: 14px; /* تغییر اندازه آیکون */
}
/* استایل جداکننده برای آیکون‌های متا */
.card-meta-info i::after {
    content: "|";
    margin-right: 8px; /* فاصله جداکننده از متن */
    margin-left: 8px;  /* فاصله جداکننده از آیکون */
    color: #5a68d1;      /* رنگ خاکستری ملایم برای جداکننده */
    font-weight: 300;
}
.footer-widgets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-column {
    flex: 1 1 33%;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .footer-column {
        flex: 1 1 100%;
    }
}
.footer-widgets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px; /* فاصله ستون‌ها از کپی‌رایت */
}

.site-info {
    text-align: center;
    font-size: 14px;
    color: #888;
    padding-top: 10px;
    border-top: 1px solid #eee; /* خط جداکننده ظریف بالای کپی‌رایت */
}
.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* سه ستون مساوی */
    gap: 20px; /* فاصله بین ستون‌ها */
    margin-bottom: 20px; /* فاصله از کپی‌رایت */
}

.footer-column {
    min-width: 0; /* جلوگیری از کشیده شدن محتوا */
}

.footer-column .widget {
    margin-bottom: 15px;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* تبلت (زیر 992px) → دو ستون */
@media (max-width: 992px) {
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* موبایل (زیر 600px) → یک ستون */
@media (max-width: 600px) {
    .footer-widgets-grid {
        grid-template-columns: 1fr;
    }
}
/* Styles for Product Details - Version History */
.product-details-container .version-history-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border: none; /* حذف خطوط جداکننده از کانتینر اصلی */
}

.product-details-container .version-history-list li {
    display: flex;
    align-items: center;
    justify-content: space-between; /* آیتم‌ها را در عرض پخش می‌کند */
    padding: 12px 15px;
    background-color: #f7f8fc; /* پس‌زمینه روشن مطابق با عکس */
    border-radius: 8px; /* گوشه‌های گرد برای هر ردیف */
    margin-bottom: 8px; /* فاصله بین ردیف‌ها */
    border: 1px solid #eef0f4;
    transition: box-shadow 0.2s ease;
}

.product-details-container .version-history-list li:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
}

/* استایل متن نسخه محصول (سمت راست) */
.product-details-container .version-history-list .version-name {
    color: #4a69bb; /* رنگ آبی مطابق با عکس */
    font-size: 1em;
    font-weight: 600;
}

/* استایل متن حجم فایل (وسط) */
.product-details-container .version-history-list .version-size {
    color: #4a69bb; /* رنگ آبی مطابق با عکس */
    font-size: 1em;
    font-weight: 600;
}

/* استایل دکمه دانلود (سمت چپ) */
.product-details-container .version-history-list .version-download-link {
    /* نیازی به order نیست چون چیدمان با space-between انجام می‌شود */
    background-color: #d9534f; /* رنگ قرمز */
    color: #fff;
    padding: 8px 22px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    border: none;
    transition: all 0.2s ease-in-out;
}

.product-details-container .version-history-list .version-download-link:hover {
    background-color: #c9302c; /* قرمز تیره‌تر در زمان هاور */
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
