/*General*/
* {
  box-sizing: border-box;
}

/*margin: 0 auto; 調整左右的空間*/
html {
  margin: 0 auto;
  padding: 0;
  font-size: 10px;
  font-family: "Tinos", "Noto Sans TC", sans-serif, serif;
}
/*font-family credit to: Google Fonts, "Tinos" and "Noto Sans TC"*/

/*background-color: rgba(160, 150, 215, 0.15);*/
/*background-image credit: https://www.designbolts.com/2012/12/22/50-free-simple-white-seamless-patterns-for-website-backgrounds/*/
body {        
  width: 100%;
  margin: 0 auto;
  padding: 0;
  background-image: url(../imagenes/fondo.jpg);
}

header {
  height: 200px;
  background-image: url(../imagenes/hfondo.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left top;
  max-width: 100%;  
}

.hicono {
  float: left;
  margin: 25px 20px 0px 60px;
  max-width: 100%;
}

/*linear-gradient(rgba(162, 148, 216, 0.15), rgba(0, 220, 255, 0.5)),*/
h1 {
  margin: 0;
  padding: 100px 0;
  color: white;
  text-shadow: -3px 3px 5px black;
  font-size: 6rem;
}

/* If the line height change with the height of box, it will maintain in a acceptable position. */
/*line-height: 200px;
	h1 {
	 
	}
*/
nav {
    position: -webkit-sticky; /* Safari */
	position: sticky;
	top: 0;
}

nav ul {
	display: flex;
	padding: 0;
	margin: 0;
	list-style: none;
}

nav li {
    flex: 1 1 auto;
}

nav a:link,
nav a:visited {
	display: block;
	background-color: rgb(10, 90, 150);
	color: white;
	padding: 10px;
	font-size: 1.4rem;
    text-align: center;
	text-decoration: none;
}

nav a:focus,
nav a:hover,
nav a:active {
    background-color: rgb(20, 5, 130);
	outline: none;
}

/*where the bar begins*/
main {
    display: grid;
	grid-template-columns: 200px 1fr;
	grid-gap: 20px;
	margin: 20px 12% 70px 8%;
}

aside ul {
	display: flex;
	flex-direction: column;
	list-style: none;
    padding: 0;
	margin: 0;
	border: 5px rgb(160, 150, 215) outset;
	text-shadow: -1px 1px 3px black;
	font-weight: bold;
}

aside a:link,
aside a:visited {
	display: block;
	background-color: rgba(160, 150, 215, 0.5);
	color: white;
    padding: 10px;
	text-decoration: none;
    text-align: center;
	font-size: 1.2rem;
}

aside a:hover,
aside a:active {
    background-color: rgba(160, 150, 215, 1);
}

/*where the article begins*/
article {
    background-color: white;
	padding: 0px 20px 20px;
	border-left: 3px solid grey;
	text-align: justify;
}

h2 {
    margin-bottom: 0;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
}

h3 {
	font-size: 24px;
	font-weight: bold;
}
/*
hr {
    size="3px" width="80%" color="gray";
} */

article p, article ul, article ol {
	font-size: 18px;
	line-height: 1.6;
	padding-bottom: 15px;
}

.no_padding_bottom {
	padding-bottom: 0px;
}

.videotime {
	background-color: yellow;
	display: inline-block;
	padding-bottom: 0px;
	margin: 0px;
}

.ajustar_padding{
	padding-left: 40px;
	padding-right: 40px;
	padding-bottom: 0px;
}

.logo {
    float: left;
    margin-top: 1.8rem;
}

table {

  border-collapse: collapse;
  margin-left:auto; 
  margin-right:auto;
  border: 3px solid black;
  font-size: 16px;
  text-align: center;
}

td, th {
  border: 1px solid gray;
}

/*footer starts*/
footer {
    border-top: 1px solid grey;
    margin: 20px 110px 0px;
	text-align: center;
	font-size: 1.4rem;
}

footer p {
	margin: 0.5rem;
}

.fbox {
    width: 100%;
	padding: 10px;
	background-color: rgb(100, 80, 130);
	color: white;
	text-align: center;
	font-size: 1.4rem;
}

#arriba {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 140px;
  right: 10px;
  z-index: 99;
  cursor: pointer;
}

@media screen and (max-width: 1023px) {	
	header {
	  background-position: center;
    }
	
	main {
	  grid-template-columns: 150px 1fr;
	  margin: 20px 70px 70px 30px;
    }
	
	footer {
      margin: 20px 50px 0px 30px;
	  font-size: 1.1rem;
    }
}

@media screen and (max-width: 767px) {
	h1 {
	  font-size: 7vw;
	}

/*為何改不了nav a以及aside a的字體大小?	*/
	nav a:link, aside a:link {
	  font-size: 12px;
	}
	
	h2 {
	  font-size: 4.2vw;
	}
	
	h3 {
	  font-size: 3vw;
	}
	
	article p, article ul, article ol {
	  font-size: 2.4vw;
	}
	
	main {
	  margin: 20px 50px 50px 20px;
    }
	
/*0829不管怎樣嘗試，都還是沒辦法讓照片置中*/
/*或許是因為是grid的關係，另外用position relative也無法達到讓圖片置中的效果*/

    .logo {
	  height: 110px;
	  width: 110px;
	}
	
	footer {
      margin: 10px 10px 0px;
	  font-size: 1.6vw;
    }
	
	.fbox {
	  font-size: 1.6vw;
	}
	
	#arriba {
		bottom: 140px;
		right: 0px;
	}
}

@media screen and (max-width: 479px) {
	.hicono {
	  display:none;
	}
	
	/*logo can't not be centered in the first place
	because "Note that it cannot be centered if the width is set to 100% (full-width)."*/
	/*https://www.w3schools.com/howto/howto_css_image_center.asp*/
	header {
	  height: 125px;
	  background-image: url(../imagenes/logo.png), url(../imagenes/hfondo.jpg);
	  background-size: contain, cover;
	}
	
	h1 {
	  font-size: 0;
	}
	
	nav {
	  position: static;
	}
	
	nav ul {
	  flex-direction: column;
	}
	
	main {
	  display: block;
	  margin: 20px;
	}
	
	aside ul {
	  display: none;
	}
    
	.logo {
	  height: 20vw;
	}
	
	article > h2 {
	  margin-top: 0;
	}
	
	h2 {
	  font-size: 5.5vw;
	}
	
	h3 {
	  font-size: 4vw;
	}
	
	article p, article ul, article ol {
	  font-size: 3.6vw;
	}
	
	footer {
	  font-size: 2vw;
	}
	
	.fbox {
	  font-size: 2vw;
	}
	
	#arriba {
		position: fixed;
		bottom: 150px;
		right: 0;
	}
}