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;
}

/* main content */
.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: 40px;
  padding: 15px;
  overflow: auto;
}

code strong {
  color: black;
}

.example pre {
  margin: 0;
  padding-top: 6px;
  white-space: pre;
  color: blue;
}

/* inside picture*/
.pics {
  width: 50%; 
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.graphiccontainer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.graphic {
  position: relative;
  width: 20%;
  margin: auto;
  display: inline;
  float: left;
}

.graphic > img {
  width: 100%;
  height: auto; 
  display= block;        
}

.graphicoverlay {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background-color: rgb(0,0,0,0.6);
  overflow: hidden;
  width: 100%;
  height:0;
  transition: .5s ease;
}

.graphic:hover .graphicoverlay {
  bottom: 0;
  height: 100%;
}

.text {
  color: white;
  font-size: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  text-align: center;
}

/* RWD layout */
@media only screen and (max-width: 1300px) {
  .graphic {
    width: 25%;
   }

@media only screen and (max-width: 992px) {
  .graphic {
    display: block;
    width: 100%;
   }