@font-face {
  /*NEW*/
  font-family: Quicksand;
  src: url(../fonts/Quicksand.ttf);
}

body {
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  background-color: #ffffff;
}

#wrapper {
  max-width: 1366px;
  min-height: 100vh;
  margin: 0 auto; /*for wrapper only, doesn't effect.*/
  padding: 2em;
  position: relative;
  z-index: 1;
  /*z-index property controls stacking order of elements - which appears on top of others when
  they overlap. High z-index values > lower values, only works on positioned elements.*/
}

/* Navigation 'Nav' styling */
nav {
  display: grid;
  grid-template-areas: "logo" "nav-list";
  grid-template-columns: 1fr 5fr;
}

#logo {
  grid-area: logo;
  /* margin-left: 5em; /*Shifts logo image to right.*/
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #6c7c59;
  border-bottom: 4px solid #7ca36e;
  max-height: 2.8rem;
}

#nav-list {
  grid-area: nav-list;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-decoration: none;
  gap: 1em;
  /* padding: 1em 1em;
  margin: 1px; */
}

.nav-list a {
  display: block;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  text-align: center;
  padding: 5px 30px;
  /* list-style: none;
  font-weight: bolder;
  margin-right: auto;
  margin-left: 4em; aligns list text to left slightly */
  cursor: pointer;
}

.nav-list a:hover {
  transition: background 0.3s ease-in-out, box-shadow 0.3s;
  color: #4a4860;
  background: #ffc4eb;
  box-shadow: 0px 4px 0px 0px #e09bb2;
}

button#heart-trigger.heart.heart-trigger {
  border: none;
  background: none;
}

.heart {
  font-size: 1.5rem;
  color: #ff9fc4;
  display: inline-block;
  position: relative;
}

.heart.heart-trigger {
  width: 45px;
  justify-content: center;
  align-items: center;
}

.heart:hover {
  color: #a5c77d;
  transition: 0.3s;
}

.heart-trigger {
  display: block;
  order: -1;
  padding: 12px 30px;
  /* @media screen and (max-width: 800px) {
    order: initial; test ignore pls ignore.
  } */
}

/*Styling for Index page.*/

#homepage {
  background-color: #d5d5d5;
  max-width: 100%;
  grid-area: content;
  display: grid;
  min-height: 768px;
  max-width: 1366px;
  margin: 0 auto;
  grid-template-areas: /*two sections.*/
    "landing"
    "welcome";
  grid-template-rows: 1fr;
}

#welcome {
  background-color: #ffffec;
  margin: 2%;
  padding: 1em;
  border-radius: 10px;
  border: 2px solid #ffc2dc;
  box-shadow: 0 0 15px #c6d8ff;
}

#hero {
  background-color: #c1e9ff;
  padding: 1em;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(#ffffff, #ffffff80);
  align-self: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  justify-content: center;
  position: relative;
}

#hero h1 {
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 3px;
  color: #61333d;
}

#welcome h2,
#welcome h3 {
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  letter-spacing: 2px;
}

.body2 {
  font-size: 0.8rem;
}

/*Gallery*/

#gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2em;
  padding: 2em;
  margin: 0 auto;
}

#gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

/*About.*/

#about {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /*Must change to 1,1 for mobile*/
  background-color: #ffffff;
  padding: 3em;
}

#about-text {
  background-color: #ffffec;
  border: 2px solid #ffc2c2;
  max-width: 430px;
  padding: 2em;
  border-radius: 10px;
  box-shadow: 0 0 15px #bebebe;
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  letter-spacing: 1px;
  line-height: 150%;
}

#about-text h1 {
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  font-size: 2rem;
  letter-spacing: 3px;
}

#sample {
  padding: 1em;
  margin-left: auto;
}

#sample img {
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

/*References.*/

#ref-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: #ffffff;
  padding: 3em;
}

#references {
  max-width: 430px;
  padding: 2em;
  font-family: Verdana, "Trebuchet MS", sans-serif;
  letter-spacing: 1px;
  line-height: 150%;
}

.references h1,
.references h2,
.references h3 {
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  letter-spacing: 5px;
}

#ref-images {
  padding: 1em;
  margin-left: auto;
}

#ref-images img {
  width: 100%;
  max-width: 400px;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

/*Contact Form.*/

#contact-container h2 {
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  letter-spacing: 5px;
  text-align: center;
  color: #b94d71;
}

