/*
 * SECTIONS 1 to 6
*/

/* SHARED */

@media (min-width: 992px) {
  section {
    min-height: 100vh;
  }
}

section {
  padding: 50px 0;
}

section p {
  font-size: 17px;
}

h1 {
  font-size: 17px;
  display: inline;
}

h2 {
  font-size: 36px
}

/* SECTION ONE */

section:first-child {
  padding-top: 40px;
}

section:first-child p, section:first-child h2 {
  text-align: left;
}

h1 + p {
  display: inline;
}

section:nth-child(1) nav:after {
  top: -20px;
  right: 250px;
  bottom: auto;
  left: auto;
  border-color: transparent #4b4b4d;
}

@media (min-width: 992px) {
  section:first-child p, section:first-child h2 {
    text-align: right;
  }
}

/* SECTION TWO */

section:nth-child(2) p, section:nth-child(2) h2 {
  text-align: right;
}

.link-list {
  list-style: none;
  margin-top: 40px;
}

.link-list li {
  font-size: 20px;
}

@media (min-width: 992px) {
  section:nth-child(2) p, section:nth-child(2) h2 {
    text-align: center;
  }
}

/* SECTION THREE */

section:nth-child(3) h2 {
  text-align: center;
}

/* SECTION FOUR */

section:nth-child(4) nav:after {
  top: -20px;
  right: 250px;
  bottom: auto;
  left: auto;
  border-color: transparent #4b4b4d;
}

section:nth-child(4) p, section:nth-child(4) h2 {
  text-align: left;
}

section:nth-child(4) h3 {
  text-align: right;
  text-transform: uppercase;
}

section:nth-child(4) h4 {
  text-align: center;
}

@media (min-width: 992px) {
  section:nth-child(4) nav {
    margin-top: 50px;
  }
}

/* SECTION FIVE */

section:nth-child(5) .row:first-of-type img {
  margin: 35vh 0;
}

section:nth-child(5) .row:nth-of-type(2) p, section:nth-child(5) h2 {
  text-align: left;
}

section:nth-child(5) h3 {
  text-align: right;
  text-transform: uppercase;
}

@media (min-width: 992px) {
  section:nth-child(5) .row:first-of-type img {
    margin: 25vh 0;
  }
}

/* SECTION SIX */

section:nth-child(6) .comment {
  margin-bottom: 25px;
}

section:nth-child(6) .comment p {
  font-size: 14px;
  font-style: normal;
}

@media (min-width: 992px) {
  section:nth-child(6) .row:nth-of-type(1) {
    padding: 200px 0 50px 0;
  }
}

.latest-properties > div {
  cursor: pointer;
  padding: 20px;
  border-bottom: 1px solid #4b4b4d;
}

.latest-properties > div > .overlay {
  width: calc(100% - 40px);
  background: rgba(0,0,0,0);
  height: calc(100% - 40px);
  position: absolute;
  -webkit-transition: all 200ms ease-in-out;
  -moz-transition: all 200ms ease-in-out;
  -o-transition: all 200ms ease-in-out;
  transition: all 200ms ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.latest-properties > div:hover > .overlay {
  background: rgba(0,0,0,.5);
}

.latest-properties > div > .overlay > .btn {
  display: none;
}

.latest-properties > div:hover > .overlay > .btn {
  display: block;
}

.latest-properties > div:last-child {
  border-bottom: none;
}

.latest-properties > div > img {
  object-fit: cover;
  height: 240px;
  width:100%
}

@media (min-width: 992px) {
  .latest-properties > div {
    border: 1px solid #4b4b4d;
  }

  .latest-properties > div:first-child, .latest-properties > div:nth-child(2), .latest-properties > div:nth-child(3) {
    border-top: none;
  }

  .latest-properties > div:first-child, .latest-properties > div:nth-child(4), .latest-properties > div:nth-child(7) {
    border-left: none;
  }

  .latest-properties > div:nth-child(3), .latest-properties > div:nth-child(6), .latest-properties > div:last-child {
    border-right: none;
  }

  .latest-properties > div:nth-child(7), .latest-properties > div:nth-child(8) {
    border-bottom: none;
  }

  .latest-properties > div:first-child, .latest-properties > div:nth-child(3), .latest-properties > div:last-child {
    background: url(../img/x.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center
  }

  .latest-properties > div:nth-child(5), .latest-properties > div:nth-child(7) {
    background: url(../img/O.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center
  }
}

.latest-properties > div .item-contract {
  position: absolute;
  top: 30px;
  right: 20px;
  text-transform: uppercase;
  color: #fff;
  font-weight: bold;
  padding: 5px 10px;
}

.latest-properties > div .item-contract.Affitto {
  background: #9DBC3C;
}

.latest-properties > div .item-contract.Vendita {
  background: #EB3CF5;
}

.latest-properties > div .item-description {
  position: absolute;
  padding: 20px;
  bottom: 0;
  left: 0;
  margin: 0;
  width: 100%;
}

.latest-properties > div .item-title {
  display: inline-block;
  color: #fff;
  text-shadow: 1px 1px 1px #000;
  padding: 0 5px;
}

.item-info {
  display: inline-block;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 10px;
}

.item-info a, .item-info a:hover {
  color: #EB3CF5;
}

#aside_search {
  position: fixed;
  border: 1px solid #000;
  border-radius: 3px 0 0 3px;
  width: 300px;
  padding: 20px;
  right: -300px;
  background: #fff;
  top: calc(50% - calc(430px / 2));
  transition: all 300ms ease-in-out;
  z-index: 999;
}

button[name="toggle_search"] {
  position: fixed;
  top: 20px;
  right: 20px;
}

#aside_search.open {
  right: 0;
}
