/* Persian Fonts CSS - Comprehensive Font Face Declarations */

/* ========================================
   Vazir Font Family
   ======================================== */

/* Vazir Regular */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2'),
         url('../fonts/vazir/fonts/webfonts/Vazirmatn-Regular.woff') format('woff'),
         url('../fonts/vazir/fonts/ttf/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Vazir Bold */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2'),
         url('../fonts/vazir/fonts/webfonts/Vazirmatn-Bold.woff') format('woff'),
         url('../fonts/vazir/fonts/ttf/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Vazir Light */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/fonts/webfonts/Vazirmatn-Light.woff2') format('woff2'),
         url('../fonts/vazir/fonts/webfonts/Vazirmatn-Light.woff') format('woff'),
         url('../fonts/vazir/fonts/ttf/Vazirmatn-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Vazir Medium */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2'),
         url('../fonts/vazir/fonts/webfonts/Vazirmatn-Medium.woff') format('woff'),
         url('../fonts/vazir/fonts/ttf/Vazirmatn-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Vazir Thin */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/fonts/webfonts/Vazirmatn-Thin.woff2') format('woff2'),
         url('../fonts/vazir/fonts/webfonts/Vazirmatn-Thin.woff') format('woff'),
         url('../fonts/vazir/fonts/ttf/Vazirmatn-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   Shabnam Font Family
   ======================================== */

/* Shabnam Regular */
@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/shabnam/dist/Shabnam.woff2') format('woff2'),
         url('../fonts/shabnam/dist/Shabnam.woff') format('woff'),
         url('../fonts/shabnam/dist/Shabnam.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Shabnam Bold */
@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/shabnam/dist/Shabnam-Bold.woff2') format('woff2'),
         url('../fonts/shabnam/dist/Shabnam-Bold.woff') format('woff'),
         url('../fonts/shabnam/dist/Shabnam-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Shabnam Light */
@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/shabnam/dist/Shabnam-Light.woff2') format('woff2'),
         url('../fonts/shabnam/dist/Shabnam-Light.woff') format('woff'),
         url('../fonts/shabnam/dist/Shabnam-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Shabnam Medium */
@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/shabnam/dist/Shabnam-Medium.woff2') format('woff2'),
         url('../fonts/shabnam/dist/Shabnam-Medium.woff') format('woff'),
         url('../fonts/shabnam/dist/Shabnam-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Shabnam Thin */
@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/shabnam/dist/Shabnam-Thin.woff2') format('woff2'),
         url('../fonts/shabnam/dist/Shabnam-Thin.woff') format('woff'),
         url('../fonts/shabnam/dist/Shabnam-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   Font Stacks and Utilities
   ======================================== */

/* Primary Persian Font Stack */
.persian-font {
    font-family: 'Vazir', 'Shabnam', 'Tahoma', 'Arial', sans-serif;
}

/* Secondary Persian Font Stack */
.persian-font-secondary {
    font-family: 'Shabnam', 'Vazir', 'Tahoma', 'Arial', sans-serif;
}

/* Mixed Content Font Stack (Persian + English) */
.mixed-font {
    font-family: 'Vazir', 'Inter', 'Roboto', 'Arial', sans-serif;
}

/* ========================================
   RTL Layout Utilities
   ======================================== */

/* RTL Text Direction */
.rtl {
    direction: rtl;
    text-align: right;
}

/* LTR Text Direction */
.ltr {
    direction: ltr;
    text-align: left;
}

/* Mixed Content Direction */
.mixed-content {
    unicode-bidi: plaintext;
}

/* ========================================
   Typography Classes
   ======================================== */

/* Persian Headings */
.persian-h1 {
    font-family: 'Vazir', 'Shabnam', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.2;
    direction: rtl;
    text-align: right;
}

.persian-h2 {
    font-family: 'Vazir', 'Shabnam', sans-serif;
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.3;
    direction: rtl;
    text-align: right;
}

.persian-h3 {
    font-family: 'Vazir', 'Shabnam', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1.4;
    direction: rtl;
    text-align: right;
}

/* Persian Body Text */
.persian-body {
    font-family: 'Shabnam', 'Vazir', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    letter-spacing: 0.02em;
}

/* Persian Small Text */
.persian-small {
    font-family: 'Shabnam', 'Vazir', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* ========================================
   Responsive Typography
   ======================================== */

@media (max-width: 768px) {
    .persian-h1 {
        font-size: 2rem;
    }
    
    .persian-h2 {
        font-size: 1.75rem;
    }
    
    .persian-h3 {
        font-size: 1.25rem;
    }
    
    .persian-body {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .persian-h1 {
        font-size: 1.75rem;
    }
    
    .persian-h2 {
        font-size: 1.5rem;
    }
    
    .persian-h3 {
        font-size: 1.125rem;
    }
    
    .persian-body {
        font-size: 0.85rem;
    }
}

/* ========================================
   Form Elements
   ======================================== */

/* Persian Form Inputs */
.persian-input {
    font-family: 'Vazir', 'Shabnam', sans-serif;
    direction: rtl;
    text-align: right;
    font-size: 1rem;
    line-height: 1.5;
}

/* Persian Form Labels */
.persian-label {
    font-family: 'Vazir', 'Shabnam', sans-serif;
    direction: rtl;
    text-align: right;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Persian Buttons */
.persian-button {
    font-family: 'Vazir', 'Shabnam', sans-serif;
    direction: rtl;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
}

/* ========================================
   Navigation Elements
   ======================================== */

/* Persian Navigation */
.persian-nav {
    font-family: 'Vazir', 'Shabnam', sans-serif;
    direction: rtl;
}

.persian-nav ul {
    padding-right: 0;
    padding-left: 0;
    list-style: none;
}

.persian-nav li {
    float: right;
    margin-left: 1rem;
    margin-right: 0;
}

/* ========================================
   Layout Utilities
   ======================================== */

/* RTL Flexbox */
.rtl-flex {
    display: flex;
    flex-direction: row-reverse;
}

.rtl-flex-item {
    margin-left: 0;
    margin-right: 1rem;
}

/* RTL Grid */
.rtl-grid {
    display: grid;
    direction: rtl;
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Font Loading Optimization */
.font-loading {
    font-display: swap;
}

/* Preload Critical Fonts */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/vazir/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+2E42, U+2E43;
}

/* ========================================
   Accessibility
   ======================================== */

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .persian-font {
        font-weight: 500;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .persian-font {
        font-display: swap;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .persian-font {
        font-family: 'Vazir', 'Shabnam', serif;
    }
    
    .persian-body {
        font-size: 12pt;
        line-height: 1.6;
    }
}
