/* Courses List Styling */

/* Main Container */
.courses-main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 59px 0;
    gap: 73px;
    width: 100%;
    max-width: 1464px;
    margin: 0 auto;
}

/* Header Section */
.courses-header {
    width: 515px;
    height: 115px;
    flex: none;
    order: 0;
    flex-grow: 0;
}

.courses-title-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 18px 0px;
    gap: 12px;
    width: 515px;
    height: 115px;
    position: relative;
}

.courses-main-title {
    width: 515px;
    height: 58px;
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 48px;
    line-height: 58px;
    color: #292929;
    flex: none;
    order: 0;
    flex-grow: 0;
    text-align: center;
}

.courses-title-underline {
    width: 466px;
    height: 9px;
    background: #ff4c4b;
    border-radius: 6px;
    flex: none;
    order: 1;
    flex-grow: 0;
}

/* Courses Grid Container */
.courses-grid-container {
    width: 1464px;
    min-height: 790px;
    flex: none;
    order: 1;
    flex-grow: 0;
}

.courses-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    padding: 0px;
    gap: 35px;
    width: 100%;
}

/* Course Card Link */
.course-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.course-card-link:focus {
    outline: 2px solid #fb5437;
    outline-offset: 2px;
}

/* Individual Course Card */
.course-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px 0px 38px;
    gap: 16px;
    width: 550px;
    height: 445px;
    background: #f0f3f9;
    border-radius: 9px;
    flex: none;
    flex-grow: 0;
    cursor: pointer;
}

/* Course Image */
.course-image {
    width: 550px;
    height: 264px;
    border-radius: 9px 9px 0px 0px;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    object-fit: cover;
}

/* Course Content */
.course-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 19px 21px 0px;
    gap: 20px;
    width: 550px;
    height: 127px;
    flex: none;
    order: 1;
    flex-grow: 0;
}

/* Course Title Container */
.course-title-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0px;
    gap: 4px;
    width: 508px;
    height: 19px;
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* Course Title */
.course-title {
    width: 508px;
    height: 19px;
    font-family: "Roboto", sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fb5437;
    flex: none;
    order: 0;
    flex-grow: 1;
    text-decoration: none;
    margin: 0;
}

.course-card-link:hover .course-title {
    color: #e04a33;
}

/* Course Description */
.course-description {
    width: 508px;
    height: 69px;
    font-family: "Source Sans Pro", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 140%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #000000;
    flex: none;
    order: 1;
    flex-grow: 0;
    margin: 0;
    padding: 0;
}

/* No Courses Message */
.no-courses-message {
    font-family: "Inter", sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #666666;
    text-align: center;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1500px) {
    .courses-main-container {
        padding: 0px 30px;
    }

    .courses-grid-container {
        width: 100%;
        max-width: 1200px;
    }
}

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

    .course-card {
        width: 480px;
        height: 400px;
    }

    .course-image {
        width: 480px;
        height: 230px;
    }

    .course-content {
        width: 480px;
        padding: 15px 18px 0px;
    }

    .course-title-container,
    .course-title,
    .course-description {
        width: 444px;
    }
}

@media (max-width: 1024px) {
    .courses-main-title {
        font-size: 40px;
        line-height: 48px;
    }

    .courses-title-section,
    .courses-header,
    .courses-main-title {
        width: 400px;
    }

    .courses-title-underline {
        width: 350px;
    }
}

@media (max-width: 768px) {
    .courses-main-container {
        padding: 0px 20px;
        margin-top: 100px;
    }

    .courses-grid {
        flex-direction: column;
        gap: 20px;
    }

    .course-card {
        width: 100%;
        max-width: 400px;
        height: auto;
    }

    .course-image {
        width: 100%;
        height: 200px;
    }

    .course-content {
        width: 100%;
        padding: 15px;
    }

    .course-title-container,
    .course-title,
    .course-description {
        width: 100%;
    }

    .courses-main-title {
        font-size: 32px;
        line-height: 38px;
    }

    .courses-title-section,
    .courses-header,
    .courses-main-title {
        width: 100%;
    }

    .courses-title-underline {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .courses-main-title {
        font-size: 28px;
        line-height: 34px;
    }

    .course-title {
        font-size: 20px;
    }

    .course-description {
        font-size: 14px;
        line-height: 130%;
    }
}
