@charset "utf-8";

:root {
  --primary-color: #772323;
  --secondary-color: #cfae61;
  --third-color: #cfae61;
  --gray-color-50: #faf6f2;
  --gray-color-100: #f5eee4;
  --gray-color-200: #e7d6c1;
  --gray-color-300: #d8ba99;
  --gray-color-400: #c79870;
  --gray-color-500: #bc8053;
  --gray-color-600: #ae6d48;
  --gray-color-700: #91573d;
  --gray-color-800: #754737;
  --gray-color-900: #5f3c2f;
  --gray-color-950: #331d17;
  --padding-m: clamp(10px, 1vw, 20px);
}

* {
  box-sizing: border-box;
}

body {
  color: #1a0203;
  margin: 0px;
  padding: 0px;
  background-color: #faf6f2;
  font-size: clamp(16px, 1vw, 18px);
  font-family: Roboto Condensed, Arial, Noto Sans TC, Microsoft Yahei,
    Microsoft JhengHei, fantasy, Helvetica, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  background-image: url(../images/main-bg.png);
  background-size: 600px;
  background-position: left -100px top -50px;
  background-repeat: no-repeat;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

.container {
  width: 100%;
  padding: 15px;
  max-width: 1300px;
  margin: 20px auto;
}

img {
  max-width: 100%;
}
.bg-primary {
  background-color: var(--primary-color) !important;
}
.text-white {
  color: #fff !important;
}

/*h1~h4
========================================== */

h1,
h2,
h3 {
  /* font-family: 'Noto Serif TC', serif !important; */
  font-family: Arial, Microsoft Yahei, Noto Sans TC, Microsoft JhengHei, fantasy,
    Helvetica, sans-serif;
  line-height: 1.2;
  padding: 5px 0;
  margin: 5px 0;
}

h1 {
  font-size: clamp(24px, 2vw, 30px);
  letter-spacing: 0px;
}

h2 {
  font-size: clamp(20px, 1.5vw, 28px);
}

h3 {
  font-size: clamp(18px, 1.2vw, 22px);
}

.oia-container {
  margin: 20px auto;
  max-width: 1300px;
  width: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* basic */
.card {
  padding: clamp(10px, 1vw, 30px);
  border-radius: 10px;
  background-color: #fff;
}

.bg-primary {
  background-color: var(--primary-color);
}

/* custom */

.forum-banner {
  width: 100%;
  display: grid;
  grid-template-columns: 40% 1fr;
  min-height: 400px;
  border-radius: 7px;
  font-size: 15px;
  overflow: hidden;
}

@media only screen and (max-width: 767px) {
  .forum-banner {
    grid-template-columns: 1fr;
  }
}

.forum-banner-text {
  padding: 10px;
}

/* index-banner-menu
========================================== */

.card-menu {
  width: 100%;
  display: flex;
  justify-content: end;
}

.card-menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-menu ul li a {
  background-color: var(--gray-color-50);
  min-width: 120px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  border-radius: 10px;
  padding: 10px;
  gap: 10px;
  font-size: 15px;
  transition: 0.5s;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  backdrop-filter: blur(2px);
}

.card-menu ul li a i {
  font-style: normal;
  font-size: clamp(30px, 3vw, 60px);
  line-height: 1;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  text-shadow: var(--long-shadow);
}

.card-menu ul li a i span {
  font-size: 15px;
  padding-top: 10px;
}

/* course
========================================== */

.course-box {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1vw;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--gray-color-50);
  margin-bottom: var(--padding-m);
}

@media only screen and (min-width: 767px) {
  .course-date {
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: var(--padding-m);
    line-height: 1.1;
  }
}

.course-date span {
  font-size: 16px;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 1);
  color: var(--secondary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
  padding: 4px;
}

.inner-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  justify-content: center;
  padding: 4px;
}

