/**
 * IRANYekanX Global Typography
 * Unified font configuration for the entire project
 * Version: 1.0
 **/

/* ===== FONT FACES ===== */
@font-face {
    font-family: 'IRANYekanX';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('Webfonts/woff2/IRANYekanX-Regular.woff2') format('woff2'),
         url('Webfonts/woff/IRANYekanX-Regular.woff') format('woff');
}

@font-face {
    font-family: 'IRANYekanX';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('Webfonts/woff2/IRANYekanX-Bold.woff2') format('woff2'),
         url('Webfonts/woff/IRANYekanX-Bold.woff') format('woff');
}

/* ===== GLOBAL TYPOGRAPHY RESET ===== */
* {
    font-family: 'IRANYekanX', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body {
    font-family: 'IRANYekanX', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
}

/* ===== HEADINGS ===== */
h1, .h1 {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2, .h2 {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3, .h3 {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 700;
}

h4, .h4 {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 600;
}

h5, .h5 {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 600;
}

h6, .h6 {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 400;
}

/* ===== BODY TEXT ===== */
p, .p {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 400;
    line-height: 1.8;
}

/* ===== SPECIAL TEXT ELEMENTS ===== */
strong, b, .bold {
    font-weight: 700 !important;
}

em, i, .italic {
    font-style: normal;
    font-weight: 600;
}

small, .small {
    font-size: 0.875em;
    font-weight: 400;
}

/* ===== LINKS ===== */
a {
    font-family: 'IRANYekanX', sans-serif !important;
}

/* ===== BUTTONS ===== */
button,
.btn,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 600;
}

/* ===== FORM ELEMENTS ===== */
input,
textarea,
select,
.form-control,
.form-select {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 400;
}

label {
    font-family: 'IRANYekanX', sans-serif !important;
    font-weight: 600;
}

/* ===== PERSIAN TEXT CLASS ===== */
.persian-text,
.farsi-text,
[lang="fa"],
[dir="rtl"] {
    font-family: 'IRANYekanX', sans-serif !important;
}

/* ===== NAVIGATION ===== */
nav,
.nav,
.navbar,
.menu {
    font-family: 'IRANYekanX', sans-serif !important;
}

.nav-link,
.navbar-nav,
.menu-item {
    font-weight: 500;
}

/* ===== CARDS & COMPONENTS ===== */
.card,
.card-title,
.card-text,
.modal,
.modal-title,
.alert,
.badge {
    font-family: 'IRANYekanX', sans-serif !important;
}

.card-title {
    font-weight: 700;
}

/* ===== TABLES ===== */
table,
th,
td {
    font-family: 'IRANYekanX', sans-serif !important;
}

th {
    font-weight: 700;
}

/* ===== UTILITY CLASSES ===== */
.font-weight-light {
    font-weight: 400 !important;
}

.font-weight-normal {
    font-weight: 400 !important;
}

.font-weight-medium {
    font-weight: 600 !important;
}

.font-weight-semibold {
    font-weight: 600 !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.font-weight-heavy {
    font-weight: 700 !important;
}

/* ===== RTL SPECIFIC ADJUSTMENTS ===== */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
    letter-spacing: 0;
}

/* ===== FARSI NUMERALS (if needed) ===== */
.farsi-numbers {
    font-variant-numeric: normal;
    -moz-font-feature-settings: "ss01";
    -webkit-font-feature-settings: "ss01";
    font-feature-settings: "ss01";
}

/* Override any remaining Vazirmatn or other fonts */
[class*="vazir"],
.vazirmatn {
    font-family: 'IRANYekanX', sans-serif !important;
}