#contact-container {
  background-color: #ffffff;
  padding: 1em;
}

#contact-form {
  background-color: #ffffec;
  max-width: 550px;
  margin: 0 auto;
  padding: 1em;
  border-radius: 10px;
  box-shadow: 0 0 15px #bebebe;
}

#contact-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

#contact-form legend {
  font-size: 0.9rem;
  margin-bottom: 1em;
  color: #3d3d3d;
  letter-spacing: 1px;
}

#contact-form label {
  position: relative;
  display: block;
  margin-top: 1em;
  font-weight: 500;
}

#contact-form select,
#contact-form textarea {
  width: 100%;
  padding: 0.8em;
  margin-top: 0.3em;
  border: 1px solid #c2c2c2;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

fieldset {
  /* background-color: #81c467; */
  width: 100%;
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: auto;
}

#contact-form textarea {
  min-height: 120px;
}

#contact-form .one {
  margin-top: 1em;
  margin-left: 50px;
}

#contact-form .one label {
  display: flex;
  width: 300px;
  font-size: 0.8rem;
  flex-direction: row-reverse;
  padding: 0.5em;
  gap: 1em;
}

.one {
  font-size: 0.7rem;
}

#contact-form button.submit {
  margin-top: 1.5em;
  width: 100%;
  padding: 1em;
  background-color: #aaaaaa;
  color: #ffffff;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#contact-form button.submit:hover {
  background-color: #a3c760;
  transition: background-color 0.3s ease;
}

/*tooltips and error messages.*/
.tooltip {
  position: absolute;
  visibility: hidden;
  font-weight: normal;
  color: #fff;
  background-color: #424242;
  border: solid 2px #ffffff;
  padding: 0.5em;
  font-size: small;
  width: 270px;
  margin-left: 3rem;
  margin-top: -1rem;
}

span.error {
  padding: 10px;
  color: #520000;
  font-style: italic;
  font-size: 0.7rem;
}

.success {
  color: #45bd00;
}

span.success {
  padding-left: 10px;
}

/*Footer styling*/

footer {
  font-family: Quicksand, Verdana, "Trebuchet MS", sans-serif;
  display: flex;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 1.5em;
  gap: 3em;
  font-size: 1rem;
  color: #3f580f;
  text-transform: uppercase;
  background-color: #faffff;
}

footer ul {
  list-style: none;
  display: flex;
  flex-direction: row;
}

footer ul, a, li {
  text-decoration: none;
}

footer a:link {
  color: #3f580f;
}

footer a:visited {
  color: #3f580f;
}

footer a:hover {
  color: #cf6748;
}

footer a:active {
  color: #3f580f;
}

footer ul li {
  margin: 1em;
  letter-spacing: 1px;
}

footer h4 {
  letter-spacing: 1px;
  padding: 10px;
}

/* Small devices for phones, less than 800px */
@media screen and (max-width: 600px) {
  nav {
    grid-template-columns: 1fr;
    min-height: 1rem;
  }
  header {
    max-height: none;
  }
  .nav-list {
    display: none;
    margin: 0.5rem;
    padding: 0.1rem;
  }
  .nav-list.hidden {
    display: block;
    flex-direction: column;
    padding: 1em;
  }
  .nav-list a {
    margin: auto;
    font-size: 1rem;
  }
  #logo {
    margin: 0;
  }

  .heart {
    font-size: 1.2em;
    align-items: center;
  }

  #gallery {
    grid-template-columns: repeat(1, 1fr);
  }

  #about {
    grid-template-columns: 1fr; /*Single column layout*/
  }

  #contact-form {
    padding: 1em
  }
  
  #contact-form .one label {
    width: 160px;
    font-size: 0.8rem;
    flex-direction: row-reverse;
  }

  #ref-container {
    grid-template-columns: 1fr;
  }

  footer {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    gap: 1em;
    padding: 1em;
  }

  footer ul {
    flex-direction: column;
  }

  footer ul li {
    margin: 0.5em;
  }
}

/*For Gallery Only*/
@media screen and (min-width: 600px) and (max-width: 1250px) {
  #gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large devices 1920px and above. May have to change it to 1400px. */
@media screen and (max-width: 1920px) {
  #wrapper {
    max-width: 1890px;
  }
}

/* backup code
 #hero img {
  max-width: 100%;
  height: auto;
} */