.course-list {
  display: grid;
  align-items: center;
  grid-template-columns: 130px 1fr;
  gap: var(--padding-m);
  padding: var(--padding-m);
  border-bottom: 1px dashed var(--secondary-color);
}
.course-list a {
  color: #000;
}
.course-list h4 {
  font-weight: 400;
}
.course-list:nth-last-child(1) {
  border-bottom: 0px;
}

.course-time {
  background-color: var(--secondary-color);
  color: #fff;
  border-radius: 50px;
  padding: 0 10px;
  display: inline-block;
  margin: 3px 0;
}

.course-topic {
  border-left: 1px dashed var(--secondary-color);
  padding-left: var(--padding-m);
}

.course-topic ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 5px 20px;
  padding: 0;
  margin: 10px 0;
}

.course-topic ol li {
  list-style: none;
  border: 0px solid rgba(0, 0, 0, 0.1);
  padding: 5px;
  border-radius: 5px;
  line-height: 1.2;
  text-align: center;
}

.host {
  border-left: 1px dashed var(--secondary-color);
  padding-left: 20px;
}
.lector-box {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  text-align: center;
}

.lector-pic {
  width: 90px;
  height: 90px;
  aspect-ratio: auto 1 / 1;
  margin: 5px auto;
}

.lector-pic2 {
  width: 102px;
  height: 102px;
  aspect-ratio: auto 1 / 1;
  margin: 5px auto;
}

.lector-pic img {
  width: 90px;
  height: 90px;
  border-radius: 100px;
  object-fit: cover;
  object-position: 50% 50%;
}

.lector-pic2 img {
  width: 102px;
  height: 102px;
  border-radius: 100px;
  object-fit: cover;
  object-position: 50% 50%;
}

@media only screen and (max-width: 1100px) {
  .course-topic ol {
    grid-template-columns: 1fr 1fr;
  }
}

@media only screen and (max-width: 767px) {
  .course-box {
    grid-template-columns: 1fr;
  }

  .course-date {
    background-color: var(--secondary-color);
    text-align: center;
    color: #fff;
    font-size: 17px;
    padding: 2px;
  }

  .course-date span {
    display: inline;
    margin: 0 5px;
  }

  .course-list {
    grid-template-columns: 1fr;
  }
}

/* tabs, nav-tabs
========================================== */

.nav-tabs {
  margin: 0px 0;
  list-style: none;
  padding: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.nav-tabs > li {
  margin-bottom: 3px;
}

.nav-tabs a {
  padding: 6px 2vw;
  color: #333;
  text-decoration: none;
  display: block;
  border-radius: 50px;
  background-color: #fff;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
}

.nav-tabs a:hover {
  background: #fff;
}

.nav-tabs a.active {
  color: #fff;
  background: var(--secondary-color);
}

.tab-content {
  background-color: #fff;
  border-radius: 10px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* table
========================================== */
table {
  background-color: transparent;
  border-collapse: collapse;
  border-spacing: 0;
}

.edit-box {
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--primary-color);
  border-radius: 9px;
  background-color: #fff;
}

.table th,
.table td {
  padding: clamp(5px, 1vw, 8px);
  border-top: 1px solid var(--primary-color);
  border-left: 1px solid var(--primary-color);
  background-clip: padding-box;
  color: #000;
}

.table th {
  background-color: var(--primary-color);
  color: #fff;
}

.table tr:first-child th,
.table tr:first-child td {
  border-top: none;
}

.table th:first-child,
.table td:first-child {
  border-left: none;
}

.table thead tr:first-child > *:first-child,
.table tbody tr:first-child > *:first-child {
  border-top-left-radius: 8px;
}

.table thead tr:first-child > *:last-child,
.table tbody tr:first-child > *:last-child {
  border-top-right-radius: 8px;
}

.table tbody tr:last-child > *:first-child,
.table tfoot tr:first-child > *:first-child {
  border-bottom-left-radius: 8px;
}

.table tbody tr:last-child > *:last-child,
.table tfoot tr:first-child > *:last-child {
  border-bottom-right-radius: 8px;
}

.table2 {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--primary-color);
  border-radius: 9px;
  background-color: #fff;
  overflow: hidden;
}

