html,
body {
  width: 100%;
  min-height: 100vh;
  /* overflow: hidden; */
}

body {
  font-family: "Noto Sans TC", "Work Sans", sans-serif;
  line-height: 1.5;
  letter-spacing: 2px;
}

/* body::-webkit-scrollbar {
  display: none;
} */

/* Main */
:root {
  --main-orange: #f4aa14;
  --main-green: #0b8d97;
  --bg-gray: #efefef;
  --dark: #2c2c2c;
}

.banner {
  height: 480px;
  position: relative;
  background-image: url(../../img/course/banner.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right;
}

.banner__textbox {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, #ffffff 60%, rgba(255, 255, 255, 0) 100%);
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
}

.banner__title {
  color: var(--main-green);
  font-weight: 700;
  font-size: 4.5em;
  margin-top: 80px;
  align-self: center;
}

.banner__sub {
  color: var(--main-orange);
  font-size: 1.3em;
  align-self: center;
}

/* New */
#new {
  background-color: var(--bg-gray);
  padding: 40px 0;
  width: 100%;
}
.new-frame {
  width: 80%;
  margin: auto;
  /* background-image: url(img/new-frame.svg); */
  /* height: 100%; */
  /* background-repeat: no-repeat; */
  /* background-size: contain; */
  /* display: flex; */
  flex-direction: column;
  filter: drop-shadow(8px 8px 0px #cbd8e0);
}
.new-frame-top {
  border-radius: 0;
  width: 100%;
}
.new-course {
  /* height: fit-content; */
  border-radius: 10px;
  border: 8px solid #ffffff;
  box-sizing: border-box;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  width: 100%;
  margin-top: -6px;
}
h2 {
  color: var(--main-green);
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
  letter-spacing: 4px;
}
section {
  padding: 30px 0;
}

/* Filter */
.filter {
  width: 100%;
  padding: 30px 4% 25px 4%;
  background-image: url(../../img/course/filter-bg.png);
  background-repeat: no-repeat;
  background-size: cover;
  letter-spacing: 1.4px;
  border-bottom: 4px solid orange;
}
.types {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 8px;
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, 89px);
  row-gap: 15px;
  column-gap: 8px;
  justify-content: space-between;
}
.type {
  width: 100%;
  height: 60px;
  background-color: rgb(237, 237, 237);
  display: flex;
  border-radius: 5px;
}
.type p {
  margin: auto;
  line-height: 20px;
  font-weight: bold;
}
.products {
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, 90px);
  row-gap: 15px;
  column-gap: 10px;
  margin-top: 30px;
  justify-content: space-between;
}
.product {
  width: 90px;
  height: 30px;
  border: 1px solid white;
  /* background-color: #fff; */
  display: flex;
  border-radius: 30px;
}
.product p {
  font-size: 14px;
  margin: auto;
  font-weight: bold;
  color: white;
  text-align: center;
}
.type,
.product {
  transition: 0.2s ease;
}

.type:hover,
.product:hover {
  background-color: var(--main-orange);
  color: white;
  cursor: pointer;
  border: none;
}
.selected {
  background-color: var(--main-orange);
  border: none;
}
.selected p {
  color: #fff;
}

/* Course */
.course {
  margin-top: 10px;
  padding: 0 5%;
  max-width: 1140px;
  margin: auto;
}
.courseCard {
  width: 100%;
  display: grid;
  grid-template-columns: 150px 1fr;
  grid-template-rows: 1fr min-content;
  column-gap: 15px;
  row-gap: 10px;
  border-bottom: 3px solid #e7e7e7;
  padding: 30px 0 30px 0;
  cursor: pointer;
}
.courseImg {
  width: 150px;
  border-radius: 3px;
}

h3 {
  font-size: 18px;
  margin-top: 3px;
  line-height: 24px;
}
.courseTime {
  color: #8f8f8f;
  font-size: 14px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.courseTime img {
  width: 18px;
  margin-right: 1px;
}
.tags {
  display: grid;
  grid-template-columns: repeat(5, min-content);
  column-gap: 10px;
  margin-top: 10px;
  grid-row: 2/3;
  grid-column: 1/3;
}
.tag {
  background-color: #cbe6e8;
  width: max-content;
  padding: 5px 10px;
  border-radius: 50px;
}
.tag p {
  color: var(--main-green);
  font-size: 12px;
  font-weight: bold;
}

/* CourseInfo */
#courseInfo {
  width: 100%;
  height: 100%;
  z-index: 2;
  position: fixed;
  top: 0;
  left: 0;
  /* pointer-events:none; */
  transition: 0.2s linear;
}
.courseInfo-modal {
  width: 100vw;
  height: 88vh;
  background-color: #fff;
  margin: auto;
  top: 12vh;
  margin-top: 100vh;
  transition: 0.2s linear;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.close {
  display: none;
}
.courseInfo-container {
  width: 96%;
  height: 97%;
  top: 40px;
  overflow: hidden;
  margin: auto;
}
#courseInfo iframe {
  width: 100%;
  height: 100%;
  top: -51px;
  border: none;
  position: relative;
}
.scrollBar-right {
  padding-right: 50px;
}
.courseInfo-on {
  overflow: hidden;
  background-color: #000000b3;
  /* pointer-events: unset !important; */
}
.courseInfo-modal-on {
  margin-top: 0 !important;
}
.body-fixed {
  overflow: hidden;
}

