/* Persian Typography Enhancements for Passin.ir */

/* Persian Text Direction and Alignment */
.persian-content {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
}

/* Persian Paragraphs */
.persian-content p {
    margin-bottom: 1.2em;
    line-height: 1.8;
    text-align: justify;
    text-justify: inter-word;
}

/* Persian Headings */
.persian-content h1,
.persian-content h2,
.persian-content h3,
.persian-content h4,
.persian-content h5,
.persian-content h6 {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.8em;
    text-align: right;
}

/* Persian Lists */
.persian-content ul,
.persian-content ol {
    padding-right: 1.5em;
    padding-left: 0;
    text-align: right;
}

.persian-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

/* Persian Tables */
.persian-content table {
    direction: rtl;
    text-align: right;
}

.persian-content th,
.persian-content td {
    text-align: right;
    padding: 0.75em;
    border: 1px solid #dee2e6;
}

/* Persian Forms */
.persian-content .form-control,
.persian-content input,
.persian-content textarea,
.persian-content select {
    text-align: right;
    direction: rtl;
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
}

/* Persian Buttons */
.persian-content .btn {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 500;
}

/* Persian Navigation */
.persian-content .nav,
.persian-content .navbar {
    direction: rtl;
}

.persian-content .nav-link {
    text-align: right;
    padding-right: 1rem;
    padding-left: 0.5rem;
}

/* Persian Cards */
.persian-content .card {
    text-align: right;
}

.persian-content .card-title {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 700;
    text-align: right;
}

.persian-content .card-text {
    text-align: justify;
    line-height: 1.8;
}

/* Persian Alerts */
.persian-content .alert {
    text-align: right;
    direction: rtl;
}

/* Persian Modals */
.persian-content .modal {
    direction: rtl;
}

.persian-content .modal-header {
    text-align: right;
}

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

/* Persian Dropdowns */
.persian-content .dropdown-menu {
    text-align: right;
    direction: rtl;
}

.persian-content .dropdown-item {
    text-align: right;
    padding-right: 1rem;
    padding-left: 0.5rem;
}

/* Persian Breadcrumbs */
.persian-content .breadcrumb {
    direction: rtl;
    text-align: right;
}

.persian-content .breadcrumb-item {
    text-align: right;
}

/* Persian Pagination */
.persian-content .pagination {
    direction: rtl;
    justify-content: flex-end;
}

.persian-content .page-link {
    text-align: center;
}

/* Persian Badges */
.persian-content .badge {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 500;
}

/* Persian Progress Bars */
.persian-content .progress {
    direction: rtl;
}

/* Persian Tooltips */
.persian-content .tooltip {
    direction: rtl;
    text-align: right;
}

/* Persian Popovers */
.persian-content .popover {
    direction: rtl;
    text-align: right;
}

/* Persian Typography Utilities */
.text-persian {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    direction: rtl;
    text-align: right;
}

.text-persian-justify {
    text-align: justify;
    text-justify: inter-word;
}

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

.text-persian-left {
    text-align: left;
}

/* Persian Font Weights */
.font-yekan-light {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 300;
}

.font-yekan-normal {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 400;
}

.font-yekan-medium {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 500;
}

.font-yekan-bold {
    font-family: 'Yekan', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 700;
}

/* Persian Line Heights */
.line-height-persian {
    line-height: 1.8;
}

.line-height-persian-tight {
    line-height: 1.4;
}

.line-height-persian-loose {
    line-height: 2.0;
}

/* Persian Letter Spacing */
.letter-spacing-persian {
    letter-spacing: 0.3px;
}

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

.letter-spacing-persian-tight {
    letter-spacing: 0.1px;
}

/* Responsive Persian Typography */
@media (max-width: 768px) {
    .persian-content {
        font-size: 13px;
    }
    
    .persian-content h1,
    .persian-content h2,
    .persian-content h3,
    .persian-content h4,
    .persian-content h5,
    .persian-content h6 {
        font-size: 1.1em;
    }
    
    .persian-content p {
        line-height: 1.7;
    }
}

@media (min-width: 1200px) {
    .persian-content {
        font-size: 15px;
    }
    
    .persian-content h1,
    .persian-content h2,
    .persian-content h3,
    .persian-content h4,
    .persian-content h5,
    .persian-content h6 {
        font-size: 1.2em;
    }
    
    .persian-content p {
        line-height: 1.9;
    }
}

/* Print Styles for Persian */
@media print {
    .persian-content {
        font-family: 'Yekan', 'Tahoma', 'Arial', sans-serif !important;
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .persian-content h1,
    .persian-content h2,
    .persian-content h3,
    .persian-content h4,
    .persian-content h5,
    .persian-content h6 {
        font-size: 14pt;
        font-weight: 700;
    }
}
