/* Lahzeh font + typography (https://fontiran.com/fonts/lahzeh)
 *
 * Loaded AFTER next.css, so the rules here win. Switches the site base font to Lahzeh,
 * registers all 9 weights, assigns weights by role, and increases line spacing for Persian
 * readability. Falls back to IRANSans/tahoma if a file is missing; FA icons are untouched.
 */

/* ============ @font-face — all weights (woff2 + woff) ============ */
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:100;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-Thin.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-Thin.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:200;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-ExtraLight.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-ExtraLight.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:300;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-Light.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-Light.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-Regular.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-Regular.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-Medium.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-Medium.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-SemiBold.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-SemiBold.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-Bold.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-Bold.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:800;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-ExtraBold.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-ExtraBold.woff') format('woff')}
@font-face{font-family:'Lahzeh';font-style:normal;font-weight:900;font-display:swap;src:url('/assets/fonts/lahzeh/Lahzeh-Black.woff2') format('woff2'),url('/assets/fonts/lahzeh/Lahzeh-Black.woff') format('woff')}

/* ============ base font + readability ============ */
html,
body {
    font-family: 'Lahzeh', IRANSans, tahoma;
}
body {
    line-height: 1.8;                  /* roomier default for Persian text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0;
}

/* ============ weights by role ============ */
/* Headings — heavier for a clear hierarchy (utility classes like .font-bold still win). */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.55; }
h1 { font-weight: 800; }

/* Common helper classes used across the theme. */
.font-text-bold   { font-weight: 700; }
.font-text-medium { font-weight: 500; }

/* Buttons / nav read better a touch heavier. */
button, .btn, nav a { font-weight: 500; }

/* ============ reading content — generous spacing ============ */
p { line-height: 2; }

.html-editor,
.b-article {
    line-height: 2.1;
    font-size: 1.03rem;
}
.html-editor p,
.b-article p { margin-bottom: 1em; }

.html-editor li,
.b-article li { line-height: 2; margin-bottom: .4em; }

.html-editor h2, .b-article h2,
.html-editor h3, .b-article h3,
.html-editor h4, .b-article h4 {
    font-weight: 800;
    line-height: 1.6;
    margin-top: 1.6em;
    margin-bottom: .6em;
}

/* ============ course page — extra line spacing for readability ============ */
/* #description-section also carries .html-editor, whose next.css rule sets
 * `line-height:1.8 !important`. An ID selector + !important outranks that class,
 * so these win and the roomy spacing actually shows on the course description. */
#description-section,
#description-section.html-editor {
    line-height: 2.3 !important;
    font-size: 1.05rem;
}
#description-section p,
#description-section li,
#description-section span,
#description-section div {
    line-height: 2.3 !important;
}
#description-section p,
#description-section li {
    margin-bottom: 1.1em;
}
/* loose text broken only by <br> (no <p>): give each break real breathing room */
#description-section br {
    display: block;
    margin-bottom: 1em;
    content: "";
}
#description-section h2,
#description-section h3,
#description-section h4 {
    line-height: 1.7 !important;
    margin-top: 1.6em;
    margin-bottom: .6em;
}

/* course comments (.description) were a tight 1.25–1.5rem */
.description { line-height: 1.95; }
.description p { line-height: 1.95; margin-bottom: .3em; }

/* ============ Persian digits ============ */
/* Lahzeh ships Latin digits; the old base font (IRANSans FaNum) drew 0-9 as Persian
 * glyphs. Overlay IRANSans-FaNum onto the SAME 'Lahzeh' family for ONLY the digit
 * codepoints (U+0030-0039) so every number renders Persian while letters stay Lahzeh.
 * Defined last → first checked for those codepoints (CSS Fonts unicode-range ordering). */
@font-face{
    font-family:'Lahzeh';
    font-style:normal;
    font-weight:400;
    font-display:swap;
    unicode-range:U+0030-0039;
    src:url('/assets/fonts/iransans/woff2/IRANSansWeb(FaNum).woff2') format('woff2'),
        url('/assets/fonts/iransans/woff/IRANSansWeb(FaNum).woff') format('woff');
}
@font-face{
    font-family:'Lahzeh';
    font-style:normal;
    font-weight:700;
    font-display:swap;
    unicode-range:U+0030-0039;
    src:url('/assets/fonts/iransans/woff2/IRANSansWeb(FaNum)_Bold.woff2') format('woff2'),
        url('/assets/fonts/iransans/woff/IRANSansWeb(FaNum)_Bold.woff') format('woff');
}

/* ============ top navigation — keep it on ONE line ============ */
/* Lahzeh is a touch wider than IRANSans, so the logged-in main menu wrapped to two
 * lines (notably on ~10" tablets). Keep the top row single-line and tighten it slightly
 * in the tablet/small-desktop band. Only targets the top-level row, not the dropdowns. */
header .nav-menu > ul { flex-wrap: nowrap; }
header .nav-menu > ul > li > a { white-space: nowrap; }

@media (min-width: 768px) and (max-width: 1279px) {
    header .nav-menu > ul > li > a {
        font-size: .9rem;
        padding-left: .45rem;
        padding-right: .45rem;
    }
    header .nav-menu > ul > li > a .fa-angle-down { margin-right: .2rem; }
}
