/*
Theme Name: دوست من 
Theme URI: https://artdes.ir
Author: danial javareshkian
Description: قالب مینیمال و حرفه‌ای
Version: 3.0
Text Domain:doostman
*/

/* ===== فونت و ریست ===== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.8;
    color: #2d2d2d;
    background: #f5f6fa;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    transition: all 0.25s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== هدر روشن ===== */
.site-header {
    background: #ffffff;
    padding: 18px 0 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid #c9a84c;
    margin-bottom: 30px;
}

.header-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.site-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: #1a2634;
}

.site-title a:hover {
    color: #c9a84c;
}

.site-description {
    font-size: 13px;
    color: #aaa;
    font-weight: 300;
    margin: 0;
}

/* ===== جست‌وجوی هدر ===== */
.header-search-wrapper {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f5f6f8;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8eaed;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: #c9a84c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

.search-input {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 13px;
    width: 180px;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: #aaa;
    font-size: 12px;
}

.search-submit {
    padding: 8px 18px;
    border: none;
    background: #c9a84c;
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-submit:hover {
    background: #b8973a;
}

/* ===== منو ===== */
.main-navigation {
    margin-top: 3px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #555;
    padding: 5px 16px;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: block;
}

.nav-menu li a:hover {
    color: #c9a84c;
    background: #f5f6f8;
}

.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
    color: #c9a84c;
    background: #f5f6f8;
}

/* ===== محتوای اصلی - سایدبار کنار محتوا ===== */
.site-main {
    padding: 0 0 40px;
}

/* ✅ این مهمه: گرید ۲ ستونه با سایدبار در کنار محتوا */
.main-layout {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 30px;
    align-items: start;
}

/* ===== محتوای اصلی ===== */
.content-area {
    min-width: 0;
}

/* ===== کارت‌های مقاله ===== */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: #ffffff;
    padding: 24px 28px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-right: 3px solid #c9a84c;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.post-card-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
}

.post-card-title a {
    color: #1a2634;
}

.post-card-title a:hover {
    color: #c9a84c;
}

.post-card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.post-meta-date {
    display: inline-block;
}

.post-meta-separator {
    margin: 0 4px;
    color: #ddd;
}

.post-meta-categories {
    display: inline-block;
}

.post-meta-categories a {
    color: #c9a84c;
    font-weight: 500;
}

.post-meta-categories a:hover {
    color: #b8973a;
}

.post-card-excerpt {
    color: #555;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 10px;
}

.post-card-excerpt p {
    margin: 0;
}

.read-more-btn {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #c9a84c;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    border-bottom-color: #c9a84c;
    padding-right: 5px;
}

/* ===== صفحه داخلی (تک مقاله) ===== */
.single-post {
    background: #ffffff;
    padding: 38px 42px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.single-post .post-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a2634;
    margin: 0 0 12px;
    line-height: 1.4;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.single-post .post-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.single-post .post-meta .category a {
    color: #c9a84c;
    font-weight: 500;
}

.single-post .post-meta .category a:hover {
    color: #b8973a;
}

.single-post .post-content {
    font-size: 15px;
    line-height: 2.1;
    color: #3d3d3d;
}

.single-post .post-content p {
    margin-bottom: 18px;
}

.single-post .post-content a {
    color: #c9a84c;
    font-weight: 500;
}

.single-post .post-content a:hover {
    color: #b8973a;
    text-decoration: underline;
}

.single-post .post-content ul,
.single-post .post-content ol {
    padding-right: 28px;
    margin: 10px 0 18px;
}

.single-post .post-content ul li,
.single-post .post-content ol li {
    margin-bottom: 6px;
}

.single-post .post-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1a2634;
    margin: 30px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f2f5;
}

.single-post .post-content h3 {
    font-size: 19px;
    font-weight: 600;
    color: #1a2634;
    margin: 25px 0 10px;
}

.single-post .post-content blockquote {
    margin: 20px 0;
    padding: 16px 24px;
    border-right: 4px solid #c9a84c;
    background: #f8f9fa;
    border-radius: 6px;
    color: #555;
}

