/* ==========================================================
   QANOONMARKAZ DOWNLOAD MODULE
   Main Download Page
   ========================================================== */


/* ==========================================================
   FONT
   ========================================================== */

@font-face {
    font-family: "Jameel Noori Nastaleeq";
    src: local("Jameel Noori Nastaleeq");
    font-display: swap;
}


/* ==========================================================
   MAIN PAGE
   ========================================================== */

.qm-download-page {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.qm-download-page *,
.qm-download-page *::before,
.qm-download-page *::after {
    box-sizing: border-box;
}


/* ==========================================================
   HERO
   ========================================================== */

.qm-download-hero {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.qm-download-hero img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
}


/* ==========================================================
   COMMON CONTAINER
   ========================================================== */

.qm-download-container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}


/* ==========================================================
   SEARCH SECTION
   ========================================================== */

.qm-download-search-section {
    width: 100%;
    padding: 25px 0;
    background: #f5f5f5;
}

.qm-download-search {
    width: 100%;
    margin: 0;
    padding: 0;
}

.qm-download-search-box {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 4px;
    overflow: hidden;
}

.qm-download-search-box i {
    flex: 0 0 auto;
    margin-left: 16px;
    margin-right: 10px;
    color: #000e36;
    font-size: 17px;
}

.qm-download-search-box input {
    flex: 1 1 auto;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    outline: 0;
    background: #ffffff;
    color: #333333;
    font-size: 15px;
    box-shadow: none;
}

.qm-download-search-box input::placeholder {
    color: #888888;
}

.qm-download-search-box button {
    flex: 0 0 auto;
    height: 50px;
    margin: 0;
    padding: 0 25px;
    border: 0;
    border-radius: 0;
    background: #000e36;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.qm-download-search-box button:hover {
    background: #e0a800;
    color: #000e36;
}


/* ==========================================================
   CATEGORY SECTION
   ========================================================== */

.qm-download-categories {
    width: 100%;
    padding: 30px 0;
    background: #ffffff;
}

.qm-download-categories h2 {
    margin: 0 0 20px;
    color: #000e36;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.4;
}

.qm-download-category-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
}


/* ==========================================================
   CATEGORY BUTTON
   ========================================================== */

.qm-download-category-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 8px 18px;

    background: #000e36;
    color: #ffffff !important;

    border: 1px solid #000e36;
    border-radius: 4px;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;

    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.qm-download-category-button:hover {
    background: #e0a800;
    color: #000e36 !important;
    border-color: #e0a800;
}


/* ==========================================================
   MAIN TWO-COLUMN LAYOUT
   ========================================================== */

.qm-download-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(260px, 0.85fr);
    gap: 30px;
    align-items: start;

    padding-top: 30px;
    padding-bottom: 50px;
}


/* ==========================================================
   MAIN CONTENT
   ========================================================== */

.qm-download-main {
    width: 100%;
    min-width: 0;
}

.qm-download-main > h2 {
    margin: 0 0 20px;
    padding-bottom: 12px;

    color: #000e36;

    border-bottom: 2px solid #e0a800;

    font-size: 25px;
    font-weight: 700;
    line-height: 1.4;
}


/* ==========================================================
   DOWNLOAD ITEM
   ========================================================== */

.qm-download-item {
    display: flex;
    align-items: flex-start;

    width: 100%;
    margin: 0 0 15px;
    padding: 18px;

    background: #ffffff;

    border: 1px solid #e2e2e2;
    border-left: 4px solid #000e36;

    border-radius: 4px;

    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.04);
}

.qm-download-item:hover {
    border-left-color: #e0a800;
}


/* ==========================================================
   SERIAL NUMBER
   ========================================================== */

