/* Course Card Styles */
.course-card {
    transition: all 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.course-img img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.card-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em;
    /* Approximate height for 2 lines */
    line-height: 1.5em;
}

.card-title a:hover {
    color: #4e81fb;
    /* Primary color */
}

/* List View Specific Styles */
.course-list-wrap .course-card {
    flex-direction: row;
    height: auto;
    align-items: flex-start;
    /* Align to top */
}

.course-list-wrap .course-img {
    width: 300px;
    flex-shrink: 0;
    height: auto;
    /* Allow height to adjust */
}

.course-list-wrap .course-img img {
    height: 100%;
    /* Fill container height */
    min-height: 200px;
    /* Minimum height */
}

.course-list-wrap .course-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Space out content */
    height: 100%;
}

.course-list-wrap p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Skeleton Loading Styles */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text.title {
    height: 1.5em;
    width: 80%;
}

.skeleton-text.meta {
    width: 40%;
}

.skeleton-img {
    width: 100%;
    height: 200px;
}

.skeleton-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* Filter Skeleton Styles */
.filter-skeleton {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 0;
}

.skeleton-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    margin-right: 10px;
}

.skeleton-input {
    background: #f8f9fa;
    color: transparent !important;
    position: relative;
    overflow: hidden;
}

.skeleton-input::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-star {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 2px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.dot {
    width: 4px;
    height: 4px;
    background-color: #d1d5db;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
}

@media (max-width: 768px) {
    .course-list-wrap .course-card {
        flex-direction: column;
    }

    .course-list-wrap .course-img {
        width: 100%;
        height: 200px;
    }

    .course-list-wrap .course-content {
        height: auto;
    }
}