/* ══════════════════════════════════════════════════════════════════════════
   BLOG & SINGLE PAGE TYPOGRAPHY (Automatic Styling Without Utility Classes)
   استایل‌دهی خودکار تمامی عناصر داخل صفحات و مقالات بلاگ بدون نیاز به کلاس
   Designed by dashtseo.ir | http://dashtseo.ir
   ══════════════════════════════════════════════════════════════════════════ */

/* محفظه اصلی محتوای مقاله / برگه / پست */
.sp-content,
.entry-content,
.post-content,
.gc-content {
    font-family: "Vazirmatn", sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 2.35;
    color: #3b4856;
    font-size: 1.05rem;
    word-break: break-word;
}

/* ─── هدینگ‌ها (h1 تا h6) بدون نیاز به کلاس ─── */
.sp-content h1,
.entry-content h1,
.post-content h1 {
    font-size: 1.85rem;
    font-weight: 900;
    color: #0F2640;
    margin: 45px 0 22px;
    padding-right: 20px;
    border-right: 5px solid #E67E22;
    line-height: 1.55;
    position: relative;
}

.sp-content h2,
.entry-content h2,
.post-content h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #1B3A5C;
    margin: 42px 0 20px;
    padding-right: 18px;
    border-right: 4px solid #E67E22;
    line-height: 1.6;
    position: relative;
}

.sp-content h3,
.entry-content h3,
.post-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1B3A5C;
    margin: 35px 0 16px;
    padding-right: 15px;
    border-right: 3px solid #1B3A5C;
    line-height: 1.65;
}

.sp-content h4,
.entry-content h4,
.post-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0F2640;
    margin: 30px 0 14px;
    line-height: 1.7;
}

.sp-content h5,
.entry-content h5,
.post-content h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3b4856;
    margin: 25px 0 12px;
}

.sp-content h6,
.entry-content h6,
.post-content h6 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #555;
    margin: 22px 0 10px;
}

/* ─── پاراگراف‌ها (p) ─── */
.sp-content p,
.entry-content p,
.post-content p {
    margin-top: 0;
    margin-bottom: 22px;
    line-height: 2.35;
    color: #3b4856;
}

/* ─── لینک‌ها (a) داخل متن ─── */
.sp-content a,
.entry-content a,
.post-content a {
    color: #E67E22;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed rgba(230, 126, 34, 0.45);
    padding-bottom: 1px;
    transition: all 0.28s ease;
}

.sp-content a:hover,
.entry-content a:hover,
.post-content a:hover {
    color: #D35400;
    border-bottom-style: solid;
    border-bottom-color: #D35400;
    background: rgba(230, 126, 34, 0.08);
    border-radius: 4px;
    padding: 2px 5px;
}

/* ─── لیست‌های نامرتب (ul) و مرتب (ol) ─── */
.sp-content ul,
.entry-content ul,
.post-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.sp-content ul > li,
.entry-content ul > li,
.post-content ul > li {
    position: relative;
    padding-right: 26px;
    margin-bottom: 13px;
    line-height: 2.2;
    color: #3b4856;
}

.sp-content ul > li::before,
.entry-content ul > li::before,
.post-content ul > li::before {
    content: "";
    position: absolute;
    right: 4px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E67E22, #1B3A5C);
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.35);
}

/* لیست‌های مرتب */
.sp-content ol,
.entry-content ol,
.post-content ol {
    padding-right: 28px;
    margin: 0 0 25px 0;
}

.sp-content ol > li,
.entry-content ol > li,
.post-content ol > li {
    margin-bottom: 13px;
    line-height: 2.2;
    color: #3b4856;
    padding-right: 8px;
}

.sp-content ol > li::marker,
.entry-content ol > li::marker,
.post-content ol > li::marker {
    font-weight: 800;
    color: #1B3A5C;
}

/* لیست‌های تو در تو */
.sp-content ul ul,
.sp-content ol ol,
.sp-content ul ol,
.sp-content ol ul,
.entry-content ul ul,
.entry-content ol ol {
    margin: 10px 24px 10px 0;
}

/* ─── نقل قول‌ها (Blockquote) با افکت گلس و بلر ─── */
.sp-content blockquote,
.entry-content blockquote,
.post-content blockquote {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-right: 4px solid #E67E22 !important;
    border-radius: 20px;
    padding: 28px 34px 28px 24px;
    margin: 35px 0;
    box-shadow: 0 10px 30px rgba(15, 38, 64, 0.05);
    font-size: 1.08rem;
    line-height: 2.3;
    color: #1B3A5C;
    font-style: italic;
    position: relative;
    overflow: hidden;
}

.sp-content blockquote::before,
.entry-content blockquote::before,
.post-content blockquote::before {
    content: "❝";
    position: absolute;
    top: -12px;
    left: 20px;
    font-size: 4rem;
    color: #E67E22;
    opacity: 0.15;
    line-height: 1;
    pointer-events: none;
}

.sp-content blockquote p,
.entry-content blockquote p {
    margin: 0;
    color: #1B3A5C;
    font-weight: 600;
}

