/* Vazirmatn Font Family (existing files under static/font/fonts/webfonts) */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../font/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../font/fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../font/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../font/fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Alias 'Vazir' to Vazirmatn for compatibility */
@font-face {
    font-family: 'Vazir';
    src: url('../font/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Global Font System */
:root {
    /* Primary font family */
    --font-primary: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Monospace font for code blocks */
    --font-mono: 'Courier New', 'Courier', monospace;
    
    /* Font weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Font sizes */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;
    
    /* Line heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
}

/* Global Font Reset */
* {
    font-family: var(--font-primary);
}

html,
body {
    font-family: var(--font-primary);
    font-weight: var(--font-normal);
    font-size: var(--font-base);
    line-height: var(--line-height-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Heading Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-bold);
    line-height: var(--line-height-tight);
}

h1 {
    font-size: var(--font-4xl);
    font-weight: var(--font-extrabold);
}

h2 {
    font-size: var(--font-3xl);
    font-weight: var(--font-bold);
}

h3 {
    font-size: var(--font-2xl);
    font-weight: var(--font-bold);
}

h4 {
    font-size: var(--font-xl);
    font-weight: var(--font-semibold);
}

h5 {
    font-size: var(--font-lg);
    font-weight: var(--font-semibold);
}

h6 {
    font-size: var(--font-base);
    font-weight: var(--font-semibold);
}

/* Paragraph */
p {
    font-family: var(--font-primary);
    font-weight: var(--font-normal);
    line-height: var(--line-height-relaxed);
}

/* Links */
a {
    font-family: var(--font-primary);
}

/* Lists */
ul, ol, li {
    font-family: var(--font-primary);
}

/* Buttons */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn {
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
}

/* Form Elements */
input,
textarea,
select,
.form-control {
    font-family: var(--font-primary);
}

/* Code Blocks */
code,
pre {
    font-family: var(--font-mono);
}

/* Labels */
label {
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
}

/* Small Text */
small {
    font-family: var(--font-primary);
    font-size: var(--font-sm);
}

/* Emphasized Text */
strong, .font-bold {
    font-weight: var(--font-bold);
}

em, .font-italic {
    font-style: italic;
}

/* Text Utilities */
.text-light {
    font-weight: var(--font-light);
}

.text-normal {
    font-weight: var(--font-normal);
}

.text-medium {
    font-weight: var(--font-medium);
}

.text-semibold {
    font-weight: var(--font-semibold);
}

.text-bold {
    font-weight: var(--font-bold);
}

.text-extrabold {
    font-weight: var(--font-extrabold);
}