@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&family=Roboto:wght@300;400;500;700&display=swap');

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Set html and body to window height */
html,
body {
  height: 100%;
}

/* Use smooth scrolling and snap scrolling to display each section */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

/* Some base setting for body */
body {
  background-color: #ffffff;
  font-family: sans-serif;
  font-size: 16pt;
  color: #282828;
  text-align: center;
}

/* Applied on all content,
    used to restrict content to maximum 1280px wide
    and minimum 960px wide */
.container {
  width: 1280px;
  min-width: 960px;
  max-width: 1280px;
  margin: 0 auto;
}

/* When window width is smaller than 1280px,
    webpage will shrink to 98% of window width */
@media screen and (max-width: 1280px) {
  .container {
    width: 98%;
  }
}

/* Used as an anchor point for the scroll-snap-type */
.content section {
  scroll-snap-align: center;
}

.content {
  display: flex;
}

/* Applied on all section or div that require a flex display */
.flexDisplay {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Make all child elements of a flexDisplay a flex display */
.flexDisplay * {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.flexDisplay div {
  width: 100%;
}

/* Setting the typography for the website */
h1 {
  font-family: "Roboto", sans-serif;
  font-size: 48px;
  font-weight: 700;
}

h2 {
  font-family: "Roboto", sans-serif;
  font-size: 34px;
  font-weight: 700;
}

h3 {
  font-family: "Roboto", sans-serif;
  font-size: 28px;
  font-weight: 500;
}

h4 {
  font-family: "Roboto", sans-serif;
  font-size: 20px;
  font-weight: 500;
}

.shortblurb {
  font-family: "Roboto", sans-serif;
  font-size: 28px;
  font-weight: 300;
}

p {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.secondary {
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 400;
}

a {
  text-decoration: none;
  transition: 0.4s;
}

a:hover {
  transform: scale(1.1);
  opacity: 0.5;
}






/* Header Website Title */
header {
  background-color: #3f5f7f;
  display: flex;
  scroll-snap-align: center;
}

header .websitetitle {
  justify-content: space-around;
  padding-top: 30px;
}

header .websitetitle h1 {
  font-family: "Roboto", sans-serif;
  font-size: 32px;
  font-weight: 300;
  color: #ffffff;
  justify-content: center;
}

header .background,
header .foreground {
  height: 6px;
}

header .websitetitle .background {
  background-color: #89c9e5;
  width: 20%;
}

header .websitetitle .foreground {
  background-color: #def3fc;
  width: 50%;
}

header .left {
  justify-content: flex-end;
}

header .right {
  justify-content: flex-start;
}





/* Navigation Bar */
nav {
  background-color: #3f5f7f;
  display: flex;
  height: 70px;
  z-index: 100;
  transition: 1s ease;
}

/* Add to the nav bar after scroll over header */
/* Make the nav bar sticky on top */
.sticky {
  background-color: rgba(63, 95, 127, 0.8);
  position: sticky;
  top: 0;
}

nav .navbar {
  position: relative;
}

/* Set the typography for nav bar */
nav a {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  width: 140px;
  padding: 10px 10px;
}

nav a.logo {
  width: 100px;
  margin: 0 20px;
}

/* Change the appearance of navigation link when hovered */
nav a:hover,
nav span:hover {
  background-color: #def3fc;
  color: #3f5f7f;
  opacity: 1;
}

nav a:hover {
  transform: scale(1);
}

nav img.blue {
  display: none;
}

nav a:hover img.white {
  display: none;
}

nav a:hover img.blue {
  display: flex;
}

/* Travel Diary link */
nav span {
  flex-direction: column;
}

/* Secondary nav under Travel Diary */
/* Hide it by default */
nav .navbar span span {
  background-color: #def3fc;
  display: none;
  flex-direction: column;
  position: absolute;
  top: 75%;
  z-index: 100;
  box-shadow: 0 2px 4px #89c9e5;
}

/* Secondary nav under Travel Diary */
nav .navbar span span a {
  justify-content: flex-start;
  text-align: left;
  color: #3f5f7f;
  width: 140px;
  padding-left: 30px;
  margin: 0;
}

/* Display the secondary nav when its parent is hovered */
nav span:hover span {
  animation-name: fade_in;
  animation-duration: 0.5s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
  display: flex;
  z-index: 100;
  opacity: 0;
}

nav span span a:hover {
  background-color: #89c9e5;
  color: #ffffff;
}




/* Create parallax scrolling effect on background images */
.parallax {
  height: 100%;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Applied on every firts section of a webpage */
.firstsection {
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100vh;
  padding-top: 100px;
  margin: 0 auto;
}

/* Applied on every following sections after the first section */
.card {
  width: 90%;
  height: 100vh;
  padding: 40px 0;
  margin: 0 auto;
}

/* The transparent box inside each non-first-section */
.card .transbox {
  flex-direction: column;
  justify-content: space-around;
  height: 90%;
  border-radius: 0;
}

/* Applied on all page title and section title */
.sectiontitle {
  flex-direction: column;
  padding: 10px 0 20px 0;
}

.sectiontitle p {
  text-align: left;
  width: 60%;
  padding-top: 20px;
}

/* A line used to seperate the first section from the rest */
.line {
  background-color: #89c9e5;
  width: 90%;
  height: 3px;
  opacity: 0.6;
}

/* A transparent box */
.transbox {
  background-color: rgba(63, 95, 127, 0.7);
  color: #ffffff;
  padding: 2%;
  border-radius: 10px;
  box-shadow: 0 0 8px #282828;
}

.transbox h3 {
  color: #def3fc;
}

.transbox p {
  padding: 15px 0;
}

/* A box which distribute its child elements in balance */
.horizontal {
  padding: 10px 0;
}

.horizontal a,
.flexDisplay .horizontal a {
  margin: 0 2%;
}





/* Specific settings for content of each page */

/* Settings for short blurb box */
#shortblurbBox {
  padding-top: 60px;
  padding-bottom: 10px;
}

#shortblurbBox .transbox,
#travelagentBox .transbox {
  background-color: rgba(40, 40, 40, 0.7);
}

#shortblurbBox .transbox {
  width: 60%;
  height: 80px;
}

/* Settings for extended paragraph box on home page */
#travelagentBox {
  justify-content: flex-start;
  padding-top: 10px;
  padding-bottom: 100px;
  padding-left: 5%;
}

