/* Arabic Font Loading and Optimization */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Sans+Arabic:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Font loading optimization */
.arabic-fonts {
    font-family: 'Amiri', 'Noto Sans Arabic', 'Segoe UI Arabic', 'Tahoma', Arial, sans-serif;
    font-display: swap; /* Improves loading performance */
}

/* Preload critical Arabic fonts */
@font-face {
    font-family: 'Amiri';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/amiri/v27/J7aRnpd8CGxBHqUpvrIw74NL.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* Arabic text rendering optimization */
.arabic-text {
    font-family: 'Amiri', 'Noto Sans Arabic', 'Segoe UI Arabic', Arial, sans-serif;
    line-height: 1.8; /* Better line spacing for Arabic */
    letter-spacing: 0;
    word-spacing: 0.1em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Arabic number formatting */
.arabic-numbers {
    font-feature-settings: "lnum" 1; /* Use Latin numerals */
}

.arabic-indic-numbers {
    font-feature-settings: "onum" 1; /* Use Arabic-Indic numerals */
}

/* Arabic text selection */
.arabic-text::selection {
    background-color: #007bff;
    color: white;
}

/* Arabic text hover effects */
.arabic-text:hover {
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Responsive Arabic typography */
@media (max-width: 768px) {
    .arabic-text {
        font-size: 16px;
        line-height: 1.6;
    }
}

@media (min-width: 1200px) {
    .arabic-text {
        font-size: 18px;
        line-height: 1.8;
    }
}
