CSS/* CSS Document */
/* BODY, NAVIGATION */

@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');

* { margin:0; padding:0; }

body {
  background-color: white;
  height: 100%;
  //text-align: center;
  margin: 0;
  padding: 0;
}

.container{
  display: grid;
  grid-template-rows: 3fr 4fr 1fr;
  grid-template-columns: 3fr 4fr 4fr;
  grid-template-areas:
    "header header header"
    "main main aside"
    "footer footer footer";
  grid-gap: .75em;
  max-width: 1565px;
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

@media(max-width: 768px){
  grid-template-rows: 1fr 1fr 5fr 1fr;
  grid-template-columns: 2fr 5fr 3fr;
  grid-template-areas:
  "header header header"
  "main main main"
  "aside aside aside"
  "footer footer footer";
  }
}

header {
  grid-area: header;
}

nav{
  grid-area: nav;
  background-color: tomato;
}

main{
  grid-area: main;
  margin:auto;
}

aside{
  grid-area: aside;
  margin-top: 30px;
}

footer{
  grid-area: footer;
  position: fixed;
  background-color: black;
  width: 100%;
  max-width: 1565px;
  height: 60px;
  bottom:0;
}

.header {
  display: block;
  position: top;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  overflow: auto;
  right: 0;
  top: 0;
  -o-object-fit: contain;
  object-fit: contain;
}

h1 {
  font-size: 1.3em;
  margin: 0.67em 0;
  font-family: 'Lato', sans-serif;
}

h2 {
  margin-right: 60px;
  color: rgba(60, 60, 60);
  font-size: 15px;
  font-family: 'Lato', sans-serif;
  text-decoration: none;
  display: block;
}

h3 {
  font-size: 16px;
  margin:15px 15px 8px 15px;
  color: white;
  font-family: 'Lato', sans-serif;
  text-decoration: none;
  display: block;
}

a:link {
  color: rgba(255, 255, 255);
  text-decoration: none;
}

a:visited {
  color: black;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#property {
  margin-left: 60px;
  margin-bottom: 60px;
}

#details {
  margin: auto;
  width: 90%;
  left: 0;
}

.mainImg {
  width: 90%;
}

.gallery {
  /* (B1) GRID LAYOUT - 3 IMAGES PER ROW */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px;

  /* (B2) OPTIONAL WIDTH RESTRICT */
  width: 90%;
  max-width: 1000px;
  margin-bottom: 5px;
}

.gallery img {
  /* (C1) DIMENSION */
  width: 100%;
  margin-top: 5px;
  /* (C3) IMAGE RESIZE */
  /* cover | contain | fill | scale-down */
  object-fit: contain;
  position: relative;
}

.gallery img:hover {
  z-index: 9;
  transform: scale(1.1);
  /* linear | ease | ease-in | ease-out | ease-in-out */
  transition: transform ease 0.3s;
}

.gallery img.full {
  position: fixed;
  top: 0; left: 0; z-index: 999;
  width: 100vw; height: 100vh;
  object-fit: fit;
  background: rgba(0, 0, 0, 0.7);
}

.gallery img.full:hover {
  z-index: 999;
  transform: none;
}


@media(max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  #property {
    width: 90%;
    margin: 5px 25px 0px 35px;
  }
  #details {
    width: 90%;
    margin: 0px 0px 80px 30px;
    background-color: blue;
  }
  h2 {
    margin-left: 20px;
    color: rgba(60, 60, 60);
    font-size: 15px;
    font-family: 'Lato', sans-serif;
    text-decoration: none;
    display: block;
  }
}