#travelagentBox .transbox {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 40%;
  min-width: 360px;
  height: 380px;
}

#shortblurbBox span,
#travelagentBox span {
  font-weight: 700;
  padding: 0 5px;
}

#travelagentBox a {
  color: #89c9e5;
}

#travelagentBox a:hover {
  color: #89c9e5;
  transform: scale(1);
}

/* Settings for about boxes on about page */
#aboutBox {
  justify-content: space-around;
  width: 80%;
}

/* The portrait image */
#aboutBox img {
  max-height: 480px;
  height: auto;
  width: 30%;
  border-radius: 10px;
  box-shadow: 0 0 10px #282828;
}

#aboutBox .transbox {
  background-color: rgba(40, 40, 40, 0.7);
  width: 60%;
  height: 80%;
}

#aboutBox .transbox p {
  text-align: left;
  line-height: 2;
}

/* Settings for contact boxes */
#contactBox {
  height: 60%;
}

#contactBox .transbox {
  flex-direction: column;
  align-items: center;
  width: 30%;
  height: 90%;
  margin: 0 40px;
}

#contactBox .transbox h3 {
  padding: 10px 0;
}



/* The gallery on the first section of TravelDiary, Asia, Europe, Africa, Oceania */
.gallery {
  flex-wrap: wrap;
  align-items: center;
  width: 80%;
  height: 75%;
  padding: 20px 0 40px 0;
}

/* Set the gallery box on the TravelDiary */
.gallery .column {
  background-attachment: scroll;
  width: 40%;
  height: 48%;
  margin: 5px;
  transition: 1s ease;
}

/* Set the gallery box on the Asia, Europe, Africa, Oceania */
.gallery.region .column {
  width: 30%;
  height: 90%;
}

