/*
Theme Name: Hamyar Canada Child
Template: hamyarcanada
Version: 1.0.0
*/

/* ==========================================================

   ========================================================== */

/* محفظه اصلی متن مقاله */
.post article {
    font-family: "IRANSans", IRANSansX, sans-serif !important;
    font-size: 16px !important;
    line-height: 28.8px !important;
    font-weight: 400;
    color: #37474f !important; /* --wp--preset--color--font-main */
    direction: rtl;
    text-align: justify;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* پاراگراف‌های متن */
.post article p {
    font-size: 16px !important;
    line-height: 28.8px !important;
    color: #37474f !important;
    margin-top: 20px !important;
    margin-bottom: 0px !important;
    margin-block-start: 20px !important;
    margin-block-end: 0px !important;
}

/* تیترهای سطح دو (H2) */
.post article h2 {
    color: #28343a !important; /* secondary-800 */
    font-size: 21px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
    margin-top: 32px !important;
    margin-bottom: 12px !important;
}

/* تیترهای سطح سه (H3) */
.post article h3 {
    color: #313f46 !important; /* secondary-700 */
    font-size: 22px !important;
    line-height: 1.55 !important;
    font-weight: 700 !important;
    margin-top: 32px !important;
    margin-bottom: 14px !important;
}

/* تیترهای سطح چهار (H4) */
.post article h4 {
    color: #37474f !important; /* secondary-600 */
    font-size: 18px !important;
    line-height: 1.6 !important;
    font-weight: 700 !important;
    margin-top: 26px !important;
    margin-bottom: 12px !important;
}

/* کلمات بولد و شاخص */
.post article strong,
.post article b {
    color: #20292e !important; /* secondary-900 */
    font-weight: 700 !important;
}

/* لینک‌های متنی */
.post article a {
    color: #0693e3 !important; /* vivid-cyan-blue */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.post article a:hover {
    color: #006ba1 !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* تنظیمات ریسپانسیو (موبایل و تبلت) */
@media (max-width: 768px) {
    .post article,
    .post article p {
        font-size: 15px !important;
        line-height: 27px !important;
        text-align: right;
        margin-top: 16px !important;
        margin-block-start: 16px !important;
    }

    .post article h2 {
        font-size: 18px !important;
        margin-top: 24px !important;
        margin-bottom: 10px !important;
    }

    .post article h3 {
        font-size: 19px !important;
        margin-top: 26px !important;
    }

    .post article h4 {
        font-size: 17px !important;
        margin-top: 22px !important;
    }
}

/* ==========================================================
   ریست قطعی مارجین ۲۴ پیکسلی و فشرده‌سازی بولت‌ها
   ========================================================== */

/* ریست مارجین تگ والد لیست */
.post article ul,
.post article ol,
.post article .wp-block-list,
article ul,
article ol {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    margin-block-start: 12px !important;
    margin-block-end: 12px !important;
    padding-right: 22px !important;
    padding-left: 0 !important;
    gap: 0 !important;
    row-gap: 0 !important;
}

/* حذف کامل مارجین ۲۴ پیکسلی بالا و تنظیم فاصله بولت‌ها */
.post article ul li,
.post article ol li,
.post article li,
article li {
    margin-top: 0px !important;
    margin-bottom: 4px !important;
    margin-block-start: 0px !important; /* خنثی‌سازی مقدار 24px */
    margin-block-end: 4px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    padding-block: 0px !important;
    line-height: 24px !important; /* کاهش ارتفاع خط از 28.8 به 24 */
}

/* حذف مارجین تگ‌های درونی (مانند p یا span) داخل هر بولت */
.post article li *,
article li * {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    margin-block-start: 0px !important;
    margin-block-end: 0px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    line-height: inherit !important;
}

/* ==========================================================
   استایل اختصاصی و مینیمال جدول‌ها
   ========================================================== */

/* محفظه و کادر کلی جدول */
.post article table,
article table,
.wp-block-table table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 24px !important;
    margin-bottom: 24px !important;
    font-size: 15px !important;
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* هدینگ جدول */
.post article table thead th,
.post article table th,
article table thead th,
article table th,
.wp-block-table th {
    background-color: rgb(36 17 212) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-align: right !important;
    padding: 14px 16px !important;
    border: none !important; /* حذف خطوط عمودی در هدر */
}

/* متن و المان‌های درون هدر */
.post article table th *,
article table th * {
    color: #ffffff !important;
}

/* سلول‌های محتوای جدول (حذف خطوط عمودی و حفظ خطوط افقی ملایم) */
.post article table td,
article table td,
.wp-block-table td {
    padding: 12px 16px !important;
    border-left: none !important;   /* حذف خطوط عمودی بین ستون‌ها */
    border-right: none !important;  /* حذف خطوط عمودی بین ستون‌ها */
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #37474f !important;
    line-height: 24px !important;
    background-color: #ffffff !important; /* پس‌زمینه کاملاً یکدست */
}

/* حذف رنگ‌های متناوب برای ردیف‌های زوج */
.post article table tbody tr:nth-child(even),
article table tbody tr:nth-child(even) {
    background-color: #ffffff !important;
}

/* خط پررنگ و مشخص ردیف آخر با رنگ هدینگ */
.post article table tbody tr:last-child td,
article table tbody tr:last-child td,
.post article table tr:last-child td,
article tr:last-child td {
    border-bottom: 3px solid rgb(36 17 212) !important;
}
