@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap");
:root {
  --color-primary: #2450ff;
  --header-text: #293591;
  --color-primary-light: #edf3ff;
  --color-accent: #f7d83b;
  --color-bg: #fff9f0;
  --color-text: #4B4745;
  --color-muted: #666;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.06);
  --max-width: 1200px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
}

@media (max-width: 768px) {
  .page-wrapper {
    padding-top: 0;
  }
}
.course-wrap {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.course-content {
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
}

.course-header {
  position: sticky;
  top: 0;
  z-index: 12;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  padding: 0;
  background: #293692;
  -webkit-transition: 0.1s;
  transition: 0.1s;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}
.course-header .header__inner {
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  max-width: 1520px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  margin: 0 auto;
  padding: 0 16px;
  padding-top: 30px;
  padding-bottom: 30px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.course-header .course-info {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 50px;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.course-header .course-title {
  font-size: 1rem;
  color: white;
  font-weight: bold;
}
.course-header .leave-course {
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 12px;
  font-size: 1rem;
}
.course-header .leave-course span {
  color: #CFF03F;
  font-weight: bold;
}
.course-header .leave-course .leave-arrow {
  width: 1.3rem;
  height: 1.3rem;
  display: inline-block;
  background-image: url("./../src/course/leave-arrow.svg");
  background-size: 75% auto;
  background-repeat: no-repeat;
  background-position: center;
}
.course-header .divider {
  width: 1px;
  height: 1rem;
  background-color: white;
}
.course-header .course-progress {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 16px;
}
.course-header .progress-info {
  color: white;
  background: #4A4947;
  border-radius: 12px;
  font-weight: bold;
  line-height: 52px;
  padding: 0 35px;
}
@media (max-width: 768px) {
  .course-header .progress-info {
    background: #CFF03F;
    color: #021000;
    line-height: 22px;
    padding: 0 12px;
  }
}
.course-header #minutes {
  display: inline-block;
  padding: 0 0.25em;
}
.course-header .arrow-toggle {
  width: 48px;
  height: 32px;
  text-align: center;
  cursor: pointer;
}
.course-header .arrow-toggle img {
  width: 90%;
}
@media (max-width: 768px) {
  .course-header {
    position: fixed;
    z-index: 18;
    left: 0;
    right: 0;
  }
  .course-header .header__inner {
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .course-header .header__inner .divider,
.course-header .header__inner .course-title,
.course-header .header__inner .progress-info {
    display: none;
  }
  .course-header .arrow-toggle {
    width: 28px;
    height: 28px;
  }
}

.header__inner_sub {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    position: absolute;
    bottom: -78px;
    right: 70px;
    width: 100%;
    max-width: 1520px;
    margin: 0 auto;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding: 15px 22px;
}
.header__inner_sub .logo {
  width: 100px;
}
.header__inner_sub .logo img {
  width: 100%;
}
.header__inner_sub .progress-info {
  display: none;
}
@media (max-width: 768px) {
  .header__inner_sub {
    position: static;
    background-color: #010101;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    width: 100%;
  }
  .header__inner_sub .progress-info {
    display: block;
  }
  .header__inner_sub .logo {
    width: 86px;
  }
}

.video-wrap {
  background-color: #010101;
}
@media (max-width: 768px) {
  .video-wrap {
    padding-top: 104px;
  }
}

#my-vimeo-video {
  width: 100%;
  max-width: 1010px;
  /* 設定最大寬度 */
  margin: 0 auto;
}
#my-vimeo-video iframe {
  width: 100%;
}

.course-info-wrap {
  max-width: 1230px;
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  padding-top: 110px;
  padding-bottom: 110px;
  color: #4B4745;
  font-size: 18px;
  line-height: 31px;
}
@media (max-width: 768px) {
  .course-info-wrap {
    padding-left: 43px;
    padding-right: 43px;
    padding-top: 25px;
    padding-bottom: 109px;
  }
}

.course-title-mobile {
  display: none;
  font-size: 1rem;
  color: white;
  font-weight: bold;
  background-color: #010101;
}
@media (max-width: 768px) {
  .course-title-mobile {
    display: block;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

.course-menu {
  background-color: #4A4947;
  width: 420px;
  -webkit-transition: width 0.3s ease, padding 0.3s ease;
  transition: width 0.3s ease, padding 0.3s ease;
  /* 寬度動畫 */
  overflow-y: auto;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  position: relative;
}
.course-menu.collapsed {
  width: 0;
  padding: 0;
  /* 確保 padding 也歸零，避免殘留邊距 */
  overflow: hidden;
  /* 隱藏內容 */
}
.course-menu.collapsed .course-menu-title {
  white-space: nowrap;
}
.course-menu.collapsed .course-menu-list {
  width: 420px;
}
@media (max-width: 768px) {
  .course-menu {
    position: fixed;
    z-index: 8;
    top: 52px;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 52px);
    -webkit-transition: height 0.3s ease, padding 0.3s ease;
    transition: height 0.3s ease, padding 0.3s ease;
  }
  .course-menu.collapsed {
    width: 100%;
    height: 0;
    padding: 0;
    /* 確保 padding 也歸零，避免殘留邊距 */
    overflow: hidden;
    /* 隱藏內容 */
  }
  .course-menu.collapsed .course-menu-title {
    white-space: nowrap;
  }
  .course-menu.collapsed .course-menu-list {
    width: auto;
  }
}

.course-menu-title {
  padding-top: 30px;
  color: #CFF03F;
  padding-left: 30px;
  font-size: 18px;
  padding-right: 30px;
  line-height: 52px;
  padding-bottom: 40px;
}
@media (max-width: 768px) {
  .course-menu-title {
    padding-top: 0;
    padding-bottom: 0;
  }
}

.course-menu-list {
  padding-left: 30px;
  padding-right: 30px;
  font-size: 18px;
  color: white;
}
.course-menu-list a,
.course-menu-list span,
.course-menu-list div {
  color: white;
  font-size: 16px;
  line-height: 24px;
}
@media (max-width: 768px) {
    .course-info-wrap {
        font-size: 16px;
    }
}
.menu-toggle-button {
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  min-height: 48px;
  padding: 15px 0;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 10px 0;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.arrow-filled {
  width: 21px;
  height: 24px;
  background-image: url("./../src/course/arrow-filled.svg");
  background-repeat: no-repeat;
  background-size: auto 90%;
  background-position: left center;
  /* 箭頭樣式設定 */
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

.chapter-list {
  padding-left: 40px;
}

.chapter-item {
  color: white;
}
.chapter-item > a, .chapter-item > div {
  min-height: 54px;
  display: block;
  padding: 15px 0;
}

/* 隱藏原本的清單，並設定過渡動畫 */
.chapter-list {
  max-height: 0;
  overflow: hidden;
  -webkit-transition: max-height 0.3s ease-out;
  transition: max-height 0.3s ease-out;
  padding-left: 20px;
  /* 增加縮排讓層次更明顯 */
}

/* 當父層 (.course-menu-item) 被加上 active 時，展開清單 */
.course-menu-item.active .chapter-list {
  max-height: 500px;
  /* 設定一個足夠大的值 */
  -webkit-transition: max-height 0.5s ease-in;
  transition: max-height 0.5s ease-in;
}

/* 當 active 時，箭頭旋轉 90 度向下 */
.course-menu-item.active .arrow-filled {
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
}