/* 課程總覽 */
.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: 40px 20px 0;
  background: url('/ver2/images/smooth-wall-background.png') repeat;
}

.course-header img {
  height: 80px;
  margin-bottom: 10px;
}

.course-header h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}

/* 級別表格 */
.english-target-header {
  text-align: center;
  padding: 40px 20px 0;
  background: url('/ver2/images/dot-grid.jpg') repeat;
}

.english-target-header img {
  height: 80px;
  margin-bottom: 10px;
}

.english-target-header h2 {
  font-size: 28px;
  font-weight: bold;
  color: #1c95b4;
  margin: 0;
}

.english-target-section{
    background: url('/ver2/images/dot-grid.jpg') repeat;
}
.level-title {
    text-align: center;
    font-size: 22px;
    color: #1c95b4;
    font-weight: bold;
    margin: 30px 0 20px;
}
.english-target-desktop {
    display: block;
}
.english-target-table {
    max-width: 1450px;
    margin: 0 auto;
    padding: 30px;
}

.english-target-table th {
    padding: 10px 0;
    text-align: center;
    font-size: 16px;
    letter-spacing: 1.6px;
    border-bottom: 10px solid #fff
}

.english-target-table tr th:nth-child(1) {
    border-top-left-radius: 30px
}

.english-target-table tr th:nth-child(2n) {
    background: rgba(204,204,204,0.89)
}

.english-target-table tr th:nth-child(2n+1) {
    background: rgba(204,204,204,0.55)
}

.english-target-table h3 {
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block
}

.english-target-table tr td {
    text-align: center;
    font-size: 15px;
    letter-spacing: 1.5px;
    line-height: 26px;
    padding: 30px 9px;
    border-bottom: 10px solid #fff
}

.english-target-table td.col-1-1 {
    width: 14%;
    background: rgba(255,136,162,0.22);
}

.english-target-table td.col-1-2 {
    width: 9%;
    background: rgba(255,136,162,0.33);
}

.english-target-table td.col-1-3 {
    width: 19%;
    padding: 30px 20px;
    text-align: left;
    background: rgba(204,204,204,0.33);
}

.english-target-table td.col-1-4 {
    width: 30%;
    padding: 30px 30px;
    text-align: left;
    background: rgba(204,204,204,0.55);
}

.english-target-table td.col-1-5 {
    width: 7%;
    background: rgba(238, 208, 250, 0.514);
}

.english-target-table td.col-1-6 {
    width: 10%;
    background: rgba(204,204,204,0.33);
}

.english-target-table td.col-1-7 {
    width: 11%;
    border-bottom-right-radius: 30px;
    background: rgba(184, 218, 250, 0.33);
}

.english-target-button {
    font-size: 16px;
    letter-spacing: 1.6px;
    display: inline-block;
    cursor: pointer;
    transition: .5s all;
    background: #fff;
    border-radius: 30px;
    line-height: 30px;
    padding: 0 12px;
    border: 1px solid #ccc
}

.english-target-button i {
    margin-left: 5px
}

.english-target-table td.level-entry-bg-2-1 {
    background: rgba(248, 160, 87, 0.33)
}

.english-target-table td.level-entry-bg-2-2 {
    background: rgba(248, 160, 87, 0.33);
    border-bottom: 0
}

.english-target-table td.level-entry-bg-2-3 {
    background: rgba(204,204,204,0.33)
}

.english-target-table td.level-entry-bg-2-4 {
    background: rgba(204,204,204,0.55)
}

.english-target-table td.level-entry-bg-2-5 {
    background: rgba(227, 175, 248, 0.514)
}

.english-target-table td.level-entry-bg-2-6 {
    background: rgba(204,204,204,0.33);
    border-bottom: 0
}

.english-target-table td.level-entry-bg-2-7 {
    background: rgba(144, 198, 248, 0.33)
}

.english-target-table td.level-entry-bg-3-1 {
    background: rgba(248, 160, 87, 0.33)
}

.english-target-table td.level-entry-bg-3-2 {
    background: rgba(189, 248, 155, 0.33)
}

.english-target-table td.level-entry-bg-4-1 {
    background: rgba(235, 225, 97, 0.315)
}

.english-target-table td.level-entry-bg-4-2 {
    background: rgba(235, 225, 97, 0.315);
    border-bottom: 0
}

.english-target-table td.level-entry-bg-4-3 {
    background: rgba(204,204,204,0.33)
}

.english-target-table td.level-entry-bg-4-4 {
    background: rgba(204,204,204,0.55)
}

.english-target-table td.level-entry-bg-4-5 {
    background: rgba(222, 143, 253, 0.514)
}

.english-target-table td.level-entry-bg-4-6 {
    background: rgba(170, 250, 124, 0.384)
}

.english-target-table td.level-entry-bg-4-7 {
    background: rgba(95, 174, 247, 0.384)
}

.english-target-table td.level-entry-bg-5-1 {
    background: rgba(235, 225, 97, 0.315)
}

.english-target-table td.level-entry-bg-6-1 {
    background: rgba(170, 250, 124, 0.384)
}