.single-post .post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.single-post .post-content table th,
.single-post .post-content table td {
    padding: 10px 14px;
    border: 1px solid #e8eaed;
    text-align: right;
}

.single-post .post-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
}

/* ===== سایدبار ===== */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.widget {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.widget-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a2634;
    margin: 0 0 12px;
    padding-right: 12px;
    border-right: 3px solid #c9a84c;
}

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

.widget ul li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #555;
    display: block;
}

.widget ul li a:hover {
    color: #c9a84c;
    padding-right: 5px;
}

/* ===== ویجت جست‌وجو ===== */
.widget-search-box .search-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-input-sidebar {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafbfc;
}

.search-input-sidebar:focus {
    border-color: #c9a84c;
    background: #ffffff;
}

.search-submit-sidebar {
    width: 100%;
    padding: 10px;
    border: none;
    background: #c9a84c;
    color: #ffffff;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 13px;
}

.search-submit-sidebar:hover {
    background: #b8973a;
}

/* ===== ویجت برچسب‌ها ===== */
.widget-tags-box .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.widget-tags-box .tagcloud a {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f2f5;
    border-radius: 4px;
    font-size: 12px !important;
    color: #555;
    transition: all 0.3s ease;
}

.widget-tags-box .tagcloud a:hover {
    background: #c9a84c;
    color: #ffffff;
}

/* ===== صفحه‌بندی ===== */
.pagination-wrapper {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f2f5;
}

.pagination-wrapper .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 3px;
    background: #ffffff;
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.pagination-wrapper .current {
    background: #c9a84c;
    color: #ffffff;
}

.pagination-wrapper a:hover {
    background: #c9a84c;
    color: #ffffff;
}

/* ===== صفحه آرشیو ===== */
.archive-header {
    background: #ffffff;
    padding: 20px 28px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-right: 3px solid #c9a84c;
}

.archive-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a2634;
    margin: 0;
}

.archive-title span {
    color: #c9a84c;
}

.archive-description {
    font-size: 14px;
    color: #777;
    margin-top: 6px;
}

/* ===== صفحه جست‌وجو ===== */
.search-header {
    background: #ffffff;
    padding: 20px 28px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-right: 3px solid #c9a84c;
}

.search-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a2634;
    margin: 0;
}

.search-title span {
    color: #c9a84c;
}

/* ===== صفحه ۴۰۴ ===== */
.error-404-page {
    background: #ffffff;
    padding: 50px 35px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-right: 3px solid #c9a84c;
}

.error-icon {
    font-size: 70px;
    font-weight: 700;
    color: #c9a84c;
    line-height: 1;
    margin-bottom: 8px;
}

.error-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a2634;
    margin: 0 0 10px;
}

.error-text {
    font-size: 15px;
    color: #777;
    margin: 0 0 20px;
}

.error-home-link {
    display: inline-block;
    padding: 10px 28px;
    background: #c9a84c;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.error-home-link:hover {
    background: #b8973a;
    color: #ffffff;
}

/* ===== صفحه نویسنده ===== */
.author-box {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.author-avatar img {
    border-radius: 50%;
    border: 3px solid #c9a84c;
    padding: 2px;
}

.author-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a2634;
    margin: 0 0 4px;
}

