body {
    font-family: "Kanit", sans-serif;
}

.training_header {
    background-image: linear-gradient(
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.1)
        ),
        url("/images/Background_header_companyProfile.jpg");
    display: flex;
    background-size: cover;
    min-height: 100%;
}

.training_header h1 {
    color: #ffffff;
    font-size: 34px;
    padding-top: 30px;
    padding-bottom: 30px;
    padding-left: 10%;
    font-family: "Mitr", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.main_container {
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.header h1 {
    font-size: 36px;
    font-weight: 500;
    margin-top: 50px;
    margin-bottom: 30px;
}

.header p {
    font-size: 20px;
    font-weight: 500;
    margin-left: 25%;
    margin-right: 25%;
}

.courses_container {
    padding-left: 15%;
}

.course {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px 30px 10px 30px;
    border-bottom: #6a6868 solid 1px;
    border-right: transparent solid 1px;
    border-left: transparent solid 1px;
    border-top: #6a6868 solid 1px;
    border-radius: 10px 0px 0px 10px;
    position: relative; /* เพื่อให้แน่ใจว่าเส้นขอบด้านซ้ายจะถูกวางตำแหน่งภายใน container */
}

.course::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 7px; /* ความหนาของเส้นขอบด้านซ้าย */
    background-color: #752f8b; /* สีของเส้นขอบด้านซ้าย */
    border-radius: 10px 0px 0px 10px;
}

.image_cover {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image_cover img {
    width: 230px;
    height: 126px;
    object-fit: cover;
    object-position: center;
}

.content {
    display: flex;
    flex-direction: column;
    margin-left: 30px;
    width: 100%;
    padding-right: 10%;
}

.content h1 {
    font-size: 20px;
    color: #752f8b;
    margin-bottom: 5px;
}

.content p {
    font-size: 16px;
    color: #6a6868;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* จำนวนบรรทัดสูงสุดที่จะแสดง */
    -webkit-box-orient: vertical;
    overflow: hidden; /* ซ่อนข้อความที่เกินออกไป */
    text-overflow: ellipsis; /* เพิ่ม "..." เมื่อข้อความเกิน */
}

.button {
    margin-top: auto; /* ดัน div.button ไปที่ด้านล่างสุด */
}

.button h2 {
    font-size: 16px;
    color: #6a6868;
}

@media (max-width: 768px) {
    .courses_container {
        padding-left: 10px;
    }

    .course {
        flex-direction: column;
        text-align: center;
    }

    .image_cover {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        margin-bottom: 20px;
        margin-top: 10px;
    }

    .image_cover img {
        width: 300px;
        height: 300px;
    }

    .content {
        margin: 0;
        margin-bottom: 20px;
        padding: 0;
        padding-left: 10px;
        padding-right: 10px;
    }

    .button {
        margin-top: 20px;
    }
}
