/* 課程介紹 */
.courses {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  /* padding: 30px 20px 30px; */
  background: url('/ver2/images/smooth-wall-background.png') repeat;
}

.course-header {
  text-align: center;
  padding: 10px 20px 0;
  background: url('/ver2/images/smooth-wall-background.png') repeat;
}

.course-header img {
  height: 80px;
  margin-bottom: 5px;
}

.course-header h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}

.course-intro-wrapper {
  background: #f0f8ff;
  border-radius: 24px;
  padding: 40px 20px;
  margin: 40px auto;
  max-width: 1200px;
}

/* 區塊1：圖 + 標題 + 標籤 */
.course-intro-wrapper {
  background: #f0f8ff;
  border-radius: 24px;
  padding: 0;
  margin: 40px auto;
  max-width: 1000px;
  overflow: hidden;
}

/* flex外框 */
.intro-flex {
  display: flex;
  flex-wrap: wrap;
  height: 300px; /* ✅ 限制高度 */
  overflow: hidden;
}

.intro-left {
  flex: 1 1 30%;
  height: 100%;
  overflow: hidden;
}

.intro-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* ✅ 圖片裁切填滿 */
  object-position: center; /* ✅ 居中顯示 */
  display: block;
  border-radius: 0;      /* 若需要可加上 */
}

/* 右藍底 */
.intro-right {
  flex: 1 1 60%;
  background: #45afd9;
  color: white;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.intro-right h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: white;
}
.intro-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.intro-tag {
  background: white;
  border-radius: 12px;
  padding: 10px 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: 160px;        /* ✅ 固定寬度 */
  box-sizing: border-box;
  color: rgb(0, 0, 0);
}
.intro-tag p.orange { color: #F49B00; }
.intro-tag p.pink { color: #E94E77; }

/* 說明段 */
.intro-description {
  padding: 40px;
}
.intro-description p {
  padding: 15px;
  color: #333;
  line-height: 1.8;
}

/* 學習目標 */
.target {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  /* padding: 30px 20px 30px; */
  /* background: url('/ver2/images/smooth-wall-background.png') repeat; */
  background: #fcfbf7;
}

.target-header {
  text-align: center;
  padding: 10px 20px 0;
  background: #fcfbf7;
}

.target-header img,
.coursefeature-header img, 
.englishmaterial-wrapper img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 80px;
}

.target-header h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}
.desktop-only {
  display: block;
}

.target-desktop {
  padding: 40px;
  text-align: center;
}
.target-desktop img {
  max-width: 1200px;
  border-radius: 16px;
}

/* 手機版按鈕 */
.target-btn-mobile {
  display: block;
  text-align: center; /* ✅ 整顆按鈕水平置中 */
  margin-top: 16px;
  display: none;
}

.target-btn {
  background: #362782;
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between; /* ✅ 讓文字和 icon 推左右兩端 */
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 18px;
  width: 80%;        /* ✅ 固定寬度 */
  margin: 0 auto;      /* ✅ 確保按鈕容器置中 */
  box-sizing: border-box;
}

.btn-text {
  flex: 1;
  text-align: center;  /* ✅ 讓文字在中間 */
}

.target-btn i {
  margin-left: 12px;
  font-size: 20px;
}

/* 教材特色 */
.coursefeature {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  /* padding: 30px 20px 30px; */
  background: url('/ver2/images/school-background.png') repeat;
  /* background: #fcfbf7; */
}

.coursefeature-header {
  text-align: center;
  padding: 10px 20px 0;
  background: url('/ver2/images/school-background.png') repeat;
  /* background: #fcfbf7; */
}

.coursefeature-header h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}

.coursefeature-desktop {
  width: 100%;
  padding: 40px 20px;
  box-sizing: border-box;
  text-align: center;
}
.coursefeature-desktop img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto; /* ✅ 水平置中 */
}

/* 手機版按鈕 */
.coursefeature-btn-mobile {
  display: block;
  text-align: center; /* ✅ 整顆按鈕水平置中 */
  margin-top: 16px;
  display: none;
}

