.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: start;
}

.grid-course-item {
    box-sizing: border-box;
    padding: 10px;
    border-radius: 5px;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
    height: 400px; 
    overflow: hidden; 
    position: relative;
}

.discount-banner {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #ff0000; /* Adjust background color as needed */
    color: #ffffff; /* Adjust text color as needed */
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0 0 5px 0; /* Adjust border-radius as needed */
    z-index: 10;
}


.grid-course-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.course-image img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.grid-course-item h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 10px 0;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    width: 100%; 
}

.grid-course-item p {
    font-size: 14px;
    color: #777;
    margin: 5px 0;
}

.grid-course-item .sale-price {
    color: #000000;
    font-weight: bold;
}

.views-students {
    display: flex;
    justify-content: space-between;
}

.view-count {
    text-align: left;
    flex: 1;
}

.current-student {
    text-align: right;
    flex: 1;
}

.star {
    text-align: left;
    flex: 1;
}

.price {
    text-align: right;
    flex: 1;
}

.star {
    color: gold;
    font-size: 16px;
}

.star.full {
    color: gold;
}

.star.half {
    color: gold;
}

.star.empty {
    color: #ddd;
}

.views-students {
    background-color: #EEF1F7;
    padding: 5px;
}

.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.course-item .divider {
    width: 100%;
    height: 1px;
    background-color: #ddd; /* soft gray */
    margin: 8px 0 12px 0;  /* space above and below */
}



/* Responsive styles */
@media (max-width: 1024px) {
    .grid-course-item {
        height: auto;
    }
}

@media (max-width: 768px) {
    .grid-course-item {
        height: auto;
    }
}
