@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@700&display=swap");
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html{
    scroll-behavior: smooth;
}
body {
  background: #f4f4f4;
  position: relative;
  font-family: "Microsoft JhengHei";
}

h2 {
  font-size: 64px;
  line-height: 92px;
  letter-spacing: 0.02em;
  font-weight: bold;
  font-family: "Noto Serif TC", serif;
  color: #0b0b0b;
  text-align: center;
}
h2 span {
  padding-bottom: 8px;
  border-bottom: 2px solid;
}

a {
  text-decoration: none;
}

header {
  display: flex;
  justify-content: center;
  background: #0b0b0b;
}
header h2 {
  width: 100%;
  height: 444px;
  font-size: 64px;
  font-family: "Noto Serif TC", serif;
  line-height: 92px;
  padding-bottom: 8px;
  background: #0b0b0b;
  color: #f4f4f4;
  text-align: center;
  left: 0px;
  top: 0px;
  border-radius: 0px;
  padding: 224px 0px 120px 0px;
  font-weight: bold;
}
header h2::after {
  content: "";
  display: flex;
  margin: auto;
  width: 300px;
  border-bottom: 2px solid #f4f4f4;
}

main {
  width: 997px;
  margin: auto;
}

h3,
h6.cart,
h6,
article p {
  font-family: Microsoft JhengHei;
}

.cart {
  display: flex;
  flex-direction: column;
  align-items: end;
}
.cart h3 {
  color: #518c95;
  font-weight: bold;
  font-size: 32px;
  line-height: 43px;
  margin-top: 60px;
  margin-bottom: 12px;
}
.cart .cartBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #518c95;
  width: 178px;
  height: 40px;
  border-radius: 40px;
  cursor: pointer;
}
.cart .cartBtn p {
  color: #ffffff;
  font-weight: 400;
  font-size: 18px;
  line-height: 20px;
}
.cart .cartBtn img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

article h4 {
  margin: 24px 0;
  color: #518c95;
  font-weight: bold;
  font-size: 36px;
  line-height: 44px;
}
article p {
  font-weight: 400;
  font-size: 24px;
  line-height: 40px;
  letter-spacing: 0.02em;
}

.course {
  z-index: -1;
}
.course h6 {
  margin-top: 60px;
  margin-bottom: 24px;
  color: #518c95;
  font-weight: bold;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0.02em;
}
.course .lesson {
  margin: 12px 0;
  box-shadow: 0 0 5px rgba(19, 59, 91, 0.3);
}
.course .accordion {
  display: flex;
  justify-content: space-between;
  background-color: #f4f4f4;
  color: #0b0b0b;
  cursor: pointer;
  font-family: "Microsoft JhengHei";
  font-weight: bold;
  font-size: 24px;
  line-height: 40px;
  padding: 16px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: 0.4s;
}
.course .accordion .font {
  display: flex;
  align-items: center;
}
.course .accordion .font img {
  width: 20px;
  margin-right: 24px;
}
.course .accordion .font .title {
  font-weight: bold;
  font-size: 24px;
  line-height: 32px;
}
.course .accordion .video {
  width: 148px;
  padding: 8px 24px;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: #FFFFFF;
  background: #6C6C6C;
  border-radius: 40px;
}
.course .accordion .video img {
  width: 20px;
  height: 20px;
  margin-right: 2px;
  vertical-align: middle;
}
.course .accordion .video span {
  vertical-align: middle;
}
.course .panel {
  background-color: #d9d9d9;
  color: #0b0b0b;
  display: none;
  overflow: hidden;
  font-weight: 400px;
  font-size: 24px;
  line-height: 40px;
  text-align: justify;
  letter-spacing: 0.02em;
}
.course .panel p {
  padding: 16px;
}
.course .panel::before {
  content: "";
  display: flex;
  margin: auto;
  width: 965px;
  border-top: 1px solid #6c6c6c;
  line-height: 30px;
}
.course .active {
  background-color: #d9d9d9;
}

.backToTop {
  position: fixed;
  right: 30px;
  bottom: 30px;
}
.backToTop a {
  display: inline-block;
  position: sticky;
  top: 90vh;
}
.backToTop a img {
  width: 80px;
}

footer {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  height: 120px;
  padding: 0 10.5%;
  margin-top: 120px;
  background-color: #0b0b0b;
  color: #f4f4f4;
  font-size: 24px;
  line-height: 32px;
  font-weight: bold;
  align-items: center;
}
footer a {
  color: #f4f4f4;
}
footer .footerLeft span {
  padding-right: 16px;
}
footer .footerMiddle {
  justify-self: center;
}
footer .footerMiddle ul {
  display: flex;
}
footer .footerMiddle ul li {
  list-style: none;
  border-right: solid #f4f4f4;
  border-right-width: 1px;
  padding-right: 32px;
  margin-right: 32px;
}
footer .footerMiddle ul li:nth-last-child(1) {
  border-right-width: 0px;
  padding-right: 0px;
  margin-right: 0px;
}
footer .footerRight {
  justify-self: end;
  display: flex;
}
footer .footerRight a {
  margin-right: 16px;
}
footer .footerRight a:nth-last-child(1) {
  margin-right: 0;
}
footer .footerRight a img {
  width: 40px;
}