.author-info .author-bio {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* ===== فوتر ===== */
.site-footer {
    background: #1a2634;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0 20px;
    margin-top: 30px;
    border-top: 3px solid #c9a84c;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* سرچ فوتر */
.footer-search-wrapper {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-search-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 10px;
}

.footer-search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.footer-search-form .search-input-footer {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 13px;
    width: 100%;
    outline: none;
    border-radius: 6px 0 0 6px;
    font-family: inherit;
}

.footer-search-form .search-input-footer::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.footer-search-form .search-input-footer:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #c9a84c;
}

.footer-search-form .search-submit-footer {
    padding: 8px 18px;
    border: 1px solid #c9a84c;
    background: #c9a84c;
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
    font-family: inherit;
}

.footer-search-form .search-submit-footer:hover {
    background: #b8973a;
    border-color: #b8973a;
}

/* برچسب‌های فوتر */
.footer-tags-section {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-tags-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 12px;
    letter-spacing: 0.5px;
}

.footer-tags-wrapper .tagcloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.footer-tags-wrapper .tagcloud a {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 12px !important;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-tags-wrapper .tagcloud a:hover {
    background: #c9a84c;
    color: #ffffff;
    border-color: #c9a84c;
}

.footer-bottom {
    text-align: center;
}

.copyright-text {
    font-size: 12px;
    opacity: 0.4;
    margin: 0;
}

.copyright-site {
    color: #ffffff;
}

/* ========================================
   ریسپانسیو
   ======================================== */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1.8fr 1fr;
        gap: 25px;
    }
    
    .single-post {
        padding: 30px 28px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }
    
    .header-logo {
        align-items: center;
    }
    
    .header-search-wrapper {
        width: 100%;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-input {
        flex: 1;
        width: auto;
    }
    
    /* ✅ مهم: در موبایل سایدبار زیر محتوا میاد */
    .main-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .single-post {
        padding: 22px 18px;
    }
    
    .single-post .post-title {
        font-size: 22px;
    }
    
    .single-post .post-content {
        font-size: 14px;
    }
    
    .post-card {
        padding: 18px 20px;
    }
    
    .post-card-title {
        font-size: 17px;
    }
    
    .nav-menu {
        justify-content: center;
    }
    
    .widget {
        padding: 16px 18px;
    }
    
    .footer-search-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .single-post {
        padding: 16px 12px;
    }
    
    .single-post .post-title {
        font-size: 17px;
        padding-bottom: 8px;
    }
    
    .single-post .post-content {
        font-size: 13.5px;
        line-height: 1.9;
    }
    
    .single-post .post-content h2 {
        font-size: 17px;
    }
    
    .single-post .post-content h3 {
        font-size: 15px;
    }
    
    .single-post .post-content ul,
    .single-post .post-content ol {
        padding-right: 18px;
    }
    
    .single-post .post-content blockquote {
        padding: 12px 16px;
    }
    
    .single-post .post-meta {
        font-size: 11px;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .post-card {
        padding: 14px 14px;
        border-right-width: 3px;
    }
    
    .post-card-title {
        font-size: 15px;
    }
    
    .post-card-excerpt {
        font-size: 13px;
    }
    
    .widget {
        padding: 14px 14px;
    }
    
    .widget-title {
        font-size: 13px;
        padding-right: 8px;
    }
    
    .search-input {
        font-size: 12px;
        padding: 6px 10px;
        width: 100px;
    }
    
    .search-submit {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .search-input-sidebar {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .search-submit-sidebar {
        padding: 8px;
        font-size: 12px;
    }
    
    .pagination-wrapper .page-numbers {
        padding: 5px 10px;
        font-size: 12px;
        margin: 0 2px;
    }
    
    .footer-tags-wrapper .tagcloud a {
        padding: 4px 12px;
        font-size: 11px !important;
    }
    
    .footer-search-form .search-input-footer {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .footer-search-form .search-submit-footer {
        font-size: 12px;
        padding: 6px 12px;
    }
}


/* ========================================
   استایل صفحه آرشیو / دسته‌بندی - با گرید درست
   ======================================== */

/* ✅ کانتینر اصلی با گرید ۲ ستونه */
.main-grid {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 30px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== محتوای اصلی ===== */
.content-area {
    min-width: 0;
    overflow: hidden;
}

/* عنوان آرشیو */
.archive-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a2634;
    margin: 0 0 20px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 10px;
    border-right: 4px solid #c9a84c;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* ===== لیست مقالات ===== */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* کارت هر مقاله */
.post-item {
    background: #ffffff;
    padding: 22px 26px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border-right: 3px solid #c9a84c;
    transition: all 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* عنوان مقاله */
.post-item h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
}

.post-item h2 a {
    color: #1a2634;
    transition: all 0.3s ease;
}

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

/* متادیتا */
.post-item .post-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.post-item .post-meta .date {
    display: inline-block;
}

/* خلاصه متن */
.post-item .post-excerpt {
    color: #555;
    font-size: 14px;
    line-height: 1.9;
}

.post-item .post-excerpt p {
    margin: 0;
}

/* ===== صفحه‌بندی ===== */
.pagination {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f2f5;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 3px;
    background: #ffffff;
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pagination .current {
    background: #c9a84c;
    color: #ffffff;
}

.pagination a:hover {
    background: #c9a84c;
    color: #ffffff;
}

.pagination .dots {
    background: transparent;
    box-shadow: none;
}

/* ===== سایدبار ===== */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ویجت‌ها */
.sidebar-area .widget {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-area .widget-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a2634;
    margin: 0 0 12px;
    padding-right: 12px;
    border-right: 3px solid #c9a84c;
}

/* ===== ویجت جست‌وجو ===== */
.sidebar-area .widget_search #searchform > div {
    display: flex;
    align-items: center;
    background: #f5f6f8;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8eaed;
    transition: all 0.3s ease;
}

.sidebar-area .widget_search #searchform > div:focus-within {
    border-color: #c9a84c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

.sidebar-area .widget_search #s {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    min-width: 0;
}

.sidebar-area .widget_search #s::placeholder {
    color: #aaa;
}

.sidebar-area .widget_search #searchsubmit {
    padding: 10px 18px;
    border: none;
    background: #c9a84c;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.sidebar-area .widget_search #searchsubmit:hover {
    background: #b8973a;
}

/* ===== ویجت لینک‌ها (wp-block-media-text) ===== */
.sidebar-area .wp-block-media-text {
    padding: 0;
}

.sidebar-area .wp-block-media-text .wp-block-media-text__content p {
    margin: 6px 0;
}

.sidebar-area .wp-block-media-text .wp-block-media-text__content a {
    display: block;
    padding: 8px 12px;
    background: #f5f6f8;
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    transition: all 0.3s ease;
    border-right: 2px solid transparent;
}

.sidebar-area .wp-block-media-text .wp-block-media-text__content a:hover {
    background: #f0f2f5;
    color: #c9a84c;
    border-right-color: #c9a84c;
    padding-right: 16px;
}

/* ========================================
   ریسپانسیو
   ======================================== */

@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1.8fr 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    /* ✅ در موبایل سایدبار زیر محتوا میاد */
    .main-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .post-item {
        padding: 18px 20px;
    }
    
    .post-item h2 {
        font-size: 16px;
    }
    
    .archive-title {
        font-size: 18px;
        padding: 14px 18px;
    }
    
    .sidebar-area .widget {
        padding: 16px 18px;
    }
    
    .pagination .page-numbers {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .main-grid {
        padding: 0 12px;
        gap: 20px;
    }
    
    .post-item {
        padding: 14px 14px;
        border-right-width: 3px;
    }
    
    .post-item h2 {
        font-size: 15px;
    }
    
    .post-item .post-excerpt {
        font-size: 13px;
    }
    
    .archive-title {
        font-size: 16px;
        padding: 12px 14px;
        border-right-width: 3px;
    }
    
    .sidebar-area .widget {
        padding: 14px 14px;
    }
    
    .sidebar-area .widget-title {
        font-size: 13px;
        padding-right: 8px;
    }
    
    .sidebar-area .widget_search #s {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .sidebar-area .widget_search #searchsubmit {
        font-size: 12px;
        padding: 8px 14px;
    }
    
    .pagination .page-numbers {
        padding: 5px 10px;
        font-size: 12px;
        margin: 0 2px;
    }
}

/* ========================================
   استایل باکس جست‌وجوی هدر - جمع و جور و حرفه‌ای
   ======================================== */

/* باکس اصلی جست‌وجو */
.search-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* فرم جست‌وجو */
.search-box .searchform {
    width: 100%;
    max-width: 350px;
}

.search-box .searchform > div {
    display: flex;
    align-items: center;
    background: #f5f6f8;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-box .searchform > div:focus-within {
    border-color: #c9a84c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
}

/* لیبل مخفی */
.search-box .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* فیلد ورودی */
.search-box #s {
    flex: 1;
    padding: 9px 16px;
    border: none;
    background: transparent;
    color: #2d2d2d;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.search-box #s::placeholder {
    color: #aaa;
    font-weight: 300;
}

/* دکمه جست‌وجو */
.search-box #searchsubmit {
    padding: 9px 22px;
    border: none;
    background: #c9a84c;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-box #searchsubmit:hover {
    background: #b8973a;
}