.sp-content blockquote cite,
.sp-content blockquote footer,
.entry-content blockquote cite,
.entry-content blockquote footer {
    display: block;
    margin-top: 14px;
    font-size: 0.88rem;
    font-style: normal;
    font-weight: 700;
    color: #E67E22;
}

/* ─── کدهای برنامه‌نویسی (pre / code) با بلر ─── */
.sp-content pre,
.entry-content pre,
.post-content pre {
    background: rgba(15, 38, 64, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 38, 64, 0.12);
    border-radius: 16px;
    padding: 22px;
    margin: 30px 0;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    font-family: monospace, sans-serif;
    font-size: 0.92rem;
    line-height: 1.7;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.sp-content code,
.entry-content code,
.post-content code {
    background: rgba(230, 126, 34, 0.12);
    color: #D35400;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.88em;
    font-family: monospace, sans-serif;
    direction: ltr;
    display: inline-block;
}

.sp-content pre code,
.entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    display: block;
}

/* ─── جداول (table) با افکت گلس و بلر ─── */
.sp-content table,
.entry-content table,
.post-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 35px 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 38, 64, 0.05);
}

.sp-content th,
.entry-content th,
.post-content th {
    background: linear-gradient(135deg, #1B3A5C, #0F2640);
    color: #ffffff;
    font-weight: 800;
    padding: 16px 20px;
    text-align: center;
    border-bottom: 2px solid rgba(230, 126, 34, 0.5);
    font-size: 0.96rem;
}

.sp-content td,
.entry-content td,
.post-content td {
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(15, 38, 64, 0.07);
    color: #444;
    transition: background 0.25s ease;
}

.sp-content tr:last-child td,
.entry-content tr:last-child td {
    border-bottom: none;
}

.sp-content tr:nth-child(even) td,
.entry-content tr:nth-child(even) td {
    background: rgba(15, 38, 64, 0.025);
}

.sp-content tr:hover td,
.entry-content tr:hover td {
    background: rgba(230, 126, 34, 0.06);
}

/* ─── تصاویر و کپشن‌ها (img / figure / figcaption) ─── */
.sp-content img,
.entry-content img,
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(15, 38, 64, 0.12);
    margin: 30px auto;
    display: block;
    transition: transform 0.35s ease;
}

.sp-content img:hover,
.entry-content img:hover {
    transform: scale(1.01);
}

.sp-content figure,
.entry-content figure,
.post-content figure {
    margin: 35px 0;
    text-align: center;
}

.sp-content figcaption,
.entry-content figcaption,
.post-content figcaption {
    font-size: 0.85rem;
    color: #777;
    margin-top: 10px;
    font-weight: 500;
}

/* ─── خط‌های جداکننده (hr) ─── */
.sp-content hr,
.entry-content hr,
.post-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E67E22, #1B3A5C, transparent);
    margin: 45px 0;
}

/* ─── عناصر برجسته (mark / strong / b / kbd / del) ─── */
.sp-content mark,
.entry-content mark,
.post-content mark {
    background: linear-gradient(120deg, rgba(230, 126, 34, 0.28) 0%, rgba(230, 126, 34, 0.12) 100%);
    border-radius: 6px;
    padding: 2px 8px;
    color: inherit;
    font-weight: 600;
}

.sp-content kbd,
.entry-content kbd,
.post-content kbd {
    background: #1B3A5C;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    font-family: monospace;
    box-shadow: 0 2px 0 #0F2640;
    margin: 0 3px;
}

.sp-content strong,
.sp-content b,
.entry-content strong,
.entry-content b {
    color: #0F2640;
    font-weight: 800;
}

/* ─── حالت دارک مود (هماهنگ با dark-mode.css) ─── */
body.dark-mode .sp-content,
body.dark-mode .entry-content,
body.dark-mode .post-content {
    color: #e0e6ed;
}

body.dark-mode .sp-content h1,
body.dark-mode .sp-content h2,
body.dark-mode .sp-content h3,
body.dark-mode .sp-content h4,
body.dark-mode .sp-content h5,
body.dark-mode .sp-content h6,
body.dark-mode .entry-content h1,
body.dark-mode .entry-content h2,
body.dark-mode .entry-content h3,
body.dark-mode .entry-content h4,
body.dark-mode .entry-content h5,
body.dark-mode .entry-content h6 {
    color: #ffffff;
}

body.dark-mode .sp-content p,
body.dark-mode .entry-content p {
    color: #cbd5e1;
}

body.dark-mode .sp-content blockquote,
body.dark-mode .entry-content blockquote {
    background: rgba(20, 28, 48, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e6ed;
}

body.dark-mode .sp-content blockquote p,
body.dark-mode .entry-content blockquote p {
    color: #ffffff;
}

body.dark-mode .sp-content pre,
body.dark-mode .entry-content pre {
    background: rgba(10, 15, 28, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

body.dark-mode .sp-content table,
body.dark-mode .entry-content table {
    background: rgba(20, 28, 48, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .sp-content td,
body.dark-mode .entry-content td {
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

body.dark-mode .sp-content tr:nth-child(even) td,
body.dark-mode .entry-content tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}
