.main-content {
    padding-top: var(--header-height);
}

.courses h1 {
    font-family: 'Tenor-Regular';
    text-align: center;
    margin-bottom: 8px;
}

.courses-subtitle {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 28px;
    opacity: 0.75;
}

.courses-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.course-card {
    background-color: #faf2e6;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.course-media {
    aspect-ratio: 4 / 3;
    width: 100%;
    overflow: hidden;
}

.course-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.course-body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    justify-content: space-evenly;
}

.course-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.course-pill,
.course-modal-cta {
    background-color: #bca5de;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 20px;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
}

.course-pill::after {
    display: none;
}

.course-body h2 {
    font-size: 24px;
    text-align: left;
    margin: 0;
}

.course-card .course-description {
    margin: 0;
    opacity: 0.82;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
    line-height: 1.5;
    max-height: calc(1.5em * 3);
    font-size: 18px;
}

.course-duration {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.03rem;
    text-transform: uppercase;
    opacity: 0.75;
}

.course-view {
    width: fit-content;
    font-size: 20px;
    height: auto;
    background-color: #fff;
    color: #bca5de !important;
    border-color: #bca5de;
}

.course-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 120;
}

.course-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.course-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.course-modal-content {
    position: relative;
    background: #fff;
    border-radius: 24px;
    max-width: 900px;
    width: min(92vw, 900px);
    max-height: 88vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.course-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-modal-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.course-modal-body h2 {
    margin: 0;
    font-size: 28px;
}

.course-modal-description {
    margin: 0;
    opacity: 0.85;
}

.course-modal-duration {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04rem;
    opacity: 0.7;
}

.course-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

body.modal-open {
    overflow: hidden;
}

.filter-container {
    column-gap: 10px;
    width: fit-content;
    margin-bottom: 20px;
}

.filter-button input {
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-button label {
    background-color: transparent;
    color: #bca5de !important;
    font-family: 'Nunito-Light';
    border-radius: 30px;
    margin: 0;
    padding: 7px 20px;
    cursor: pointer;
}

.filter-button input:checked+label {
    background-color: #bca5de;
    color: white !important;
}

@media screen and (max-width: 767px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-body h2 {
        font-size: 22px;
    }

    .course-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        height: 90vh;
        max-height: 90vh;
        height: 90svh;
        max-height: 90svh;
    }

    .course-modal-media {
        max-height: 240px;
    }

    .course-view {
        margin-left: 0;
        font-size: 15px;
    }

    .course-pill {
        font-size: 15px;
    }
}
