/* Import Just font */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;700&display=swap');
/* Import Vazir font for RTL */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font/dist/font-face.css');
/* Import FontAwesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css');

/* Use Jost for non-RTL */
body {
    font-family: 'Jost', sans-serif;
    background: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

[dir="rtl"] body {
    font-family: "Vazir", 'Jost', sans-serif;
}

/* Search Form Styles */
.direction-en {
    direction: ltr;
}
.direction-fa {
    direction: rtl;
}
.home-search-form {
    width: 100%;
    margin-top: 1rem;
}
@media (min-width: 768px) {
    .home-search-form {
         max-width: 50%;
         margin-left: auto;
         margin-right: auto;
    }
}
.home-search-form .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
}
.home-search-form .form-control {
    border: none;
    box-shadow: none;
    border-radius: 50px 0 0 50px;
    padding: 12px 15px;
}
.home-search-form .form-control:focus {
    outline: none;
    box-shadow: none;
}
.home-search-form .btn {
    border: none;
    border-radius: 0 50px 50px 0;
    background-color: rgb(13, 110, 253);
    color: #fff;
    padding: 0 15px;
}
.home-links {
    padding: 20px 0;
}
.home-link {
    display: inline-block;
    background-color: #f1f1f1;
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    margin: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.home-link:hover {
    background-color: #ddd;
    transform: translateY(-2px);
}

/* Top Bar */
.top-bar {
    background-color: #222222;
    height: 40px;
    color: #fff;
    display: flex;
    align-items: center;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-title a {
    font-size: 10px;
    font-weight: normal;
    color: #fff;
    text-decoration: none;
}
.top-bar-right {
    display: flex;
    align-items: center;
}
.top-bar-lang .lang-link {
    font-size: 10px;
    font-weight: normal;
    color: #fff;
    text-decoration: none;
}
.top-bar-lang .lang-link:hover {
    text-decoration: underline;
}
.top-bar-social .social-btn {
    color: #fff;
    margin: 0 5px;
    text-decoration: none;
}
.top-bar-social .social-btn:hover {
    color: #ccc;
}
.top-bar-separator {
    color: #fff;
}

/* Header / Below Top Bar */
.header-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 65px;
}
.navbar-nav {
    padding-inline-start: 0px;
}
.navbar-brand img {
    margin-right: 8px;
    margin-left: 8px;
}
.header-menu .nav-link {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    color: #222;
    text-decoration: none;
    margin-right: 6px;
    margin-left: 6px;
}
.header-menu .nav-link:hover {
    text-decoration: none;
    color: #0067DA;
}
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: row !important;
    }
}

/* Search Page */
.search-header {
    margin-bottom: 30px;
}
.search-container {
    display: flex;
    gap: 20px;
}
.filters {
    max-width: 300px;
    min-width: 250px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.results {
    flex: 1;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    width: 100%;
    max-width: 700px;
    margin: auto;
}
.card:hover {
    transform: translateY(-5px);
}
.card-body {
    padding: 20px;
}
.card-title {
    font-size: 22px;
    font-weight: bold;
}
.card-text {
    font-size: 16px;
    color: #666;
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }
    .filters {
        width: 100%;
    }
}

/* Footer */
.custom-footer {
    background-color: #222222;
    height: 70px;
    color: #fff;
    padding-top: 10px;
    display: flex;
    align-items: center;
}
.custom-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.footer-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}
.footer-menu ul li {
    display: inline;
    margin-right: 15px !important;
}
.footer-menu ul li a {
    font-size: 14px;
    font-weight: normal;
    color: #fff;
    text-decoration: none;
}
.footer-menu ul li a:hover {
    color: #0067DA;
    text-decoration: none;
}
.footer-copy p {
    margin: 0;
    font-size: 13px;
    color: #999;
}

/* Fix modal and alert close button alignment */
[dir="rtl"] .btn-close {
    margin-right: auto !important;
    margin-left: 10px !important;
}
[dir="ltr"] .btn-close {
    margin-left: auto !important;
    margin-right: 10px !important;
}

@media (max-width: 768px) {
    .filters {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        padding: 20px;
        overflow-y: auto;
        z-index: 1050;
    }
    .filters.show {
        display: block;
    }
    .filter-toggle {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
}
@media (min-width: 769px) {
    .filter-toggle {
        display: none;
    }
}

.export-btn {
    transition: all 0.2s ease-in-out;
    padding: 6px 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}
.export-btn:hover {
    transform: scale(1.1);
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
}

.table-container table {
    width: 100%;
}

.table-container table th:nth-child(2),
.table-container table td:nth-child(2) {
    width: 20%;
    min-width: 100px;
}

[dir="rtl"] .ais-RefinementList-checkbox {
    margin: 0 0 0 .5rem;
}
[dir="rtl"] .ais-ToggleRefinement-count, [dir="rtl"] .ais-RefinementList-count {
    margin-right: 0.5rem;
}

.fixed-width-badge {
    min-width: 55px;
    display: inline-block;
    text-align: center;
}


#pieChart {
    height: auto;
    max-height: 400px;
}