.search-box #searchsubmit:active {
    transform: scale(0.95);
}

/* ========================================
   نسخه هدر (اگر در هدر استفاده شده)
   ======================================== */
.site-header .search-box {
    max-width: 350px;
}

.site-header .search-box #s {
    color: #2d2d2d;
}

.site-header .search-box #s::placeholder {
    color: #999;
}

/* ========================================
   نسخه فوتر (اگر در فوتر استفاده شده)
   ======================================== */
.site-footer .search-box {
    max-width: 400px;
    margin: 0 auto;
}

.site-footer .search-box .searchform > div {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.site-footer .search-box #s {
    color: #ffffff;
}

.site-footer .search-box #s::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.site-footer .search-box .searchform > div:focus-within {
    border-color: #c9a84c;
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   نسخه سایدبار
   ======================================== */
.sidebar-area .widget_search .searchform > div {
    border-radius: 6px;
}

.sidebar-area .widget_search #s {
    padding: 10px 14px;
    font-size: 13px;
}

.sidebar-area .widget_search #searchsubmit {
    padding: 10px 18px;
    font-size: 13px;
}

/* ========================================
   ریسپانسیو
   ======================================== */

@media (max-width: 768px) {
    .search-box {
        width: 100%;
    }
    
    .search-box .searchform {
        max-width: 100%;
    }
    
    .search-box .searchform > div {
        border-radius: 6px;
    }
    
    .search-box #s {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .search-box #searchsubmit {
        padding: 8px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-box #s {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .search-box #searchsubmit {
        padding: 7px 14px;
        font-size: 12px;
    }
}

