main{
    flex-direction: column;
    max-width: 100vw;
}

.course-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.courses{
    width: 100%;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 50px;
}

.course {
    font-weight: bold;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 0 0 calc(33.333% - 10px);
}

.course img {
    width: 100%;
    height: 225px;
    border-radius: 5px;
    object-fit: cover;
    margin-bottom: 15px;
}

.course-level {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.level {
    background-color: #00A158;
    color: white;
    padding: 1% 5%;
    border-radius: 5px;
    font-size: .9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-classes {
    color: #898989;
    padding: 5px 10px;
    font-size: .8rem;
    font-weight: 300;
}

.course h2 {
    font-size: 1.1rem;
    font-weight: 500;
    min-height: 3.6rem;
    display: flex;
    align-items: center;
}

.course p {
    font-weight: normal;
    line-height: 1.4;
    margin-bottom: 15px;
}

.course a {
    width: 100%;
    margin-top: auto;
    padding: 1% 5%;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}




/* ===== Dark Mode Styles ===== */
.dark .course {
    background-color: var(--card-color);
    border-color: var(--border);
    color: var(--text);
}

.dark .course h2 {
    color: var(--text);
}

.dark .course p {
    color: var(--secondary-text);
}

.dark .level {
    background-color: #00A158;
    color: white;
}

.dark .number-classes {
    color: var(--secondary-text);
}

.dark .course a {
    background-color: var(--primary-color);
    color: white;
}

.dark .course a:hover {
    background-color: #2c5aa0;
}

@media screen and (max-width: 1000px) {
    main {
        padding: 20px 7%;
        height: auto;
    }

    .course{
        flex : 1 1 calc(50% - 10px);
        max-width: 100%;
    }
}