/* Effects when hover over the gallery box */
.gallery .column:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 10px #282828;
  z-index: 2;
}

.gallery .column .overlay {
  font-family: "Roboto", sans-serif;
  font-size: 0px;
  font-weight: 300;
  color: #282828;
  height: 100%;
  transition: 1s ease;
}

.gallery .column:hover .overlay {
  background-color: rgba(255, 255, 255, 0.5);
  font-size: 48px;
}






/* Contact Form */
.card form {
  /* the area and style of the form "box" */
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding-bottom: 50px;
}

.card form label {
  /* the style for the labels */
  flex-direction: column;
  width: 100%;
  padding: 10px 20%;
}

.card form p {
  justify-content: flex-start;
  width: 100%;
}

.card form span {
  justify-content: flex-start;
}

.card form .inputField {
  justify-content: flex-start;
  padding-top: 10px;
}

.card form span,
.card form input {
  width: 40%;
}

.card form label .right {
  margin-left: 20%;
}

.card form input,
.card form textarea {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  background: #ffffff;
  border: 1px solid #3f5f7f;
}

.card form .message {
  padding: 10px 10px;
  width: 100%;
  height: 140px;
  overflow: scroll;
  resize: none;
}

.card form .submit {
  align-self: flex-end;
  width: 150px;
  height: 50px;
  padding: 0;
  margin-right: 20%;
}

.card form .button {
  background-color: #89c9e5;
  font-size: 14px;
  color: #282828;
  width: 120px;
  height: 30px;
  border: none;
  box-shadow: 3px 3px #3f5f7f;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.5s ease;
  opacity: 1;
}

.card form .button:hover {
  background-color: #def3fc;
  transform: scale(1.2);
}

.card section {
  flex-direction: column;
  width: 100%;
}

.card .horizontal a {
  border-radius: 20px;
}


/* Subscription Form */
.subscriptionForm label.inputField {
  flex-direction: row;
  justify-content: center;
}

.subscriptionForm label input {
  box-shadow: 2px 2px 2px #282828;
}

.subscriptionForm label .input_text {
  width: 70%;
  height: 30px;
  border: 0px;
}

.subscriptionForm label .button {
  width: 20%;
  height: 30px;
  border-radius: 0;
}




/* Slideshow Gallery */
.flexDisplay .slideshow {
  position: relative;
  width: 630px;
  height: 420px;
  box-shadow: 0 0 10px #282828;
}

.slides {
  display: none;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  animation-name: fade_in;
  animation-duration: 1s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}

.slides img {
  width: 100%;
}

.arrows {
  justify-content: space-between;
  position: absolute;
  height: 80px;
  padding: 0 2%;
}

.prev,
.next {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  padding: 10px;
  border-radius: 5px;
  user-select: none;
  cursor: pointer;
  z-index: 3;
}

.prev:hover,
.next:hover {
  background-color: rgba(40, 40, 40, 0.8);
  opacity: 1;
}

.numbertext-box {
  justify-content: flex-start;
  position: absolute;
  top: 0;
  padding: 10px;
  z-index: 2;
}

.numbertext-box .numbertext {
  color: #ffffff;
  padding: 0;
}

.dot-box {
  padding: 20px 0 5px 0;
}

.dot {
  background-color: #282828;
  height: 8px;
  width: 8px;
  margin: 0 6px;
  border-radius: 50%;
  opacity: 0.4;
  cursor: pointer;
  transition: 0.5s ease;
}

.active,
.dot:hover {
  background-color: #282828;
  opacity: 0.8;
  transform: scale(1.5);
}






