

.mainbg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

.cata-courses {
    height: calc(100vh - 120px);
    width: 100vw;
    margin-top: 120px;
    padding-top: 5rem;
}

.realcata {
    margin: 10px 0;
    width: calc(100% - 50px);
    align-items: flex-start !important;
    justify-content: center;
    padding: 0;
    margin: 0 25px;
}

.course-filter-container {
    height: calc(100vh - 350px) !important;
    top: 0;
    flex: 1;
    position: -webkit-sticky;
    position: sticky;
    display: flex;
    gap: 2rem;
    justify-content: space-evenly;
    align-items: flex-start;
    padding: 50px;
    z-index: 3;
    transform-origin: top;
    transition: transform 2s ease, height 2s ease;
    animation: appear 5s ease ;
    background: var(--def-offbg);
    box-shadow: 5px 5px 10px var(--def-shadow-clr);
    border-radius: 15px;
}

@keyframes appear {
    0% { height: 0%;}
   100% {height: 100%}
}

.mobilemenu-filter {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    gap: 10px;
    padding: 0.2rem 1rem;
    border-radius: 2rem;
    background: var(--def-offbg);
    box-shadow: 5px 5px 10px var(--def-shadow-clr);
    z-index: 5;
}

.mobilemenu-filter .icon {
    height: auto;
    width: fit-content;
    max-width: 30px;
    border-radius: 50%;
    aspect-ratio: 1/1;
}

 .mobilemenu-filter .icon img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.course-container {
    flex: 4;
    padding: 0 20px;
    overflow-x: hidden;
}

.course-container #course-list {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    z-index: 1;
}

.course-container .course-item {
    position: relative;
    height: 200px;
    flex: 1 1 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    min-width: 350px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--def-txtinvert-clr);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 500ms ease, box-shadow 500ms ease, margin 500ms ease;
    overflow: hidden;
    margin-bottom: 2rem;
}

.course-container .course-item:hover {
    transform: translate(-2px, -2px);
    cursor: pointer;
    box-shadow: 20px 15px 15px var(--def-shadow-clr);
}

.course-container .course-item a {
    position: relative;
    display: block;
    text-decoration: none;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    text-align: center;
    color: inherit;
}

.course-container .course-item .backdrop {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    backdrop-filter: blur(1px);
    z-index: 1;
}

.course-container .course-item .image-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 0;
    overflow: hidden;
}

.course-container .course-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.course-container .course-item h3 {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 1rem;
    padding: 5px 5px 5px 10px;
    width: fit-content;
    font-weight: 500;
    height: 25%;
    max-width: 95%;
    z-index: 2;
    text-align: right;
    color: var(--def-txt-clr);
    border-radius: 10px 0 0px 0px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-container .course-item h3 span {
    position: absolute;
    text-align: center;
    bottom: 10px;
    margin: 5px;
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0;
}

.course-container .course-item:hover h3 span {
    opacity: 1;
    transition: opacity 500ms ease;
    text-align: center;
}

.course-container .course-item:hover h3 {
    height: 100%;
    width: 100%;
    max-width: 100%;
    background: rgba(90, 90, 90, 0.281);
    backdrop-filter: blur(5px) brightness(0.5);
    color: white;
    transition: height 500ms ease, width 200ms ease, max-width 500ms ease, background 1s ease, color 500ms ease;
}

#search-bar {
    margin: 10px 0px;
    padding: 0.5rem;
    border-radius: 25px;
    border: none;
    background: var(--def-offbg);
    box-shadow: 5px 5px 5px var(--def-shadow-clr);
}

#category-filter {
    margin: 10px 0px;
    padding: 0.5rem;
    border-radius: 25px;
    border: none;
    background: var(--def-offbg);
    box-shadow: 5px 5px 5px var(--def-shadow-clr);
}

#category-filter:focus {
    outline: none;
}

#search-bar:focus {
    outline: none;
}

@media (max-width: 768px) {
    .cata-courses {
        padding-top: 0;
    }

    .mobilemenu-filter {
        top: 0;
        display: flex;
    }

    .course-filter-container {
        display: none;
    }

    .course-container #course-list {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
        z-index: 1;
    }

    .course-container .course-item {
        min-width: 300px;
    }
}

@media (max-width: 400px) {
    .course-container .course-item {
        width: 100%;
        max-width: 90vw;
        padding: 0;
        margin: 0;
    }
}