html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  font-family: "Microsoft JhengHei", sans-serif; 
}

img {
  image-rendering: pixelated;
}

* {
  box-sizing: border-box;
}


/* background image */
.container {
  position: relative;
}

#bgimage {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

/* dropdown menu */
.menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 1em;
}

.menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: inline-block;
}

.menu li {
  float: left;
  font-weight: bold;
}

.menu li a, .dropbtn {
  display: inline-block;
  padding: 14px 26px;
  text-align: center;
  text-decoration: none;
  color: white;
}

.menu .dropcontent {
  display: none;
  position: absolute;
  min-width: 100px;
  z-index: 1;
}

.menu .dropdown:hover .dropcontent {
  display: block;
}

.menu li.dropdown {
  display: inline-block;
}

.menu .dropcontent a {
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  display: block;
  text-align: center;
}

.menu li a:hover {
  border-bottom: 1px solid white;
}

.menu .dropcontent a:hover {
  border-bottom: 1px solid white;
}

/* website icon */
#icon {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#imgicon {
  width: 70px;
  height: 45px;
}

#icon a {
  text-decoration: none;
}

/* menuicon */
.menuicon {
  margin: 12px;
  cursor: pointer;
  display: none;
  position: absolute;
  top: 0;
  right: 0;
}

.menuicon div {
  width: 32px;
  height: 3px;
  background-color: white;
  margin: 6px 0;
}

@media screen and (max-width: 700px) {
  .menu ul {display: none;}
  .menuicon {
    display: block;
  }
}

/* overlay */
.overlay {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0, 0.85);
  overflow-x: hidden;
  overflow-y: auto;
  transition: 0.5s;
}

.overlay-content {
  position: relative;
  top: 20%;
  width: 100%;
  text-align: center;
  margin-top: 30px;
}

#imgicon {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.overlay a {
  padding: 8px;
  text-decoration: none;
  font-size: 2em;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.overlay a:hover, .overlay a:focus {
  color: #f1f1f1;
}

#overlaysub, #overlaysub_2, #overlaysub_3 {
  display: none;
}

#overlaysub a, #overlaysub_2 a, #overlaysub_3 a {
  font-size: 1.25em;
}

.overlay .closebtn {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px;
}

/* header */
header {
  margin: 0;
  color: white;
  position: absolute;
  top: 150px;
  left: 50%;
  transform: translate(-50%);
}

header span {
  padding: 10px 16px;
  border: 2px solid white;
  border-radius: 10px;
  font-size: 2em;
  margin: auto;
  white-space: nowrap;
}

/* header menu */
.headermenu {
  overflow: auto;
  white-space: nowrap;
  background-color: LightGrey;
}

.headermenu a {
  color: black;
  text-align: center;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 1em;
  display: inline-block;
  border-radius: 10px 10px 0 0;
}

.headermenu a:hover {
  background-color: Gainsboro;
}

.headermenu .active {
  background-color: white;
}

/* side content */
.sidesection {
  width: 25%;
  float: left;
  padding: 30px;
  letter-spacing: 2px;
}

.sidesection li {
  padding-bottom: 8px;
}

.sidesection img {
  width: 100%;
  height: auto;
  display: block;
}

.sidesection img + p {
  text-align: center;
}

.share, #aiSummary {
  float:left; 
  padding: 8px;
}

audio {
  width:70%;
  height: 40px;
}

.hiddenBox {
  display: none;
}

/* social media share icon*/
.share img {
  width: 8%;
  height: auto;
  margin: 8px;
  float: left;
}

/* main content */
.mainsection {
  width: 75%;
  float: left;
  padding: 30px;
}

.mainsection p {
  text-indent: 32px;
  letter-spacing: 2px;
}

.mainsection h2 {
  padding-bottom: 12px;
  border-bottom: 2px solid black;
}

.example {
  border-left: 4px solid red;  
  color: red;
  margin-left: 30px;
  padding: 8px;
  overflow: auto;
}

code strong {
  color: black;
}

.example pre {
  margin: 0;
  padding-top: 6px;
  white-space: pre;
  color: blue;
}

/* inside picture*/
.pics {
  width: 40%; 
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.polycontainer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.poly {
  width: 15%;
  margin: 7px;
  float: left;
  position: relative;
}

.poly > img {
  width: 100%;
  height: auto;         
}

.equation {
  font-size: 0.75em;      
  position: absolute;
  bottom: 10%;
  left: 50%;
}


/* RWD layout */
@media only screen and (max-width: 1300px) {
  .polycontainer {
    display: inline-block;
   }

  .poly {
    width: 30%;
   }
 }

@media only screen and (max-width: 992px) {
  .sidesection {
    width: 100%;
    border-bottom-style: solid;
    border-color: Gainsboro;
    border-width: medium;
   }

  .mainsection {
    width: 100%;
   }

  .polycontainer {
    display: inline-block;
   }

  .pics {
    width: 100%;
    height: auto;
   }

  .poly {
    width: 40%;
   }
}

/* resource page table */
.table_container {
  overflow-x:auto;
}

table {
  width: 100%;
}

table, th, td {
  border: 1px solid #ddd;
  border-collapse: collapse;
}

th {
  background-color: rgb(30, 60, 120);
  color: white;
}

th, td {
  padding: 16px;
}

td img {
  width: 150px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

table .col1, .col2 {
  width: 20%;
  text-align: center;
}

tr:nth-child(even) {
  background-color: #f2f2f2;
}

tr:hover {
  background-color: #ddd;
}

#topbutton {
  display: none;
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 99;
  border: 2px solid black;
  border-radius: 50%;
  outline: none;
  background-color: rgba(255,255,255,0.4);
  color: black;
  cursor: pointer;
  padding: 15px;
}

#topbutton:hover {
  background-color: white;
  box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}