/* ============= استایل محتوای مقاله (WP Editor) ============= */

/* Line clamp fallback (اگر Tailwind خط بالایی نداشت) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.samlite-post-content {
    color: #3a3a3a;
    line-height: 2;
    font-size: 16px;
}

/* پاراگراف‌ها */
.samlite-post-content p {
    margin-bottom: 20px;
    text-align: justify;
    color: #3a3a3a;
}

.samlite-post-content p:last-child {
    margin-bottom: 0;
}

/* تیترها */
.samlite-post-content h1,
.samlite-post-content h2,
.samlite-post-content h3,
.samlite-post-content h4,
.samlite-post-content h5,
.samlite-post-content h6 {
    color: #000;
    font-weight: 800;
    line-height: 1.4;
    margin-top: 36px;
    margin-bottom: 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.samlite-post-content h2 {
    font-size: 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f4f4f4;
}

.samlite-post-content h3 {
    font-size: 22px;
    color: #7300ff;
}

.samlite-post-content h4 {
    font-size: 18px;
}

.samlite-post-content h2:first-child,
.samlite-post-content h3:first-child,
.samlite-post-content h4:first-child {
    margin-top: 0;
}

/* لینک‌ها */
.samlite-post-content a {
    color: #7300ff;
    text-decoration: none;
    border-bottom: 1px dashed #7300ff80;
    transition: all .2s;
}

.samlite-post-content a:hover {
    color: #5d00cc;
    border-bottom-style: solid;
    border-bottom-color: #5d00cc;
}

/* لیست‌ها */
.samlite-post-content ul,
.samlite-post-content ol {
    margin-bottom: 20px;
    padding-right: 24px;
}

.samlite-post-content ul {
    list-style: none;
}

.samlite-post-content ul li {
    position: relative;
    padding-right: 20px;
    margin-bottom: 10px;
}

.samlite-post-content ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    background: #7300ff;
    border-radius: 50%;
}

.samlite-post-content ol {
    list-style: decimal;
    color: #7300ff;
}

.samlite-post-content ol li {
    padding-right: 8px;
    margin-bottom: 10px;
}

.samlite-post-content ol li::marker {
    color: #7300ff;
    font-weight: bold;
}

.samlite-post-content li > ul,
.samlite-post-content li > ol {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* نقل‌قول */
.samlite-post-content blockquote {
    background: #f9f5ff;
    border-right: 4px solid #7300ff;
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 16px;
    color: #3a3a3a;
    font-style: normal;
}

.samlite-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.samlite-post-content blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #838383;
    font-style: normal;
}

/* کد */
.samlite-post-content code {
    background: #f4f4f4;
    color: #7300ff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    direction: ltr;
    display: inline-block;
}

.samlite-post-content pre {
    background: #1e1e2e;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 24px 0;
    direction: ltr;
    text-align: left;
}

.samlite-post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* تصاویر */
.samlite-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 24px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.samlite-post-content .wp-block-image {
    margin: 24px 0;
}

.samlite-post-content figure {
    margin: 24px 0;
}

.samlite-post-content figcaption {
    text-align: center;
    color: #838383;
    font-size: 13px;
    margin-top: 10px;
}

/* جداول */
.samlite-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f4f4f4;
}

.samlite-post-content th,
.samlite-post-content td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid #f4f4f4;
}

.samlite-post-content th {
    background: #f9f5ff;
    color: #7300ff;
    font-weight: bold;
}

.samlite-post-content tr:last-child td {
    border-bottom: none;
}

/* جداکننده افقی */
.samlite-post-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to left, transparent, #7300ff40, transparent);
    margin: 32px 0;
}

/* دکمه‌ها */
.samlite-post-content .wp-block-button__link,
.samlite-post-content a.wp-block-button__link {
    background: #7300ff;
    color: #fff !important;
    border: none;
    padding: 12px 28px;
    border-radius: 9999px;
    font-weight: bold;
    transition: all .2s;
    border-bottom: none !important;
}

.samlite-post-content .wp-block-button__link:hover {
    background: #5d00cc;
    transform: translateY(-2px);
}

/* بلوک‌های WP */
.samlite-post-content .wp-block-quote,
.samlite-post-content .wp-block-pullquote {
    border-right: 4px solid #7300ff;
    background: #f9f5ff;
    padding: 20px 24px;
    border-radius: 16px;
    margin: 24px 0;
}

.samlite-post-content .wp-block-cover {
    border-radius: 16px;
    margin: 24px 0;
    overflow: hidden;
}

/* پاراگراف خالی WP */
.samlite-post-content p:empty {
    display: none;
}

/* انتخاب متن */
.samlite-post-content ::selection {
    background: #7300ff;
    color: #fff;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .samlite-post-content {
        font-size: 15px;
        line-height: 1.9;
    }
    .samlite-post-content h2 {
        font-size: 22px;
    }
    .samlite-post-content h3 {
        font-size: 18px;
    }
    .samlite-post-content pre {
        font-size: 12px;
    }
}