@media screen and (min-width: 601px) and (max-width: 1270px) {
  header h2 {
    width: 100%;
    height: 323px;
    font-size: 52px;
    line-height: 75px;
    padding: 160px 0px 80px;
  }
  main {
    width: auto;
    padding: 0 24px;
  }
  main .cart h3 {
    font-size: 28px;
    line-height: 37px;
    margin-bottom: 16px;
  }
  main .course h6 {
    margin-top: 40px;
  }
  main .course .lesson {
    margin: 0 0 24px;
  }
  main .course .lesson .accordion {
    line-height: 32px;
  }
  main .course .panel::before {
    width: 95.5%;
  }
  footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 168px;
    padding: 36px 0 188px;
    margin-top: 80px;
  }
  footer .footerLeft {
    width: 100%;
    text-align: center;
  }
  footer .footerMiddle {
    margin-top: 24px;
  }
  footer .footerMiddle ul li {
    padding-right: 32px;
    margin-right: 32px;
  }
  footer .footerRight {
    margin-top: 24px;
    margin-left: 32px;
  }
  footer .footerRight a {
    margin-right: 24px;
  }
}
@media screen and (max-width: 600px) {
  header h2 {
    height: 234px;
    font-size: 32px;
    line-height: 46px;
    padding: 120px 0px 60px;
    letter-spacing: 0.02em;
  }
  header h2::after {
    width: 120px;
  }
  main {
    width: auto;
    padding: 0 16px;
  }
  .cart h3 {
    font-size: 20px;
    line-height: 26.6px;
    margin: 30px 0 12px;
  }
  .cart .cartBtn {
    width: 120px;
    height: 32px;
  }
  .cart .cartBtn img {
    width: 16px;
    height: 16px;
    margin-right: 12px;
  }
  .cart .cartBtn p {
    font-size: 12px;
    line-height: 16px;
  }
  article h4 {
    margin: 32px 0 24px;
    font-size: 20px;
    line-height: 26.6px;
  }
  article p {
    font-size: 16px;
    line-height: 28px;
    letter-spacing: 0.02em;
  }
  .course h6 {
    margin: 30px 0 20px;
    font-size: 16px;
    line-height: 28px;
    letter-spacing: 0.02em;
  }
  .course .lesson {
    margin-bottom: 12px;
  }
  .course .accordion {
    font-size: 16px;
    line-height: 21.28px;
    padding: 17.5px auto;
  }
  .course .accordion .font .title {
    min-width: 145px;
    font-size: 16px;
    line-height: 21px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .course .accordion .video {
    width: 104px;
    padding: 4px 16px;
    font-size: 12px;
    line-height: 16px;
  }
  .course .accordion .video img {
    width: 16px;
    height: 16px;
  }
  .course .panel {
    font-size: 16px;
    line-height: 28px;
  }
  .course .panel p {
    padding: 16px;
  }
  .course .panel::before {
    width: 311px;
  }
  .backToTop {
    right: 4px;
  }
  .backToTop a img {
    width: 48px;
  }
  footer {
    display: grid;
    grid-template-columns: 185px 32px;
    row-gap: 24px;
    height: 256px;
    padding: 40px 0;
    margin-top: 60px;
    background-color: #0b0b0b;
    color: #fff;
    font-size: 16px;
    line-height: 28px;
    font-weight: 400;
    letter-spacing: 0.02em;
    justify-content: center;
  }
  footer a {
    color: #f4f4f4;
  }
  footer .footerLeft {
    grid-column: 1/3;
    grid-row: 1/2;
    text-align: center;
  }
  footer .footerMiddle {
    grid-column: 1/2;
    grid-row: 2/3;
    justify-self: left;
  }
  footer .footerMiddle ul {
    display: flex;
    flex-direction: column;
  }
  footer .footerMiddle ul li {
    border-right-width: 0;
    padding-right: 0px;
    margin-right: 0px;
    margin-bottom: 16px;
  }
  footer .footerRight {
    grid-column: 2/3;
    grid-row: 2/3;
    justify-self: end;
    align-self: flex-end;
    display: flex;
    flex-direction: column;
  }
  footer .footerRight a {
    margin-bottom: 16px;
    margin-right: 0px;
  }
  footer .footerRight a:nth-last-child(1) {
    margin-bottom: 0;
  }
  footer .footerRight a img {
    width: 32px;
  }
}
