/* arabic-fonts.css - Arabic typography and RTL styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600;700;800&family=Scheherazade+New:wght@400;500;600;700&display=swap');

/* Arabic Font Classes */
.arabic-font-sans {
    font-family: 'Noto Sans Arabic', sans-serif;
}

.arabic-font-serif {
    font-family: 'Scheherazade New', serif;
}

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

/* Arabic Typography Scale */
.text-arabic-xs {
    font-size: 0.75rem;
    line-height: 1.5;
}

.text-arabic-sm {
    font-size: 0.875rem;
    line-height: 1.6;
}

.text-arabic-base {
    font-size: 1rem;
    line-height: 1.7;
}

.text-arabic-lg {
    font-size: 1.125rem;
    line-height: 1.7;
}

.text-arabic-xl {
    font-size: 1.25rem;
    line-height: 1.6;
}

.text-arabic-2xl {
    font-size: 1.5rem;
    line-height: 1.5;
}

.text-arabic-3xl {
    font-size: 2rem;
    line-height: 1.3;
}

/* Font Weights */
.font-thin {
    font-weight: 100;
}

.font-light {
    font-weight: 300;
}

.font-regular {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

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

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

.font-extrabold {
    font-weight: 800;
}

/* Letter Spacing for Arabic */
.ar-tight {
    letter-spacing: -0.5px;
}

.ar-normal {
    letter-spacing: normal;
}

.ar-wide {
    letter-spacing: 0.5px;
}

/* Line Heights for Arabic Text */
.leading-ar-tight {
    line-height: 1.3;
}

.leading-ar-normal {
    line-height: 1.6;
}

.leading-ar-relaxed {
    line-height: 1.8;
}

.leading-ar-loose {
    line-height: 2;
}

/* Text Alignment RTL */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
    text-align-last: right;
}

/* Arabic Lists */
.arabic-list {
    list-style-type: arabic-indic;
    padding-right: 1.5rem;
    margin-right: 0;
}

.arabic-list-decimal {
    list-style-type: decimal;
    list-style-position: outside;
    padding-right: 1.5rem;
}

/* Arabic Quotes */
.arabic-quote {
    font-family: 'Scheherazade New', serif;
    font-style: italic;
    quotes: "\201D" "\201C" "\2018" "\2019";
}

.arabic-quote:before {
    content: open-quote;
}

.arabic-quote:after {
    content: close-quote;
}

/* Arabic Numbers */
.arabic-numbers {
    font-family: 'Noto Sans Arabic', sans-serif;
    font-feature-settings: "numr";
}

/* Headings with Arabic Fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Scheherazade New', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

/* Paragraphs */
p {
    font-family: 'Noto Sans Arabic', sans-serif;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
    text-align-last: right;
}

/* Links */
a {
    font-family: 'Noto Sans Arabic', sans-serif;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Buttons */
.btn-arabic {
    font-family: 'Noto Sans Arabic', sans-serif;
    font-weight: 500;
    letter-spacing: normal;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Form Elements */
input, textarea, select {
    font-family: 'Noto Sans Arabic', sans-serif;
    text-align: right;
    direction: rtl;
}

::placeholder {
    font-family: 'Noto Sans Arabic', sans-serif;
    text-align: right;
    direction: rtl;
    opacity: 0.7;
}

/* Arabic Table */
.arabic-table {
    font-family: 'Noto Sans Arabic', sans-serif;
    border-collapse: collapse;
    width: 100%;
    text-align: right;
}

.arabic-table th {
    font-weight: 600;
    background-color: #f8f9fa;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.arabic-table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

/* Arabic Modal */
.arabic-modal .modal-header {
    text-align: right;
}

.arabic-modal .modal-body {
    text-align: right;
    direction: rtl;
}

/* Arabic Card */
.arabic-card {
    text-align: right;
    direction: rtl;
}

.arabic-card .card-title {
    font-family: 'Scheherazade New', serif;
    font-weight: 700;
}

.arabic-card .card-text {
    font-family: 'Noto Sans Arabic', sans-serif;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    .text-arabic-3xl {
        font-size: 1.75rem;
    }
    
    .text-arabic-2xl {
        font-size: 1.25rem;
    }
}

/* Print Styles for Arabic */
@media print {
    body {
        font-family: 'Noto Sans Arabic', sans-serif;
        line-height: 1.6;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-family: 'Scheherazade New', serif;
        page-break-after: avoid;
    }
    
    p {
        text-align: justify;
        text-align-last: right;
        orphans: 3;
        widows: 3;
    }
}

/* Arabic Text Shadows for Readability */
.text-shadow-ar {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Arabic Text Selection */
::selection {
    background-color: #3498db;
    color: white;
}

::-moz-selection {
    background-color: #3498db;
    color: white;
}

/* Arabic Direction Utilities */
.d-initial {
    direction: initial;
}

.d-ltr {
    direction: ltr;
}

.d-rtl {
    direction: rtl;
}

/* Float for RTL */
.float-start {
    float: right;
}

.float-end {
    float: left;
}

/* Margin and Padding Utilities for RTL */
.me-1 {
    margin-left: 0.25rem;
    margin-right: 0 !important;
}

.ms-1 {
    margin-right: 0.25rem;
    margin-left: 0 !important;
}

.me-2 {
    margin-left: 0.5rem;
    margin-right: 0 !important;
}

.ms-2 {
    margin-right: 0.5rem;
    margin-left: 0 !important;
}

/* Arabic Text Overflow */
.text-truncate-ar {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Arabic Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}