/* Container: Ensure proper layout */
.moodle-courses-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Course Card */
.moodle-course-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: calc(33.33% - 20px);
    transition: all 0.3s ease-in-out;
}

.moodle-course {
    padding: 20px;
    border: 1px solid #ddd;
    text-align: center;
    background: #fff;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Ensure images are consistent */
.moodle-course img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

/* Course title */
.moodle-course h3 {
    font-size: 18px;
    margin: 10px 0;
    font-weight: bold;
}

/* Hover effect */
.moodle-course:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .moodle-course-link {
        width: calc(50% - 20px); /* 2 columns on tablets */
    }
}

@media (max-width: 768px) {
    .moodle-course-link {
        width: 100%; /* 1 column on mobile */
    }
}