/* ========================================
   حالت دارک (اختیاری)
   ======================================== */
.dark-mode .search-box .searchform > div {
    background: #2d2d2d;
    border-color: #444;
}

.dark-mode .search-box #s {
    color: #ffffff;
}

.dark-mode .search-box #s::placeholder {
    color: #888;
}


/* ========================================
   ابر برچسب‌های فوتر - یکدست، مرتب و حرفه‌ای
   ======================================== */

.footer-tags {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 0 10px;
}

.tag-cloud-wrap {
    text-align: center;
}

/* عنوان برچسب‌ها */
.tags-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.06);
}

/* کانتینر برچسب‌ها - چیدمان افقی */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* هر برچسب - یکدست و مرتب */
.tagcloud a {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px !important;
    font-weight: 400;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    line-height: 1.6;
    text-decoration: none;
    letter-spacing: 0.3px;
}

/* هاور برچسب‌ها */
.tagcloud a:hover {
    background: #c9a84c;
    color: #ffffff;
    border-color: #c9a84c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.25);
}

/* ========================================
   ریسپانسیو
   ======================================== */

@media (max-width: 768px) {
    .footer-tags {
        padding: 16px 18px;
        border-radius: 10px;
    }
    
    .tags-title {
        font-size: 14px;
        margin: 0 0 12px;
    }
    
    .tagcloud {
        gap: 6px;
    }
    
    .tagcloud a {
        padding: 5px 14px;
        font-size: 12px !important;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .footer-tags {
        padding: 12px 12px;
        border-radius: 8px;
    }
    
    .tags-title {
        font-size: 13px;
        margin: 0 0 10px;
        padding-bottom: 8px;
    }
    
    .tagcloud {
        gap: 5px;
    }
    
    .tagcloud a {
        padding: 4px 12px;
        font-size: 11px !important;
        border-radius: 14px;
    }
}