.coursefeature-btn {
  background: #362782;
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between; /* ✅ 讓文字和 icon 推左右兩端 */
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 18px;
  width: 80%;        /* ✅ 固定寬度 */
  margin: 0 auto;      /* ✅ 確保按鈕容器置中 */
  box-sizing: border-box;
}
.coursefeature-btn i {
  margin-left: 12px;
  font-size: 20px;
}
/* 兒童英文教材 */
.englishmaterial-section {  
  padding: 0px 20px 20px 20px;
}
.englishmaterial-grid {
  display: grid;
  grid-template-columns: repeat(2, 480px); /* ✅ 明確固定兩欄 */
  justify-content: center;                /* ✅ 才會置中 */
  gap: 40px;
  margin: 0 auto;
}
.englishmaterial-wrapper {
  background: url('/ver2/images/dot-grid.jpg') repeat;
  border: 3px solid #ffb8c6;
  border-radius: 30px;
  padding: 40px 20px 60px;
  max-width: 1100px;
  margin: 40px auto 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
}
.englishmaterial-wrapper h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}
.material-card {
  background-color: rgba(72, 202, 219, 0.2);
  border-radius: 20px;
  padding: 24px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  max-width: 480px;
  margin-top: 30px;
}
.material-card h3 {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  color: #1c95b4;
  margin-bottom: 20px;
}
.material-card ul {
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.material-card li {
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 6px;
}
.material-card img {
  display: block;
  margin: 0 auto;
  width: 170px;;
  height: auto;
  border-radius: 12px;
}
.material-link {
  margin-top: 12px;
  text-align: center;
}
.material-link a {
  color: #1c95b4;
  text-decoration: none;
  font-weight: bold;
}
.material-link a:hover {
  text-decoration: underline;
}
.material-link i {
  margin-right: 6px;
  font-size: 18px;
}
/* 課程價格 */
.courseprice {
  background: url('/ver2/images/smooth-wall-background.png') repeat;
  padding: 40px 0;
  margin: 0 auto;
}
.price-table-wrapper {
  background: white;
  border-radius: 32px;
  padding: 40px 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

.courseprice-header {
  text-align: center;
  padding: 10px 20px 0;
}

.courseprice-header img {
  height: 80px;
  margin-bottom: 5px;
}

.courseprice-header h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}
.price-table.desktop-only {
  width: 1000px;
  table-layout: fixed;
  margin: 0 auto;
  margin-top: 20px;
}

.price-table th,
.price-table td {
  text-align: center;
}


.price-table th {
  background: #d3e4b4;
  color: #333;
  padding: 12px;
  font-weight: bold;
}

.price-table.desktop-only th {
  width: 250px;
}

.price-table td {
  padding: 12px;
  border: 1px solid #ccc;
}

.price-table tbody tr:nth-child(even) {
  background: #f8f8f8;
}

/* 三欄價格表 */
.price-table-c3.desktop-only {
  width: 750px;
  table-layout: fixed;
  margin: 0 auto;
  margin-top: 20px;
}

.price-table-c3 th,
.price-table-c3 td {
  text-align: center;
}


.price-table-c3 th {
  background: #d3e4b4;
  color: #333;
  padding: 12px;
  font-weight: bold;
}

.price-table-c3.desktop-only th {
  width: 250px;
}

.price-table-c3 td {
  padding: 12px;
  border: 1px solid #ccc;
}

.price-table-c3 tbody tr:nth-child(even) {
  background: #f8f8f8;
}

.price-note {
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}
/* 學習建議 */
.suggest-header {
  background: #d8f8fa;
  border-radius: 60px;
  padding: 0px 30px;
  margin: 40px auto;
  max-width: 1100px;
  box-sizing: border-box;
}

.suggest-content {
  display: flex;
  justify-content: space-between;
  align-items: center;     /* ✅ 垂直置中 */
  gap: 20px;
  flex-wrap: wrap;
  padding: 0px 100px;
  max-width: 1200px;
}

.suggest-text {
  flex: 1;
  min-width: 280px;
}

.suggest-text h2 {
  font-size: 24px;
  font-weight: bold;
  color: #1c95b4;
  margin-bottom: 16px;
  text-align: center;
}

.suggest-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #222;
}

.suggest-text strong {
  font-weight: bold;
  color: #000;
}

.suggest-img {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.suggest-img img {
  align-self: flex-end; /* ✅ 重點：圖片本身貼齊底部 */
  display: block;
  max-width: 100%;
  height: 200px;
}

/* RWD */
.mobile-only {
  display: none;
}

/* RWD 手機版 */
@media screen and (max-width: 768px) {
  /* 課程介紹 */
  .intro-flex {
    flex-direction: column;
  }
  .intro-left,
  .intro-right {
    width: 100%;
  }
  .intro-right {
    padding: 24px;
  }
  .intro-tags {
    flex-direction: column;
  }
  .intro-tag {
    width: 100%;
  }
  /* 學習目標 */
  .target-desktop {
    display: none;
  }
  .target-btn-mobile {
    display: block;
    text-align: center;
    margin-top: 16px;
  }

  /* 教材特色 */
  .coursefeature-desktop {
    display: none;
  }
  .coursefeature-btn-mobile {
    display: block;
    text-align: center;
    margin-top: 16px;
  }
  .coursefeature,
  .coursefeature-header {
    background: none !important;
  }
  /* 兒童英文教材 */
  .englishmaterial-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* 價格 */
  .price-table-wrapper {
    padding: 24px 16px;
    width: 100%;
  }

  .price-table.mobile-only {
    width: 100%;
    table-layout: fixed;
    margin: 0 auto;
  }

  .price-table th {
    width: auto !important;
  }
  /* 價格表3欄 */
  .price-table-c3.mobile-only {
    width: 100%;
    table-layout: fixed;
    margin: 0 auto;
  }

  .price-table-c3 th {
    width: auto !important;
  }

  /* 學習建議 */
  .suggest-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0px;
  }
  .suggest-img {
    order: 2;
  }
  .suggest-text {
    order: 1;
  }
  .suggest-img img {
    max-height: 140px;
    width: auto;
    height: auto;
  }

  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: table;
  }

}