/* Sidebar Styling */
.sidebar .widget ul li, .sidebar__single ul li {
    font-size: 16px;
    padding: 10px;
}

/* Main Menu Buttons */
.main-menu__right .eduact-btn {
    background-color: var(--eduact-secondary);
    font-size: 16px;
    margin-left: 19px;
    font-weight: 600;
    padding: 7px 20.5px;
    height: 40px;
    visibility: hidden;
}

.main-menu__login {
    font-size: 24px;
    margin-left: 11px;
    visibility: hidden;
}

/* Course Search Form */
.course-search-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.course-search-form input[type="text"] {
    flex: 1;
    padding: 10px;
    font-size: 16px;
}

.course-search-form input[type="submit"] {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #2D1B34;
    color: #fff;
    border: none;
    cursor: pointer;
    align-self: flex-start; /* Aligns the button with the form */
}

.course-search-form input[type="submit"]:hover {
    background-color: #005a87;
}

/* Course List */
.course-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Course Item */
.course-item {
    border: 5px solid #2D1B34;
    width: calc(33.333% - 20px);
    box-sizing: border-box;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevents overflow issues */
    position: relative; /* Ensures positioning context for children */
}

/* Thumbnail Image */
.course-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the container */
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%); /* Clips the image to a polygon shape */
    display: block; /* Removes extra space below the image */
    margin: 0; /* Ensures no extra margin is applied */
}

/* Course Info */
.course-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-title {
    font-size: 25px;
    font-weight: 900;
    margin-bottom: 1px;
    color: #333;
}

.course-category {
    font-size: 16px;
    color: #777;
    margin-bottom: 10px;
}

/* View Course Button */
.view-course {
    padding: 10px 20px;
    background: #2D1B34;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    display: inline-block;
    margin-top: auto;
    text-align: center; /* Centers text within the button */
}

.view-course:hover {
    background: #005a87; /* Changed to a different color on hover for better visibility */
    color: #fff;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination .page-numbers {
    padding: 10px 15px;
    font-weight: 800;
    background: #fff;
    border: 5px solid #2D1B34;
    color: #2D1B34;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
    height: 50px;
    line-height: 30px; /* Centers text vertically */
}

.pagination .page-numbers.current {
    background: #2D1B34;
    color: #fff;
    border: 5px solid #2D1B34;
    height: 50px;
    width: 48px;
}

.pagination .page-numbers:hover {
    background: #005a87; /* Changed to a different color on hover for better visibility */
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .course-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .course-item {
        width: calc(100% - 20px);
    }
    .course-search-form {
        flex-direction: column;
    }
    .course-search-form input[type="submit"] {
        width: 100%;
    }
}