/* new popup */
.modal__course {
  display: none;
  position: fixed;
  z-index: 1055;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Content */
.modal__content {
  position: relative;
  width: 100%;
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 8px;
}

.modal__scrollable .modal__content{
  max-height: 100%;
  overflow: hidden;
}

.modal__scrollable{
  min-width: 70%;
  height: calc(100% - 3.5rem);
}

.modal__iframe {
  padding-top: 60px;
}

.modal__iframe iframe {
  height: 70vh;
}

/* The Close Button */
.modal__close {
  float: right;
  cursor: pointer;
}

.modal__close:hover,
.modal__close:focus {
  text-decoration: none;
  cursor: pointer;
}

.show {
  display: block;
  justify-content: center;
  display: flex;
}

.hide {
  display: none;
}

@media (max-width: 539px) {
  .courseCard {
    display: flex;
    flex-direction: column;
  }

  .courseImg {
    width: 100%;
  }

  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    justify-content: flex-start;
    grid-column: initial;
  }

  .types {
    column-gap: 0;
  }
}

@media (max-width: 719px) {
  .banner {
    margin-top: 48px;
    height: 200px;
    background-size: cover;
  }

  .banner__title {
    font-size: 2em;
    margin-top: 0;
  }

  .banner__textbox {
    width: 100%;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.8) 100%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .courseCard {
    grid-template-columns: 250px 1fr;
  }

  .courseImg {
    width: 100%;
  }

  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    justify-content: flex-start;
    grid-column: initial;
  }
}

@media (min-width: 576px) {
  .new-frame {
    width: 60%;
    padding: 20px;
    filter: drop-shadow(10px 10px 0px #cbd8e0);
  }
  .new-course {
    border-radius: 14px;
    border: 8px solid #ffffff;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  /* Course */
  .filter {
    padding: 35px 7% 30px 7%;
  }
  .course {
    padding: 0 8%;
  }
}

@media (min-width: 720px) and (max-width: 960px) {
  .banner__textbox {
    top: 50%;
    left: 25%;
  }

  .banner__title {
    font-size: 3.5em;
  }

  .banner {
    background-size: cover;
  }

  .courseCard {
    grid-template-columns: 250px 1fr;
  }

  .courseImg {
    width: 100%;
  }

  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    justify-content: flex-start;
    grid-column: initial;
  }
}

@media (min-width: 768px) {
  h2 {
    font-size: 32px;
  }
  .filter {
    width: 78%;
    max-width: 870px;
    margin: auto;
    border-radius: 10px;
    padding: 30px 35px;
    border-bottom: none;
  }
  .courseCard {
    grid-template-columns: 300px 1fr;
    grid-template-rows: 1fr min-content;
  }
  .courseImg {
    width: 100%;
    border-radius: 5px;
    grid-column: 1/2;
    grid-row: 1/3;
  }
  .courseInfo {
    grid-column: 2/3;
    grid-row: 1/2;
  }
  .courseInfo h3 {
    font-size: 24px;
    margin-top: 20px;
  }
  .courseTime {
    margin-top: 15px;
  }
  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    justify-content: flex-start;
    grid-column: initial;
  }

}
@media (min-width: 992px) {
  /* .banner {
    height: 480px;
    background-image: url(../../img/course/banner-pc.png);
  }
  h1 {
    background: linear-gradient(
      90deg,
      #ffffff 60%,
      rgba(255, 255, 255, 0) 100%
    );
    left: -25%;
    position: relative;
    font-size: 4.5rem;
  }
  h1:after {
    margin-top: 120px;
    font-size: 1.3rem;
  } */
  #new {
    padding: 60px 0 70px 0;
  }
  .new-frame {
    filter: drop-shadow(12px 12px 0px #cbd8e0);
    /* width: 740px; */
  }
  .new-course {
    border-radius: 18px;
    border: 10px solid #ffffff;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  /* Course */
  .course {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 20px;
  }
  .courseCard {
    /* width: 274px; */
    display: flex;
    height: 95%;
    flex-direction: column;
    box-shadow: 0px 0px 13px rgba(0, 0, 0, 0.1);
    padding: 0 0 16px 0;
    border-radius: 5px;
    border-bottom: none;
    row-gap: 0;
    margin-top: 50px;
  }

  .coursebody {
    display: flex;
    height: 80%;
    flex-direction: column;
    align-items: end;
  }

  .courseCard:hover {
    box-shadow: 0px 0px 13px rgba(0, 0, 0, 0.2);
  }
  .courseImg {
    border-radius: 5px 5px 0 0;
    height: 152px;
    object-fit: cover;
  }
  .courseInfo,
  .tags {
    padding: 0 16px;
    width: 100%;
  }
  .courseInfo h3 {
    font-size: 20px;
    margin-top: 15px;
    line-height: 32px;
  }
  .courseTime {
    font-size: 16px;
    margin-top: 20px;
  }
  .tags {
    /* margin-top: 40px; */
    margin-bottom: 0;
    grid-template-columns: repeat(4, min-content);
    margin-top: auto;
  }

}

@media (min-width: 768px) and (max-width: 1024px) {
  header .menu a {
    color: white;
  }
}

@media (max-width: 1300px) {
  .banner {
    background-size: cover;
  }
}

