/* 項目課程區塊 */
.item-section {
    text-align: center;
    padding: 50px 10%;
    margin-top: 5%;
}

/* 標題樣式 */
.item-section h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
}

/* 課程項目容器 */
.course-items {
    margin-top: 5%;
    display: flex;
    justify-content: space-between; /* 水平排列 */
    gap: 20px; /* 項目間距 */
    flex-wrap: wrap; /* 當視窗大小變小時換行 */
}

/* 單一課程項目 */
.course-item {
    display: flex;
    flex-direction: column; /* 圖片在上，文字在下 */
    align-items: center; /* 讓內容置中 */
    justify-content: center; /* 讓內容垂直居中 */
    flex: 1;
    min-width: 150px; /* 每個項目的最小寬度 */
    max-width: 200px; /* 每個項目的最大寬度 */
    text-align: center;
}

.course-item img {
    width: 30%; /* 圖片大小 */
    margin-bottom: 15%; /* 圖片與文字間距 */
}

.course-item h3 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-left: 8%;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .course-items {
        justify-content: center;
    }

    .course-item {
        flex: 0 1 calc(50% - 10px); /* 兩兩一排 */
    }

    .course-item:last-child {
        flex: 0 1 100%; /* 最後一個獨佔整排 */
    }
}

/*-----------------我是分隔線--------------------------*/


/* 課程介紹區塊 */
.course-section {
    text-align: center;
    padding-top: 5%;
    margin-bottom: 5%;
}

.course-section h1 {
    font-size: 32px;
    color: #333;
}

/* 課程卡片容器 */
.course-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin: auto;
    width: 80%;
    padding-top: 25px;
}

/* 課程卡片樣式 */
.course-card {
    background: white;
    padding-bottom: 20px;
    margin-top: 20px;
    border-radius: 15px;
    border: 0.1px solid rgb(235, 235, 235); /* 黑色實線邊框 */
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    flex-direction: column; /* 確保圖片和文字垂直排列 */
}


/* 卡片內圖片 */
.course-card .img-container {
    width: 100%;
    background-size: 100%;
    background-position:center;
    padding-top: 60%;
    border-top-left-radius: 10px;  /* 左上角圓角 */
    border-top-right-radius: 10px; /* 右上角圓角 */
}


/* 標題 */
.course-info {
    padding: 10px 20px;
}

.course-card h2 {
    font-size: 22px;
    margin: 10px 0;
    color: #333;
}

/* 文字 */
.course-card p {
    padding-top: 10px;
    font-size: 16px;
    color: #666;
    text-align: justify;
}


/*課程介紹響應式*/

@media (max-width: 1024px) {
    .course-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .course-card {
        width: calc(50% - 20px); /* 兩張卡片一排 */
    }


}

@media (max-width: 768px) {
    .course-container {
        display: flex;
        flex-direction: column; /* 讓卡片垂直排列 */
        align-items: center; /* 置中排列 */
        gap: 20px;
    }

    .course-card {
        width: 90%; /* 每個卡片佔據整個寬度 */
        max-width: 400px; /* 設定最大寬度 */
    }

}

/* 立即預約按鈕 */
.btn {
    margin-top: 2%;
    margin-bottom: 5%;
    text-align: center;
}

.btn a {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8); 
    color: white;
    text-decoration: none;
    font-size: 16px;
    border-radius: 30px; /*圓角*/
}

.btn a:hover {
    background: rgba(21, 21, 21, 0.5) /* 變淺 */
}

@media (max-width: 768px) {
    .btn {
        margin-top: 5%;
        margin-bottom: 10%;
    }

    .btn a {
        padding: 16px 32px; /* 按鈕變大，方便點擊 */
        font-size: 18px; /* 文字稍微放大 */
        width: 80%; /* 讓按鈕變寬 */
        text-align: center;
    }
}

@media (max-width: 480px) {
    .btn a {
        width: 100%; /* 小螢幕按鈕滿版 */
        display: block;
        padding: 18px 36px;
        font-size: 20px;
    }
}

