.search {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 1;
    padding-top: 6%;
    padding-bottom: 6%;
    padding-inline: 7%;
    background-image: linear-gradient(to right, rgb(247, 248, 196), rgb(143, 201, 251));
}

.search h1 {
    font-size: 30px;
}

.search p {
    font-size: 18px;
    margin-bottom: 30px;
}

.search input {
    width: 96%;
    padding-inline: 10px;
    padding-block: 10px;
    font-size: 18px;
    border-width: 0.2px;
    border-color: rgb(183, 182, 182);
    border-radius: 15px;
    opacity: 1;
    background-color: white;
    margin-bottom: 20px;
}

.search input:focus {
    outline: none;
    opacity: 0.5;
}

#search-cat{
    background-color: var(--background-color);
    padding-block: 5px;
    padding-inline: 8px;
    border-radius: 10px;
    border: solid 1.5px rgb(64, 124, 189);
    color: rgb(64, 124, 189);
}
#search-cat:hover{
    cursor:pointer;
    background-color:rgb(117, 171, 253);
    color: white;
}
#heroimg {
    margin: auto;
    object-fit: cover;
    animation: jump 3s ease infinite;
}
.hidden{
    display: none;
}
.categories {
    padding-block: 3%;
    padding-inline: 7%;
}

.categories ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 30px;
    padding: 0;
    padding-block: 20px;
    list-style: none;
    justify-content: center;
    align-items: center;
}

.categories h2 {
    font-size: 28px;
}

.categories li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    width: 100%;
    background-color: var(--background-color);
    border-radius: 15px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.categories li p {
    font-size: small;
    margin: 0;
}

.categories li h3 {
    font-size: 15px;
}

.categories li:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 10px rgb(4, 63, 115);
    background-color: rgb(64, 124, 189);
    color: white;
    cursor: pointer;
}

.categories li:hover svg {
    transform: scale(1.5);
}

.categories li svg {
    width: 25px;
    height: 25px;
    transition: all 0.3s ease;
}

.courseslist {
    padding-inline: 7%;
    background-image: linear-gradient(to right, rgba(247, 248, 196, 0.429), rgba(143, 201, 251, 0.301));
    padding-bottom: 50px;
}

.courseslist h2 {
    font-size: 30px;
    padding-bottom: 10px;
    padding-top: 50px;
    margin-top: 0;
}

.course {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 2px 2px 10px 2px rgb(220, 219, 219);
    padding-inline: 30px;
    padding-block: 15px;
    transition: all 0.3s ease;
}

.description {
    display: -webkit-box;
    line-clamp: 3;
    /* WebKit-prefixed for older support */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* hide text beyond 3 lines */
    text-overflow: ellipsis;
}

.course:hover {
    transform: scale(1.02);
    box-shadow: 2px 2px 10px 2px rgb(172, 171, 171);
}

.course h3 {
    margin-block: 5px;
    font-size: 25px;
    white-space: nowrap;
    /* prevents wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}

.course p {
    color: grey;
    font-size: 12px;
    margin-block: 5px;
}

.time {
    display: flex;
    gap: 5px;
    align-items: center;
}

.info {
    display: flex;
    gap: 20px;
    padding-block: 10px;
}

.course .coursefoot button {
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: solid 2px;
    border-color: rgba(15, 66, 29, 0.54);
    padding-block: 3px;
    padding-inline: 8px;
    background-color: rgba(124, 213, 148, 0.285);
    box-shadow: none;
    transition: all 0.2s ease;
    font-weight: 600;
}

.course .coursefoot button:hover {
    transform: translateX(8px);
    box-shadow: -8px 0 15px -5px rgba(46, 46, 46, 0.724);
    background-color: rgba(33, 126, 44, 0.882);
    color: white;
}

.coursefoot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
}

.skillicon {
    background-color: var(--background-color);
    margin-inline: auto;
    margin-block: 5%;
    padding: auto;
    width: 100px;
    height: 80px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgb(195, 194, 194);
    transition: all 0.3s ease;
}

.teacher {
    display: flex;
    align-items: center;
    gap: 7px;
}

.teacher #teacherimg img {
    border-radius: 50%;
    object-fit: cover;
}

.skillicon svg {
    width: 40px;
    height: 40px;
}

.course:hover .skillicon {
    transform: scale(1.1);
}

.rating {
    display: flex;
    gap: 5px;
    align-items: center;
}

.rating p {
    font-size: 15px;
}

#price {
    font-size: 15px;
    padding-block: 3px;
    padding-inline: 10px;
    align-self: center;
    border: solid;
    border-color: var(--border-color);
    border-width: 1px;
    border-radius: 20px;
    background-color: var(--hover-color);
}

.teach {
    padding-inline: 7%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 10px;
}

.teach h2 {
    font-size: 30px;
    margin: 0;
    font-weight: 800;
}

.teach p {
    color: rgb(95, 95, 95);
}

.teach button {
    width: 100%;
    margin-block: 20px;
    padding-block: 10px;
    border-radius: 10px;
    border: solid 2px;
    border-color: rgb(247, 223, 178);
    background-image: linear-gradient(45deg, rgb(248, 248, 142), rgb(254, 186, 60));
    font-weight: 550;
    color: rgb(1, 50, 1);
    transition: all 0.3s ease;

}

.teach button:hover {
    transform: scale(1.02);
    box-shadow: 2px 2px 10px gray;
    cursor: pointer;
}

.teach img {
    margin: auto;
    padding-block: 20px;
    animation: jump 3s ease infinite;
}


@keyframes jump {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@media only screen and (min-width:768px) {
    .teach {
        flex-direction: row;
        gap: 3%;
    }

    .categories ul {
        grid-template-columns: repeat(3, 1fr);
    }

    .teach>div {
        padding-left: 5%;
    }
}

@media only screen and (min-width:1024px) {
    .search {
        flex-direction: row;
        gap: 50px;
    }

    .search #heroimg {
        justify-content: flex-end;
        width: 40%;
    }

    .search h1 {
        font-size: 40px;
    }

    .search p {
        font-size: 20px;
    }

    .categories ul {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }

    .teach button {
        width: 50%;
        font-size: 18px;
    }

    .teach img {
        width: 40%;
        height: auto;
    }

    .teach h2 {
        font-size: 40px;
    }

    .teach p {
        font-size: 18px;
    }
}