/* =========================================================
   RAD ARTICLE CSS
   نسخه مادر استایل مقالات وب‌سایت راد
   Font: Dana
   Scope: .rad-article
   ========================================================= */


/* =========================================================
   1. FONT
   ========================================================= */

@font-face {
    font-family: 'Dana';
    src: url('/fonts/Dana-FaNum-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('/fonts/Dana-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   2. ROOT VARIABLES
   ========================================================= */

.rad-article {
    --rad-primary: #2563eb;
    --rad-primary-dark: #1557b0;
    --rad-secondary: #06b6d4;

    --rad-text: #263746;
    --rad-text-soft: #526577;
    --rad-muted: #718096;

    --rad-white: #ffffff;
    --rad-bg: #f8fbff;

    --rad-border: #dbeafe;
    --rad-border-soft: #e5edf5;

    --rad-blue-light: #eef6ff;
    --rad-blue-lighter: #f6faff;

    --rad-gold: #e7b75d;

    --rad-danger: #b4533c;
    --rad-danger-bg: #fff7f5;
    --rad-danger-border: #f2d5cf;

    --rad-warning-bg: #fffaf0;
    --rad-warning-border: #f4dfae;

    --rad-shadow-sm: 0 5px 18px rgba(37, 99, 235, 0.06);
    --rad-shadow: 0 12px 35px rgba(37, 99, 235, 0.08);
    --rad-shadow-lg: 0 18px 50px rgba(37, 99, 235, 0.10);

    width: 100%;
    max-width: 980px;

    margin: 0 auto;
    padding: 35px 24px 70px;

    color: var(--rad-text);

    direction: rtl;
    text-align: right;

    font-family:
        'Dana',
        Tahoma,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 19px;
    font-weight: 400;

    line-height: 2.2;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* =========================================================
   3. GLOBAL ARTICLE RESET
   ========================================================= */

.rad-article *,
.rad-article *::before,
.rad-article *::after {
    box-sizing: border-box;
}

.rad-article h1,
.rad-article h2,
.rad-article h3,
.rad-article h4,
.rad-article p,
.rad-article ul,
.rad-article ol,
.rad-article blockquote {
    font-family:
        'Dana',
        Tahoma,
        "Segoe UI",
        Arial,
        sans-serif;
}

.rad-article p {
    margin: 0 0 22px;
    color: var(--rad-text);
}

.rad-article strong {
    font-weight: 700;
    color: var(--rad-primary-dark);
}

.rad-article a {
    color: var(--rad-primary);
    text-decoration: none;
}

.rad-article a:hover {
    text-decoration: underline;
}


/* =========================================================
   4. MAIN TITLE
   ========================================================= */

.rad-article h1 {
    margin: 0 0 22px;

    color: #17324d;

    font-size: clamp(30px, 4.5vw, 46px);
    font-weight: 700;

    line-height: 1.65;

    letter-spacing: -0.3px;
}


/* =========================================================
   5. INTRO / LEAD
   ========================================================= */

.rad-intro {
    margin: 0 0 34px;

    color: var(--rad-text-soft);

    font-size: 20px;
    font-weight: 400;

    line-height: 2.2;
}


/* =========================================================
   6. CATEGORY / KICKER
   ========================================================= */

.rad-kicker {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--rad-primary);

    font-size: 14px;
    font-weight: 700;

    line-height: 1.8;
}


/* =========================================================
   7. H2
   ========================================================= */

.rad-article h2 {
    position: relative;

    margin: 55px 0 24px;
    padding: 14px 20px 14px 18px;

    color: var(--rad-primary-dark);

    font-size: clamp(23px, 3vw, 31px);
    font-weight: 700;

    line-height: 1.7;

    background:
        linear-gradient(
            135deg,
            #eef6ff 0%,
            #f5f8ff 55%,
            #f4f3ff 100%
        );

    border: 1px solid #cfe0ff;
    border-radius: 15px;

    box-shadow:
        0 5px 18px rgba(37, 99, 235, 0.05);
}

.rad-article h2::before {
    content: "";

    position: absolute;

    right: 0;
    top: 12px;
    bottom: 12px;

    width: 5px;

    background:
        linear-gradient(
            to bottom,
            var(--rad-primary),
            var(--rad-secondary)
        );

    border-radius: 8px;
}


/* =========================================================
   8. H3
   ========================================================= */

.rad-article h3 {
    margin: 32px 0 14px;

    color: var(--rad-primary-dark);

    font-size: 21px;
    font-weight: 700;

    line-height: 1.8;
}


/* =========================================================
   9. STEP TITLES
   Example:
   ۲. فقط یک مشکل اصلی را انتخاب کنید
   ========================================================= */

.rad-step-title {
    display: flex;
    align-items: center;

    gap: 7px;

    margin: 30px 0 12px;

    color: var(--rad-text);

    font-size: 20px;
    font-weight: 700;

    line-height: 1.8;
}

.rad-step-number {
    flex: 0 0 auto;

    width: auto;
    height: auto;

    display: inline;

    color: var(--rad-text);

    background: transparent;

    border-radius: 0;

    font-size: 22px;
    font-weight: 700;

    box-shadow: none;
}

.rad-step-number::after {
    content: ".";

    margin-right: 3px;
}


/* =========================================================
   10. STANDARD NOTE
   ========================================================= */

.rad-note,
.rad-article .note {
    margin: 28px 0;
    padding: 21px 24px;

    color: var(--rad-text);

    background:
        linear-gradient(
            135deg,
            #f3f9ff,
            #f8fbff
        );

    border: 1px solid #d9e9f8;

    border-radius: 17px;

    box-shadow: var(--rad-shadow-sm);
}

.rad-note p:last-child,
.rad-article .note p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   11. QUOTE
   ========================================================= */

.rad-quote,
.rad-article .quote {
    margin: 30px 0;

    padding: 23px 26px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #17324d,
            #286a8f
        );

    border-radius: 18px;

    font-size: 20px;

    line-height: 2;

    box-shadow:
        0 10px 28px rgba(23, 50, 77, 0.12);
}

.rad-quote strong,
.rad-article .quote strong {
    color: #ffffff;
}


/* =========================================================
   12. QUESTION BOX
   ========================================================= */

.rad-question,
.rad-article .question {
    margin: 24px 0;

    padding: 18px 22px;

    color: var(--rad-text);

    background:
        linear-gradient(
            135deg,
            #fffaf0,
            #fffdf8
        );

    border-right: 4px solid var(--rad-gold);

    border-radius: 15px;

    box-shadow:
        0 5px 18px rgba(231, 183, 93, 0.07);
}

.rad-question strong,
.rad-article .question strong {
    color: #76551c;
}


/* =========================================================
   13. WARNING / IMPORTANT NOTICE
   ========================================================= */

.rad-warning,
.rad-article .warning {
    margin: 30px 0;

    padding: 23px 25px;

    color: var(--rad-text);

    background: var(--rad-danger-bg);

    border: 1px solid var(--rad-danger-border);

    border-right: 5px solid var(--rad-danger);

    border-radius: 17px;

    box-shadow:
        0 6px 20px rgba(180, 83, 60, 0.06);
}

.rad-warning h3,
.rad-article .warning h3 {
    margin-top: 0;

    color: var(--rad-danger);
}

.rad-warning p:last-child,
.rad-article .warning p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   14. CHECKLIST
   ========================================================= */

.rad-checklist,
.rad-article .checklist {
    margin: 28px 0;

    padding: 24px 25px;

    background:
        linear-gradient(
            135deg,
            #f8fafc,
            #ffffff
        );

    border: 1px solid var(--rad-border-soft);

    border-radius: 18px;

    box-shadow: var(--rad-shadow-sm);
}

.rad-checklist label,
.rad-article .checklist label {
    display: block;

    margin: 10px 0;

    color: var(--rad-text);

    font-size: 18px;

    line-height: 2;
}

.rad-checklist label:last-child,
.rad-article .checklist label:last-child {
    margin-bottom: 0;
}


/* =========================================================
   15. LISTS
   ========================================================= */

.rad-article ul,
.rad-article ol {
    margin: 18px 0 26px;

    padding-right: 30px;

    color: var(--rad-text);
}

.rad-article li {
    margin: 8px 0;

    padding-right: 4px;

    line-height: 2.15;
}

.rad-article ul li::marker {
    color: var(--rad-primary);
}

.rad-article ol li::marker {
    color: var(--rad-primary-dark);
    font-weight: 700;
}


/* =========================================================
   16. BRAND LINE
   ========================================================= */

.rad-brand {
    margin-top: 32px;
    padding-top: 10px;

    text-align: center;

    color: var(--rad-primary-dark);

    font-size: 21px;
    font-weight: 700;

    line-height: 1.8;
}


/* =========================================================
   17. ACTION / CTA
   بدون کادر سنگین
   ========================================================= */

.rad-action {
    margin-top: 38px;

    padding: 15px 0;

    color: var(--rad-text);

    text-align: center;
}

.rad-action-title {
    margin-bottom: 10px;

    color: var(--rad-primary-dark);

    font-size: 20px;
    font-weight: 700;

    line-height: 1.9;
}

.rad-action p {
    margin-bottom: 20px;

    color: var(--rad-text);
}

.rad-action-btn {
    display: inline-block;

    padding: 11px 25px;

    color: #1d4ed8;

    background: #ffffff;

    border: 1px solid #bfdbfe;

    border-radius: 12px;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.rad-action-btn:hover {
    color: #1d4ed8;

    background: #f8fbff;

    text-decoration: none;

    transform: translateY(-2px);

    box-shadow:
        0 7px 20px rgba(37, 99, 235, 0.12);
}


/* =========================================================
   18. FINAL SUMMARY
   ========================================================= */

.rad-final {
    margin-top: 50px;

    padding: 32px;

    color: var(--rad-text);

    background:
        linear-gradient(
            135deg,
            #f0f7ff,
            #f5f3ff
        );

    border: 1px solid #dbeafe;

    border-radius: 26px;

    box-shadow:
        0 12px 35px rgba(37, 99, 235, 0.08);
}

.rad-final h2 {
    margin: 0 0 18px;

    padding: 0;

    color: var(--rad-primary-dark);

    background: none;

    border: 0;

    box-shadow: none;
}

.rad-final h2::before {
    display: none;
}

.rad-final p {
    color: var(--rad-text);
}

.rad-final p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   19. FINAL CTA INSIDE SUMMARY
   ========================================================= */

.rad-cta {
    margin-top: 25px;

    padding: 20px 22px;

    color: var(--rad-text);

    background: #ffffff;

    border: 1px solid #bfdbfe;

    border-radius: 17px;

    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.06);
}


/* =========================================================
   20. ARTICLE FOOTER
   ========================================================= */

.rad-footer,
.rad-article .footer {
    margin-top: 30px;

    padding-top: 18px;

    color: var(--rad-muted);

    text-align: center;

    font-size: 14px;

    line-height: 1.9;
}


/* =========================================================
   21. IMAGES
   ========================================================= */

.rad-article img {
    display: block;

    max-width: 100%;
    height: auto;

    margin: 28px auto;

    border-radius: 18px;
}

.rad-article figure {
    margin: 30px 0;
}

.rad-article figure img {
    margin: 0 auto;
}

.rad-article figcaption {
    margin-top: 10px;

    color: var(--rad-muted);

    text-align: center;

    font-size: 14px;

    line-height: 1.8;
}


/* =========================================================
   22. TABLES
   ========================================================= */

.rad-table-wrap {
    width: 100%;

    margin: 28px 0;

    overflow-x: auto;

    border: 1px solid var(--rad-border-soft);

    border-radius: 15px;
}

.rad-article table {
    width: 100%;

    border-collapse: collapse;

    min-width: 600px;

    background: #ffffff;

    font-size: 17px;
}

.rad-article th,
.rad-article td {
    padding: 13px 15px;

    border-bottom: 1px solid var(--rad-border-soft);

    text-align: right;

    line-height: 1.9;
}

.rad-article th {
    color: var(--rad-primary-dark);

    background: var(--rad-blue-light);

    font-weight: 700;
}

.rad-article tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   23. HORIZONTAL SEPARATOR
   فقط برای موارد ضروری
   ========================================================= */

.rad-article hr {
    height: 1px;

    margin: 38px 0;

    border: 0;

    background: #e5edf5;
}


/* =========================================================
   24. INLINE HIGHLIGHT
   ========================================================= */

.rad-highlight {
    padding: 2px 7px;

    color: var(--rad-primary-dark);

    background: #eef6ff;

    border-radius: 7px;

    font-weight: 700;
}


/* =========================================================
   25. SMALL INFORMATION
   ========================================================= */

.rad-meta {
    margin: 0 0 25px;

    color: var(--rad-muted);

    font-size: 14px;

    line-height: 1.8;
}


/* =========================================================
   26. MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .rad-article {
        max-width: 100%;

        padding:
            20px
            17px
            50px;

        font-size: 18px;

        line-height: 2.15;
    }


    .rad-article h1 {
        margin-bottom: 18px;

        font-size: clamp(28px, 8vw, 36px);

        line-height: 1.7;
    }


    .rad-intro {
        margin-bottom: 28px;

        font-size: 18px;

        line-height: 2.15;
    }


    .rad-article h2 {
        margin-top: 43px;
        margin-bottom: 20px;

        padding:
            12px
            17px
            12px
            14px;

        font-size: 24px;

        line-height: 1.75;

        border-radius: 14px;
    }


    .rad-article h2::before {
        top: 10px;
        bottom: 10px;

        width: 4px;
    }


    .rad-article h3 {
        margin-top: 27px;

        font-size: 20px;

        line-height: 1.8;
    }


    .rad-step-title {
        font-size: 19px;
    }


    .rad-step-number {
        font-size: 21px;
    }


    .rad-note,
    .rad-article .note,
    .rad-question,
    .rad-article .question,
    .rad-warning,
    .rad-article .warning,
    .rad-checklist,
    .rad-article .checklist {
        padding: 18px 17px;
    }


    .rad-quote,
    .rad-article .quote {
        padding: 19px 18px;

        font-size: 18px;

        line-height: 2;
    }


    .rad-checklist label,
    .rad-article .checklist label {
        font-size: 17px;

        line-height: 2;
    }


    .rad-final {
        padding: 23px 19px;

        border-radius: 20px;
    }


    .rad-brand {
        font-size: 19px;
    }


    .rad-action-title {
        font-size: 19px;
    }


    .rad-action-btn {
        padding:
            10px
            21px;

        font-size: 15px;
    }


    .rad-article table {
        font-size: 15px;
    }

}


/* =========================================================
   27. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .rad-article {
        padding-right: 14px;
        padding-left: 14px;

        font-size: 17px;
    }


    .rad-article h1 {
        font-size: 27px;
    }


    .rad-article h2 {
        font-size: 22px;
    }


    .rad-article h3 {
        font-size: 19px;
    }


    .rad-quote,
    .rad-article .quote {
        font-size: 17px;
    }

}


/* =========================================================
   28. ACCESSIBILITY
   ========================================================= */

.rad-article a:focus-visible,
.rad-article button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);

    outline-offset: 3px;

    border-radius: 8px;
}


/* =========================================================
   29. PRINT
   ========================================================= */

@media print {

    .rad-article {
        max-width: 100%;

        padding: 0;

        color: #000000;

        font-size: 14pt;
    }


    .rad-article h1,
    .rad-article h2,
    .rad-article h3,
    .rad-article p {
        color: #000000;
    }


    .rad-action-btn {
        display: none;
    }


    .rad-quote,
    .rad-article .quote {
        color: #000000;

        background: #ffffff;

        border: 1px solid #cccccc;
    }

}