/* Lightbox Gallery */
.modal {
  background-color: rgba(40, 40, 40, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  overflow: auto;
  animation-name: fade_in_from_zero;
  animation-duration: 0.6s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}

.modal-content {
  flex-direction: column;
  width: 80%;
  position: relative;
  margin: 0 auto;
}

.lightbox .slides {
  cursor: default;
}

.close {
  font-size: 35px;
  font-weight: bold;
  color: #ffffff;
  position: absolute;
  top: 10px;
  right: 25px;
  cursor: pointer;
}

.close:hover,
.close:focus {
  opacity: 0.5;
}

.caption-box {
  background-color: rgba(63, 95, 127, 0.5);
  height: 40px;
  color: #ffffff;
}


/* WechatQR & Newsletter modal box */
.footerModal .container {
  position: absolute;
  animation-name: slide_in;
  animation-duration: 0.5s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}

.footerModal .modal-content {
  background-color: #ffffff;
  width: 60%;
  height: auto;
  justify-content: flex-start;
  padding: 0;
  border-radius: 15px 15px 10px 10px;
  box-shadow: 0 0 10px #282828;

}

.footerModal .horizontal {
  background-color: #3f5f7f;
  padding: 20px;
  border-radius: 10px 10px 0 0;
}

.footerModal .horizontal h3 {
  color: #ffffff;
}

.footerModal .close {
  font-weight: normal;
  width: 40px;
  height: 40px;
  top: 5px;
  right: 10px;
}

/* Newsletter modal box */
.newsletter .subscriptionForm {
  height: 160px;
  padding: 0;
}

.newsletter .subscriptionForm label {
  padding: 10px 5%;
}

.newsletter .subscriptionForm .input_text {
  background-color: #e0e0e0;
}

/* WechatQR modal box */
.wechatQR .modal-content {
  width: 400px;
}

.wechatQR img {
  padding: 20px 0;
}






/* Footer */
footer {
  background-color: #3f5f7f;
  display: flex;
  scroll-snap-align: center;
}

footer p,
footer a {
  color: #ffffff;
}

footer .sitelink {
  margin-top: 20px;
}

footer .sitelink a {
  width: 80px;
}

footer .footerInfo {
  margin: 20px 0;
  justify-content: center;
}

footer .footerInfo section {
  flex-direction: column;
  justify-content: space-around;
  width: 20%;
  height: 100px;
}

footer .footerInfo .copyright {
  width: 25%;
}

footer section button {
  background-color: #def3fc;
  color: #3f5f7f;
  width: 120px;
  height: 32px;
  border: 0;
  box-shadow: 0 4px #89c9e5;
  transition: 0.4s;
}

footer section button:hover {
  cursor: pointer;
  opacity: 0.5;
}







/* Background Images */
#homebackground {
  background-image: url(../images/home-background.jpg);
  scroll-snap-align: center;
  overflow: hidden;
}

#aboutbackground {
  background-image: url(../images/about-background.jpg);
}

#asiaGallery {
  background-image: url(../images/CrouchingDragonBay-diary.jpg);
}

#europeGallery {
  background-image: url(../images/Hallstatt-diary.jpg);
}

#africaGallery {
  background-image: url(../images/Sahara-diary.jpg);
}

#oceaniaGallery {
  background-image: url(../images/12Apostle-diary.jpg)
}

#xinjiangGallery {
  background-image: url(../images/CrouchingDragonBay-asia.jpg);
}

#hokkaidoGallery {
  background-image: url(../images/CapeKamui-asia.jpg);
}

#chiangmaiGallery {
  background-image: url(../images/Pai-YunLaiViewPoint-asia.jpg);
}

#austriaGallery {
  background-image: url(../images/Hallstatt-europe.jpg);
}

#czechGallery {
  background-image: url(../images/PragueCastle-europe.jpg);
}

#icelandGallery {
  background-image: url(../images/Skogafoss-europe.jpg);
}

#moroccoGallery {
  background-image: url(../images/Casablanca-africa.jpg);
}

#chefchaouenGallery {
  background-image: url(../images/BlueHouse-africa.jpg);
}

#saharaGallery {
  background-image: url(../images/SaharaDesert-africa.jpg);
}

#sydneyGallery {
  background-image: url(../images/OperaHouse-oceania.jpg);
}

#melbourneGallery {
  background-image: url(../images/StateLibrary-oceania.jpg);
}

#oceanroadGallery {
  background-image: url(../images/12Apostle-oceania.jpg);
}

/* Animation */
@keyframes fade_in {
  from {
    opacity: 0.4;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade_in_from_zero {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide_in {
  from {
    top: 0
  }

  to {
    top: 15%;
  }
}