@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn[wght].woff2') format('woff2 supports variations'),
        url('../fonts/Vazirmatn[wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ft-download-center';
    src: url('../fonts/ft-download-center.eot?m5kiet');
    src: url('../fonts/ft-download-center.eot?m5kiet#iefix') format('embedded-opentype'),
        url('../fonts/ft-download-center.ttf?m5kiet') format('truetype'),
        url('../fonts/ft-download-center.woff?m5kiet') format('woff'),
        url('../fonts/ft-download-center.svg?m5kiet#ft-download-center') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="ftdc-icon-"],
[class*=" ftdc-icon-"] {
    font-family: 'ft-download-center' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


.ftdc-icon-spinner:before {
    content: "\e911";
}

.ftdc-icon-spinner1:before {
    content: "\e912";
}

.ftdc-icon-spinner2:before {
    content: "\e913";
}

.ftdc-icon-file-picture:before {
    content: "\e910";
}

.ftdc-icon-file:before {
    content: "\e910";
}

.ftdc-icon-document:before {
    content: "\e910";
}

.ftdc-icon-file-image:before {
    content: "\e910";
}

.ftdc-icon-file-pdf:before {
    content: "\e904";
}

.ftdc-icon-file1:before {
    content: "\e904";
}

.ftdc-icon-file-format:before {
    content: "\e904";
}

.ftdc-icon-file-video:before {
    content: "\e905";
}

.ftdc-icon-file11:before {
    content: "\e905";
}

.ftdc-icon-document1:before {
    content: "\e905";
}

.ftdc-icon-file-camera:before {
    content: "\e905";
}

.ftdc-icon-file-zip:before {
    content: "\e900";
}

.ftdc-icon-file2:before {
    content: "\e900";
}

.ftdc-icon-document11:before {
    content: "\e900";
}

.ftdc-icon-file-compressed:before {
    content: "\e900";
}

.ftdc-icon-file-type:before {
    content: "\e900";
}

.ftdc-icon-file-format1:before {
    content: "\e900";
}

.ftdc-icon-alert-triangle:before {
    content: "\e901";
}

.ftdc-icon-book:before {
    content: "\e90b";
}

.ftdc-icon-calendar:before {
    content: "\e90c";
}

.ftdc-icon-chevron-down:before {
    content: "\e90d";
}

.ftdc-icon-chevron-left:before {
    content: "\e90e";
}

.ftdc-icon-chevron-right:before {
    content: "\e90f";
}

.ftdc-icon-chevron-up:before {
    content: "\e902";
}

.ftdc-icon-download:before {
    content: "\e903";
}

.ftdc-icon-image:before {
    content: "\e906";
}

.ftdc-icon-minus:before {
    content: "\e907";
}

.ftdc-icon-plus:before {
    content: "\e908";
}

.ftdc-icon-sliders:before {
    content: "\e909";
}

.ftdc-icon-x-circle:before {
    content: "\e90a";
}


:root {
    --color-primary: #4fb373;
    --color-secondary: #505050;
    --color-white: #ffffff;
    --color-dark: #404040;
    --color-hover: #248d49;
    --color-applied-filter: #41ba6c;
    --color-gray: #e3e3e3;
}


.filter-box {
    margin-bottom: 10px;
}

.term-item {
    padding-bottom: 5px;
}

.filter-title {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 10px;
    font-size: 16px;
    line-height: normal;
    font-weight: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.rotate-180 {
    transform: rotate(180deg);
}


.ftdc-icon-chevron-up {
    display: inline-block;
    font-size: 20px;
    transition: transform 0.3s ease;
    top: 3px;
    position: relative;
}

.ftdc-icon-chevron-up.down {
    transform: rotate(180deg);
}

.ftdc-icon-chevron-up.up {
    transform: rotate(180deg);
}

.filter-content-container {
    position: relative;
    background: var(--color-white);
}

.terms-list {
    padding: 10px;
}

.filter-box input[type="checkbox"] {
    display: none;
}

.ftdc-checkbox {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-secondary);
    background-color: var(--color-white);
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filter-box input[type="checkbox"]:checked+.ftdc-checkbox {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.ftdc-checkbox:after {
    content: '';
    position: absolute;
    top: 0px;
    left: 5px;
    width: 6px;
    height: 13px;
    border: solid var(--color-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}

.filter-box input[type="checkbox"]:checked+.ftdc-checkbox:after {
    display: block;
}


.filter-box label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.filter-box label:hover .ftdc-checkbox {
    border-color: var(--color-primary);
}

.term-item.subcats {
    display: flex;
    justify-content: space-between;
    /* flex-direction: row-reverse; */
    align-items: flex-start;
}

.term-item .subcategories {
    display: none;
    padding-bottom: 0;
    margin-bottom: 0;
    margin-right: 20px;
    width: 100%;

    gap: 5px;
}

.toggle-subcats {
    width: 100%;
}

.child-term {
    padding: 10px 0 0;
}

.term-item.subcats.open .subcategories {
    display: flex;
}

.toggle-subcategories {
    padding: 2px;
    line-height: normal;
    cursor: pointer;

}

.ftdc-icon-plus {
    font-size: 17px;
    display: block;
    transition: transform 0.3s ease;
}

.ftdc-icon-plus.down {
    transform: rotate(135deg);
}

.ftdc-icon-plus.up {
    transform: rotate(135deg);
}


.terms-list {
    padding: 10px 10px 0;
}

.filter-content-container {
    position: relative;
}

label {
    font-size: 15px;
}

.limited-height {
    max-height: 210px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.expanded {
    max-height: 1000px;
}

.ftdc-show-more,
.ftdc-show-less {
    position: absolute;
    display: flex;
    gap: 5px;
    text-align: right;
    bottom: 0;
    left: 0;
    background-color: var(--color-white);
    color: #3F51B5;
    width: 100%;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 12px !important;
    align-items: center;
}

.ftdc-show-less {
    display: none;
}


.filtered {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;

}

.applied-filter {
    background: var(--color-primary);
    height: 26px;
    color: var(--color-white);
    font-size: 16px;
    line-height: normal;
    border-radius: 15px;
    padding: 3px 15px 4px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.remove-filter {
    position: relative;
    color: var(--color-white);
    cursor: pointer;
    transform: rotate(45deg);
    font-size: 19px;

}

#clear-all-filters {
    text-decoration: none;
    color: var(--color-primary);
    font-size: 15px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
}


#downloads-sort-form {
    display: flex;
}

.downloads-list {
    margin-bottom: 35px;
}

.pagination {
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px
}

.page-numbers,
.next.page-numbers,
.page-numbers.dots {
    background: var(--color-white);
    color: var(--color-secondary);
    padding: 8px;
    line-height: normal;
    font-size: 15px;
    text-decoration: none !important;
    width: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
}

.page-numbers:hover,
.next.page-numbers:hover,
.page-numbers.dots:hover {
    background: var(--color-primary);
    color: var(--color-white) !important;

}

.next.page-numbers .ftdc-icon-chevron-up,
.prev.page-numbers .ftdc-icon-chevron-up {
    font-size: 17px;
}

a.prev.page-numbers {
    margin-left: 10px;
}

a.next.page-numbers {
    margin-right: 10px;
}

.page-numbers.current {
    background: var(--color-primary);
    color: var(--color-white);
}

.rotate-90 {
    transform: rotate(90deg);
}

.rotate-270 {
    transform: rotate(270deg);
}

.ftdc-search-input {
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid #b7b7b7 !important; 
}

.filter-search-summary {
    display: flex;
    gap: 20px;
    align-items: center;

}

select#sort-order {
    font-size: 15px;
    padding: 5px 10px;
    width: 230px;
    border: 1px solid #cfcfcf;
}

.total-posts {
    font-size: 14px;
}



#downloads-results {
    position: relative;
    padding: 10px;
    font-weight: 200;
    /*font-family: 'Vazirmatn';*/

}

.download-item {
    border: 1px solid #e1e1e1;
    background: var(--color-white);
    margin-bottom: 10px;
    display: flex;
}

.download-icon {
    background: #404040;
    color: var(--color-gray);

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    margin: 10px;
    font-size: 28px;
}

.download-title {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 0;
    font-weight: 400;
}

.download-title a {
    text-decoration: none;
    color: var(--color-primary);
}

.download-title a:hover {
    color: var(--color-hover);
}

.download-content {
    border-right: 1px solid var(--color-gray);
    padding: 15px 10px 15px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;

}

.download-description {
    font-size: 14px;
}

.download-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    align-content: center;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    /*font-family: Vazirmatn;*/
    font-weight: 200;
    color: var(--color-secondary);

}

.download-file-btn a.download-link {
    text-decoration: none;
    font-size: 20px;
    color: var(--color-primary);
    display: flex;
}

.file-article-number,
.file-date,
.file-size {
    display: flex;
    gap: 5px;
    align-items: center;
}

.file-number-text,
.file-date-text,
.file-size-text {
    padding: 0;
    margin: 0;
    position: relative;
    top: 4px;
}


.ftdc-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-gray);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.ftdc-page-title {
    font-size: 25px;
    font-weight: bold;
}



#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.ftdc-icon-spinner2 {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: spin 1s linear infinite;
    font-size: 50px;
    color: #ffffff;
}




@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loading {
    text-align: center;
    padding: 20px;
}




.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.popup-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    max-width: 70%;
    overflow: hidden;
    z-index: 1001;
}

.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    border: none;
    padding: 10px;
    font-size: 25px;
    cursor: pointer;
}

.popup-close-btn:hover {
    color: #ff0000;
}

.popup-content video {
    width: 100%;
}

.subcategories.hidden {
    display: none;
}


.subcategories {
    padding-top: 10px;
    display: none;
}

.toggle-subcategories {
    cursor: pointer;
    display: inline-block;
}


@media screen and (max-width: 768px) {
    .file-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .download-meta {
        align-items: flex-end;
        align-content: center;
    }

    .download-icon {
        max-height: 84px;
    }

    .download-content {
        gap: 10px;
    }
}