.table2 th,
.table2 td {
  padding: clamp(5px, 1vw, 8px);
  border-top: 1px solid var(--primary-color);
  border-left: 1px solid var(--primary-color);
  background-clip: padding-box;
  color: #000;
}

.table2 th {
  background-color: var(--primary-color);
  color: #fff;
}

.table2 thead tr:first-child th,
.table2 thead tr:first-child td {
  border-top: none;
}

.table2 th:first-child,
.table2 td:first-child {
  background-color: var(--primary-color);
  color: #fff; /* optional */
  border: 1px solid #fff;
  border-right: none;
  border-top-right-radius: 0;
}

.table2 thead tr:first-child > *:first-child,
.table2 tbody tr:first-child > *:first-child {
  border-top-left-radius: 0;
}

.table2 thead tr:first-child > *:last-child,
.table2 tbody tr:first-child > *:last-child {
  border-top-right-radius: 0;
}

.table2 tbody tr:last-child > *:first-child,
.table2 tfoot tr:first-child > *:first-child {
  border-bottom-left-radius: 8px;
}

.table2 tbody tr:last-child > *:last-child,
.table2 tfoot tr:first-child > *:last-child {
  border-bottom-right-radius: 8px;
}

/*faq
========================================== */

.faq {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(5px, 0.5vw, 15px);
  padding: clamp(10px, 2vw, 30px);
  padding-left: 60px;
  border-radius: 15px;
  counter-reset: num;
}

.faq details {
  background-color: var(--gray-color-50);
  padding: 0 clamp(10px, 1.5vw, 30px);
  flex: 1 1 100%;
  border-radius: 12px;
  transition: all 0.3s;
}

/* 標題 */

.faq summary {
  position: relative;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  padding: clamp(5px, 0.5vw, 5px);
}

.faq summary::after {
  counter-increment: num;
  content: counter(num);
  position: absolute;
  left: -50px;
  top: 10px;
  background-color: #fff;
  color: #333;
  border-radius: 50px;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.faq summary h3 {
  font-size: clamp(15px, 1vw, 18px);
}

/* open */

.faq details[open] {
  background-color: var(--primary-color);
  color: #fff;
  padding: clamp(10px, 1.5vw, 30px);
  padding-top: 0;
}

.faq details[open] summary {
  padding-top: clamp(10px, 1.5vw, 30px);
}

.faq details[open] summary h3 {
  font-size: 120%;
}

.faq details[open] summary::after {
  background-color: var(--third-color);
  color: #fff;
}

.faq summary:hover::after {
  background-color: var(--third-color);
  color: #fff;
}

.faq details[open] ul,
.faq details[open] ol {
  margin: 0;
  padding: 5px 5px 5px 25px;
}

/* 隱藏預設箭頭 */

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::marker {
  content: none;
}

/* 自訂 + / – 記號 */

.faq summary::before {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6em;
}

.faq details[open] summary::before {
  content: "–";
  color: #fff;
}

@media only screen and (max-width: 767px) {
  .faq {
    padding-left: 25px;
  }

  .faq summary::after {
    left: -30px;
    top: 10px;
    width: 24px;
    height: 24px;
  }
}

.faq details[open] a {
  padding: 0 5px;
  text-decoration: underline;
}

.faq details[open] a:not(.table-box a) {
  color: #fff;
}

.table-box {
  overflow-x: auto;
}

.faq table th,
.faq table td,
.faq .table2 th,
.faq .table2 td {
  border-left: 1px solid var(--gray-color-400);
  color: #000;
}

.faq table th {
  background-color: var(--gray-color-100);
  border-bottom: 1px solid var(--gray-color-400);
}

.faq table td {
  border-top: 1px solid var(--gray-color-400);
}

.faq .table2 th {
  border-bottom: 0 !important;
}

.faq .table2 th:first-child,
.faq .table2 td:first-child {
  background-color: var(--gray-color-100) !important;
  border-color: var(--gray-color-400) !important;
}
