@import "../variables.css";

.invisible {
    display: none;
}

header+div.without-banner {
    margin-top: 100px;
}

.loader {
    position: absolute;
    width: 4rem;
    height: 4rem;
    z-index: 2;
}

.courses-title {
    font-size: clamp(37px, 2vw, 50px);
    font-weight: 700;
    margin-bottom: 40px;
}

.courses-categories {
    margin-bottom: 50px;
    border-radius: 20px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.courses-pagination {
    display: flex;
    gap: 3px;
}

.sort-courses {
    width: 235px;
    height: fit-content;
}

.sort-header {
    font-weight: 600;
}

.search-input-container,
.search-themes-container {
    position: relative !important;
}

.page-link {
    color: black;
}

.page-link:hover {
    color: #2caaa4;
    cursor: pointer;
}

.page-link:focus {
    box-shadow: none;
    color: #2caaa4;
}

.cross-icon {
    position: absolute !important;
    z-index: 1;
    right: 30px;
    top: 11px;
    background: transparent url(../../images/xMark.svg) center/0.6em auto no-repeat;
    border: 0;
    cursor: pointer;
    width: 30px;
    height: 15px;
    border-right: 1px solid #c0c0c0;
}

.img-computer-container {
    width: 100px;
    height: 86px;
    margin-left: 20px;
}

.img-computer {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    justify-self: end;
}

.container-courses {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 50px;
    position: relative;
    margin-bottom: 38px;
    min-height: 80px;
}

.course-faces {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: fit-content;
    gap: 20px;
}

.description-course {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.no-courses-found {
    width: 75%;
    text-align: center;
    align-self: center;
}

.black-empty-button {
    background-color: #F4F4F4 !important;
    border: none !important;
    border-radius: 30px !important;
}

.black-empty-button::after {
    border: none !important;
    background: linear-gradient(90deg, #38C4BD 0%, #2CAAA4 100%) !important;
    border-radius: 30px !important;
}

.more-courses-button {
    color: rgb(0, 0, 0);
    border-radius: 10px;
    border: 1px solid #434343;
    background-color: #fff;
    width: 260px;
    height: 60px;
    justify-self: end;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.more-courses-button:not(:disabled, [data-disabled="true"]):hover {
    background: var(--gradient-1-90deg);
    color: #ffffff;
    border: none;
}

.more-courses-button-disabled {
    border: none;
    background-color: #F6F7F5;
    color: #C0C0C0;
}

.reset-filter-button {
    border-radius: 10px;
    border: 1px solid #434343;
    background-color: #fff;
    width: 260px;
    height: 60px;
    justify-self: end;
}

.courses-pagination-wrapper {
    display: grid;
    grid-template-columns: 2.8fr 1fr;
    align-items: center;
    justify-items: end;
}

.courses-pagination,
.add {
    margin-left: auto;
}

.filter-courses-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: sticky;
    bottom: 0;
    background: #fff;
    outline: 0;
    padding: 1rem;
    width: 499px;
    box-shadow: 1px 9px 22px 0px #00000040;
    margin-inline: -1rem;
    border-bottom-left-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
}

.filter-courses-modal-buttons button {
    max-width: 200px;
    width: 100%;
}

.course-face {
    background-color: #f4f4f4;
    border-radius: 20px;
    height: 230px;
    box-sizing: border-box;
    padding: 20px 30px 20px 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease;
}

.course-info {
    width: 420px;
    display: grid;
    grid-template-columns: 8fr 1fr;
}

.course-info-text {
    font-size: 16px;
    line-height: 20px;
    margin-bottom: 20px;
}

.course-link {
    all: unset;
    background: linear-gradient(to left, #722AED, #A465DA);
    font-size: 20px;
    color: #FFFFFF;
    width: 326px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    p {
        margin: 0;
    }
}

.course-duration {
    font-size: 14px;
    margin-top: auto;
    border-top: 1px solid #7B7B7B;
    padding-top: 5px;
}

.course-duration p {
    margin-bottom: 0;
}

.course-face:hover {
    transform: scale(1.03);
}

.course-face,
.course-face:hover,
.course-face:active {
    text-decoration: none;
    color: #212529;
}

.course-face-skeleton {
    background-color: #f4f4f4;
    border-radius: 20px;
    height: 350px;
    width: 480px;
    position: relative;
}

.course-face-skeleton::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 20px;
    width: 100%;
    height: 100%;
    background-color: #eeeeee;
    clip-path: inset(0 100% 0 0);
    z-index: 10;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        clip-path: inset(0 100% 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

.themes {
    margin-top: 20px;
    height: 190px;
    overflow-y: auto;
    padding-left: 10px;
}

.button-container {
    margin-left: 57%;
}

.course-tab-header {
    font-weight: 600;
    font-size: 23px;
    line-height: 30px;
}

.mobile-sort-container {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.form-check-input:checked {
    background-color: #2caaa4;
    border-color: #2caaa4;
}

.form-check-input:focus {
    box-shadow: none;
}

.form-check-input:hover {
    border-color: #2caaa4;
    border-width: 4px !important;
}

.form-check-label {
    user-select: none;
}

.search-input {
    background-color: #fff !important;
}

.mobile-search-input {
    margin-left: auto;
}

.mobile-toggle-search-btn {
    background-color: #f4f4f4;
    border-radius: 10px;
    padding: 7px 17px 7px 17px;
    cursor: pointer;
    margin-left: auto;
    position: relative;
}

.search-button {
    position: absolute !important;
    z-index: 1;
    right: 10px;
    top: 11px;
    background: transparent url(../../images/search.svg) center/0.7em auto no-repeat;
    border: 0;
    cursor: pointer;
    width: 15px;
    height: 15px;
}

.toggle-indicator {
    position: absolute;
    top: -5px;
    background-color: #2caaa4;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    left: 30px;
}

.active-category {
    border: none !important;
    background: linear-gradient(90deg, #38C4BD 0%, #2CAAA4 100%) !important;
}

.feedback {
    padding: 0 !important;
    margin: 90px 0 65px 0 !important;
}

.modal-content {
    border: none;
    border-radius: 10px;
}

.btn-light {
    border-radius: 46px;
    font-size: 14px;
}

.mobile-toggle-search-btn {
    border-radius: 46px;
}

@keyframes leftToRight {
    to {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .mobile-toggle-search-btn {
        display: none;
    }
}

@media (max-width: 1399px) {
    .container-courses {
        gap: 30px;
    }

    .button-container {
        margin-top: -200px;
    }

    .course-info {
        width: 390px;
    }

    .course-tab-header {
        font-size: 21px;
    }

    .course-face {
        padding: 20px;
    }

    .course-face-skeleton {
        width: 430px;
    }
}

@media (max-width: 1279px) {
    .course-faces {
        display: flex;
        flex-direction: column;
        justify-content: start;
        gap: 20px;
    }

    .course-face {
        height: 250px;
        padding: 30px;
    }

    .course-tab-header {
        font-size: 23px;
    }

    .course-info {
        width: 100%;
    }

    .course-face-skeleton {
        height: 350px;
    }

    .course-face,
    .course-face-skeleton {
        width: 780px;
    }
}

@media (max-width: 1199px) {

    .course-face,
    .course-face-skeleton {
        width: 600px;
    }
}

@media (min-width: 992px) {
    .mobile-sort-container {
        display: none;
    }
}

@media (max-width: 991px) {
    .container-courses {
        justify-content: center;
    }

    .container-courses {
        flex-direction: column;
    }

    .loader {
        left: 50%;
    }

    .courses-pagination-wrapper {
        grid-template-columns: 1.5fr 1fr;
    }

    .course-faces {
        width: 100%;
    }

    .button-container {
        margin-left: 0;
        display: flex;
        justify-content: center;
    }

    .sort-courses,
    .courses-categories {
        display: none;
    }

    .course-face,
    .course-face-skeleton {
        width: 100%;
    }

    header+div.without-banner {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-search-input {
        width: 0;
    }

    .mobile-search-input {
        display: none;
    }

    #search-toggle:checked~.mobile-search-input {
        display: flex;
        animation: leftToRight 0.8s ease forwards;
    }

    #search-toggle:checked~.mobile-toggle-search-btn,
    #search-toggle:checked~.btn-light,
    #search-toggle:checked~.dropdown {
        display: none;
    }

    .courses-pagination,
    .add {
        margin-inline: auto;
    }

    .courses-pagination-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: center;
        row-gap: 20px;
    }

    .more-courses-button {
        justify-self: center;
        height: 50px;
    }
}

@media (max-width: 575px) {
    .filter-courses-modal-buttons {
        width: calc(100vw - 1.1rem);
        background-clip: unset;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 520px) {
    .more-courses-button {
        width: 100%;
    }
}

@media (max-width: 500px) {
    .img-computer-container {
        width: 56px;
        height: 49px;
        margin-left: 10px;
    }

    .container-courses {
        margin-bottom: 30px;
    }

    .course-info-text {
        margin-bottom: 10px;
    }

    .course-duration {
        border: none;
    }

    .course-faces {
        gap: 10px;
    }

    .course-face {
        gap: 0;
        height: 150px;
        padding: 10px;
        box-sizing: border-box;
    }

    .course-face-skeleton {
        height: 150px;
    }

    .course-tab-header {
        font-size: 16px;
        line-height: 20px;
    }

    .apply-button,
    .reset-filter-button {
        height: 40px;
    }
}

@media (max-width: 390px) {
    .mobile-sort-container {
        gap: 10px;
    }

    .dropdown-toggle,
    .btn-light {
        font-size: 12px;
    }

    .mobile-toggle-search-btn {
        padding: 4px 12px 4px 12px;
    }

    .course-info-text {
        font-size: 12px;
    }

    .course-tab-header {
        font-size: 17px;
    }

    .course-duration {
        font-size: 12px;
    }

    .course-duration b {
        font-weight: 500;
    }

    .contacts-button {
        width: 100% !important;
        margin: 0 auto;
    }
}

@media (max-width: 350px) {
    .course-face {
        height: 170px;
    }

    .mobile-sort-container {
        gap: 5px;
    }
}