.english-target-table td.level-entry-bg-6-2 {
    background: rgba(170, 250, 124, 0.384);
    border-bottom: 0
}

.english-target-table td.level-entry-bg-6-3 {
    background: rgba(204,204,204,0.33)
}

.english-target-table td.level-entry-bg-6-4 {
    background: rgba(204,204,204,0.55)
}

.english-target-table td.level-entry-bg-6-5 {
    background: rgba(210, 105, 252, 0.514)
}

.english-target-table td.level-entry-bg-6-6 {
    background: rgba(139, 247, 77, 0.384)
}

.english-target-table td.level-entry-bg-6-7 {
    background: rgba(46, 149, 245, 0.404)
}

.english-target-table td.level-entry-bg-7-1 {
    background: rgba(170, 250, 124, 0.384)
}
/* 手機版學習目標 */
.english-target-mobile {
    display: none;
    padding: 0 16px;
}

.english-target-mobile .mobile-level {
  border-radius: 12px;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border: 1px solid #ccc
}

.english-target-mobile .mobile-level p {
  margin-bottom: 10px;
}

.accordion-item {
    margin-bottom: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}
.accordion-toggle {
    width: 100%;
    padding: 16px;
    background: #f0f0f0;
    border: none;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    text-align: left;
    cursor: pointer;
}
.accordion-toggle::after {
    content: "\25BE";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.accordion-toggle.active::after {
    content: "\25B4";
}
.accordion-content {
    display: none;
    padding: 12px 5px;
    font-size: 16px;
    line-height: 1.6;
}

/* 手機版型學習目標-Level未拆分版 */
.mobile-table {
  display: table;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.6;
}

.mobile-table .row {
  display: table-row;
}

.mobile-table .cell {
  display: table-cell;
  padding: 12px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.mobile-table .th {
  background: #eee;
  font-weight: bold;
  width: 20%;
  color: #333;
}

.mobile-table .cell.th {
  word-break: keep-all;
  white-space: normal;
  text-align: center;
}

.mobile-table .cell.th span {
  display: inline-block;
  word-break: break-all;
  line-height: 1.4;
  max-width: 2em; /* 限制寬度強迫換行 */
}

/* 手機版型學習目標-Level拆分版 */
.mobile-matrix-simplified {
  display: table;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.6;
}

.matrix-head,
.matrix-row {
  display: table-row;
}

.label-col,
.level-col {
  display: table-cell;
  padding: 12px;
  border: 1px solid #ddd;
  vertical-align: top;
}

.label-col {
  min-width: 1em;
  text-align: center;
  padding: 8px;
  background: #eee;
  font-weight: bold;
  vertical-align: middle;
  width: 20%;
}

.label-col span {
  display: block;
  width: 2em;
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
  margin: 0 auto;
}

.level-col {
  min-width: 30%;
}

.level-full {
  display: table-cell;
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px;
  vertical-align: top;
  font-size: 15px;
}

/* 手機版型-學習目標button */
.mobile-button-wrap {
  text-align: center;
  margin: 12px 0 4px;
}
.english-target-button {
  background: white;
  border: 1px solid #ccc;
  border-radius: 15px;
  padding: 4px 10px;
  font-size: 15px;
  color: #444;
  display: inline-block;
}
.english-target-button i {
  margin-left: 5px;
}

.english-target-button:hover {
  background: #f3f3f3;
  color: #000;
  border-color: #888;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

/* 學習目標-彈窗 */
.learning-modal {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'NotoSansTc', sans-serif;
}
.learning-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.learning-modal-content {
  position: relative;
  background: #f0faff;
  padding: 40px 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.modal-header-with-image {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.modal-header-with-image img {
  width: 150px;
  flex-shrink: 0;
  border: 4px solid #f5f9fb;
  border-radius: 10px;
}
.modal-title {
  font-size: 24px;
  font-weight: bold;
  color: #1c7fab;
}
.modal-title span {
  display: block;
  font-size: 16px;
  color: #444;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  color: #999;
  cursor: pointer;
}
.modal-section {
  margin-top: 20px;
  border: 1px solid #cce7f0;
  border-radius: 12px;
  overflow: hidden;
}
.section-toggle {
  all: unset; /* ✅ 清除所有預設 button 樣式 */
  display: block;
  width: 100%;
  padding: 12px 48px 12px 16px;
  background: #d9effa;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  color: #1c7fab;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}
.section-toggle::after {
  content: "▼";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #1c7fab;
}
.section-toggle.active::after {
  content: "▲";
}
.section-content {
  display: none;
  background: #ffffff;
  padding: 12px 16px;
  color: #333;
  line-height: 1.6;
}

/* RWD 高度設定 */

@media (max-width: 768px) {

  /* 級別表格 */
  .english-target-desktop {
      display: none;
  }
  .english-target-mobile {
    display: block;
  }
  .english-target-header h2 {
    font-size: 20px;
    font-weight: bold;
    color: #1c95b4;
    margin: 0;
  }
  
}
