.moodle-courses-container {
    margin: 20px 0;
}

.courses-grid {
    display: grid;
    gap: 20px;
}

.course-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.course-content {
    padding: 20px;
}

.course-title {
    margin-top: 0;
    font-size: 1.2em;
}

.course-description {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Show max 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5; /* Adjust based on your font size */
    max-height: 6.5em; /* Fallback: 3 lines * 1.5 line-height */
}

.courses-loader {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #888;
}

.error-message {
    color: #d9534f;
    padding: 20px;
    border: 1px solid #ebccd1;
    background-color: #f2dede;
    border-radius: 4px;
}


.courses-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column-gap: 40px;
}

.courses-grid .course-card {
    border: none;
}

.courses-grid .course-card:hover {
    transform: none;
    box-shadow: none;
}

.courses-grid .course-content {
    padding: 0;
    text-align: left;
}

.courses-grid .img-block {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
	border-radius: 5px;
    margin: 0 0 20px;
	overflow:hidden;
}

.courses-grid .img-block img {
    width: 100%;
}

.courses-grid h3.course-title {
    color: #181d23;
    font-size: 1rem;
    line-height: 1.3;
    margin-top: .5rem;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
}

.courses-grid .course-description {
    min-height: 72px;
}

.courses-grid .course-link {
    margin: 10px 0;
    display: inline-block;
    color: #FF2768;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}

.d-none {
    display: none;
}

@media (max-width:1200px) {
	.courses-grid {
		grid-column-gap: 20px;
	}
}

@media (max-width:767px) {
	.courses-grid {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
		grid-column-gap: 20px;
	}
}