.qm-download-number {
    flex: 0 0 42px;

    color: #000e36;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}


/* ==========================================================
   DOWNLOAD CONTENT
   ========================================================== */

.qm-download-content {
    flex: 1 1 auto;
    min-width: 0;
}


/* ==========================================================
   DOWNLOAD TITLE
   ========================================================== */

.qm-download-title {
    margin: 0 0 10px;

    color: #000e36;

    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.qm-download-title a {
    color: inherit;
    text-decoration: none;
}


/* ==========================================================
   DOWNLOAD ACTIONS
   ========================================================== */

.qm-download-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;

    width: 100%;

    gap: 12px 18px;

    color: #555555;

    font-size: 14px;
    line-height: 1.5;
}

.qm-download-actions > div {
    display: block;
}

.qm-download-actions .qm-download-relevant {
    margin-right: auto;
}

.qm-download-actions .qm-download-view {
    order: 3;
}


/* ==========================================================
   VIEW / DOWNLOAD BUTTON
   ========================================================== */

.qm-download-view {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 8px 16px;

    background: #000e36;
    color: #ffffff !important;

    border: 1px solid #000e36;
    border-radius: 4px;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;

    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.qm-download-view:hover {
    background: #e0a800;
    color: #000e36 !important;
    border-color: #e0a800;
}


/* ==========================================================
   SIDEBAR
   ========================================================== */

.qm-download-sidebar {
    width: 100%;
    min-width: 0;
}


/* ==========================================================
   SIDEBAR BOX
   ========================================================== */

.qm-download-sidebar-box {
    width: 100%;
    margin: 0 0 20px;
    padding: 20px;

    background: #ffffff;

    border: 1px solid #dddddd;
    border-top: 4px solid #000e36;

    border-radius: 4px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}


/* ==========================================================
   SIDEBAR HEADING
   ========================================================== */

.qm-download-sidebar-box h3 {
    margin: 0 0 15px;
    padding-bottom: 10px;

    color: #000e36;

    border-bottom: 2px solid #e0a800;

    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}


/* ==========================================================
   SIDEBAR TEXT
   ========================================================== */

.qm-download-sidebar-box p {
    margin: 0 0 15px;

    color: #555555;

    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================================
   SIDEBAR LIST
   ========================================================== */

.qm-download-sidebar-box ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.qm-download-sidebar-box li {
    margin: 0;
    padding: 0;

    border-bottom: 1px solid #eeeeee;
}

.qm-download-sidebar-box li:last-child {
    border-bottom: 0;
}

.qm-download-sidebar-box li a {
    display: block;

    padding: 9px 4px;

    color: #000e36;

    font-size: 15px;
    line-height: 1.5;

    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

.qm-download-sidebar-box li a:hover {
    padding-left: 9px;

    background: #f7f7f7;
    color: #e0a800;
}


/* ==========================================================
   SIDEBAR BUTTON
   ========================================================== */

.qm-download-sidebar-box .qm-download-view {
    width: auto;
}


/* ==========================================================
   NO DOWNLOADS MESSAGE
   ========================================================== */

.qm-no-downloads {
    width: 100%;
    margin: 0;
    padding: 15px 18px;

    background: #f7f7f7;

    border-left: 4px solid #e0a800;

    color: #666666;

    font-size: 15px;
    line-height: 1.6;
}


/* ==========================================================
   URDU CONTENT SUPPORT
   ========================================================== */

.qm-download-page .urdu,
.qm-download-page .urdu-text,
.qm-download-page [dir="rtl"] {
    font-family:
        "Jameel Noori Nastaleeq",
        "Noto Nastaliq Urdu",
        "Noto Nastaliq",
        serif;

    direction: rtl;
    text-align: right;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 900px) {

    .qm-download-layout {
        grid-template-columns: minmax(0, 1.7fr) minmax(230px, 0.8fr);
        gap: 20px;
    }

    .qm-download-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .qm-download-hero img {
        height: 260px;
    }

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {

    .qm-download-hero img {
        height: 200px;
    }


    .qm-download-search-section {
        padding: 18px 0;
    }


    .qm-download-search-box {
        min-height: auto;
        flex-wrap: wrap;
    }

    .qm-download-search-box i {
        margin-left: 12px;
    }

    .qm-download-search-box input {
        flex: 1 1 calc(100% - 50px);
        width: calc(100% - 50px);
    }

    .qm-download-search-box button {
        width: 100%;
        height: 45px;
        margin-top: 0;
    }


    .qm-download-categories {
        padding: 22px 0;
    }

    .qm-download-categories h2 {
        font-size: 22px;
    }

    .qm-download-category-list {
        gap: 8px;
    }

    .qm-download-category-button {
        min-height: 38px;
        padding: 7px 13px;
        font-size: 13px;
    }


    .qm-download-layout {
        display: block;

        padding-top: 20px;
        padding-bottom: 35px;
    }


    .qm-download-main {
        margin-bottom: 30px;
    }


    .qm-download-main > h2 {
        font-size: 22px;
    }


    .qm-download-item {
        padding: 14px;
    }


    .qm-download-number {
        flex: 0 0 32px;
        font-size: 15px;
    }


    .qm-download-title {
        font-size: 18px;
    }


    .qm-download-actions {
        display: block;
    }

    .qm-download-actions > div {
        margin-bottom: 8px;
    }

    .qm-download-actions .qm-download-view {
        margin-top: 5px;
    }


    .qm-download-sidebar {
        width: 100%;
    }


    .qm-download-sidebar-box {
        padding: 16px;
        margin-bottom: 16px;
    }


    .qm-download-sidebar-box h3 {
        font-size: 18px;
    }

}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 480px) {

    .qm-download-hero img {
        height: 160px;
    }

    .qm-download-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .qm-download-item {
        padding: 12px;
    }

    .qm-download-number {
        flex: 0 0 28px;
    }

    .qm-download-title {
        font-size: 17px;
    }

    .qm-download-view {
        width: 100%;
    }

    .qm-download-sidebar-box .qm-download-view {
        width: 100%;
    }

}

/* ==========================================================
   SINGLE DOWNLOAD PAGE
   ========================================================== */

.qm-download-single-item {
    width: 100%;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-top: 4px solid #000e36;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}


/* ==========================================================
   SINGLE TITLE
   ========================================================== */

.qm-download-single-item .qm-download-title {
    margin: 0 0 15px;
    padding-bottom: 12px;

    color: #000e36;

    border-bottom: 2px solid #e0a800;

    font-size: 28px;
    font-weight: 700;
    line-height: 1.5;
}


/* ==========================================================
   SINGLE INFORMATION
   ========================================================== */

.qm-download-single-item .qm-download-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    width: 100%;
    margin-bottom: 25px;

    gap: 12px 20px;

    color: #555555;
    font-size: 14px;
    line-height: 1.6;
}

.qm-download-single-item .qm-download-relevant {
    flex: 1 1 auto;
}


/* ==========================================================
   SINGLE CONTENT
   ========================================================== */

.qm-download-single-content {
    width: 100%;
    margin: 0 0 30px;

    color: #333333;

    font-size: 16px;
    line-height: 1.9;
}

.qm-download-single-content p {
    margin: 0 0 15px;
}

.qm-download-single-content img {
    max-width: 100%;
    height: auto;
}


/* ==========================================================
   DOWNLOAD FILE SECTION
   ========================================================== */

.qm-download-single-files {
    width: 100%;
    margin-top: 25px;
    padding-top: 20px;

    border-top: 1px solid #dddddd;
}

.qm-download-single-files h2 {
    margin: 0 0 18px;

    color: #000e36;

    font-size: 23px;
    font-weight: 700;
    line-height: 1.5;
}


/* ==========================================================
   DOWNLOAD FILE BUTTONS
   ========================================================== */

.qm-download-file-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;

    width: 100%;
}

.qm-download-file-list .qm-download-view {
    display: inline-flex !important;
    width: auto;
    min-height: 42px;

    padding: 9px 18px;

    background: #000e36;
    color: #ffffff !important;

    border: 1px solid #000e36;
    border-radius: 4px;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;

    text-decoration: none !important;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.qm-download-file-list .qm-download-view:hover {
    background: #e0a800;
    color: #000e36 !important;
    border-color: #e0a800;
}


/* ==========================================================
   SINGLE PAGE URDU CONTENT
   ========================================================== */

.qm-download-single-content,
.qm-download-single-content p,
.qm-download-single-content li {

    font-family:
        "Jameel Noori Nastaleeq",
        "Noto Nastaliq Urdu",
        "Noto Nastaliq",
        serif;
}


/* ==========================================================
   SINGLE PAGE MOBILE
   ========================================================== */

@media (max-width: 767px) {

    .qm-download-single-item {
        padding: 18px;
    }

    .qm-download-single-item .qm-download-title {
        font-size: 23px;
    }

    .qm-download-single-item .qm-download-actions {
        display: block;
        margin-bottom: 20px;
    }

    .qm-download-single-item .qm-download-actions > div {
        margin-bottom: 8px;
    }

    .qm-download-single-content {
        font-size: 15px;
        line-height: 1.8;
    }

    .qm-download-single-files h2 {
        font-size: 21px;
    }

    .qm-download-file-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .qm-download-file-list .qm-download-view {
        width: 100%;
        justify-content: center;
    }

}
/* ==========================================================
   DOWNLOAD PAGINATION
   ========================================================== */

.qm-download-pagination {
    width: 100%;
    margin: 35px 0 10px;
    text-align: center;
    direction: ltr;
}

.qm-download-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qm-download-pagination li {
    margin: 0;
    padding: 0;
}

.qm-download-pagination a,
.qm-download-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;

    border: 1px solid #000e36;
    border-radius: 4px;

    background: #ffffff;
    color: #000e36;

    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Hover */
.qm-download-pagination a:hover {
    background: #000e36;
    color: #ffffff;
}

/* Current Page */
.qm-download-pagination .current {
    background: #e0a800;
    border-color: #e0a800;
    color: #000e36;
}

/* Disabled Previous / Next */
.qm-download-pagination .dots {
    border: none;
    background: transparent;
    color: #000e36;
    min-width: 25px;
}

/* Mobile */
@media (max-width: 600px) {

    .qm-download-pagination {
        margin-top: 25px;
    }

    .qm-download-pagination ul {
        gap: 5px;
    }

    .qm-download-pagination a,
    .qm-download-pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 14px;
    }

}