/* ==========================================================================
   Portfolio - property map and list

   The map fills the left two thirds of .ma-container (sized by the Webflow
   stylesheet) and the list scrolls beside it. On small screens the map sits
   above the list and the page scrolls normally.

   Markup: portfolio.php   Behaviour: js/portfolio-map.js
   ========================================================================== */

@font-face {
  font-family: "flam-med";
  src: url("../fonts/flam-med.woff") format("woff");
  font-display: swap;
}

.property-browser {
  background: #f5f5f5;
  font-family: "flam-med", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* Map
   ========================================================================== */

.property-map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 66%;
}

/* Webflow caps every image at 100% width, which distorts Google's map tiles. */

.property-map img {
  max-width: none;
}

/* Info window shown when a marker is clicked. */

.map-popup {
  font-family: "flam-med", Arial, sans-serif;
  text-align: center;
}

.map-popup__image {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.map-popup__name {
  margin: 0;
  padding: 10px 0 5px;
  color: #333;
  font-family: inherit;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.5;
}

.map-popup__address {
  margin: 0 0 10px;
  color: #777;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

.map-popup__link {
  display: block;
  width: 140px;
  height: 25px;
  margin: 0 auto;
  background: #364959;
  color: #fff;
  line-height: 25px;
  text-decoration: none;
}

/* List
   ========================================================================== */

.property-list {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 33.333%;
  margin: 0;
  padding: 0;
  overflow-y: scroll;
  list-style: none;
}

.property-card {
  display: flex;
  align-items: flex-start;
  width: 96%;
  margin: 0 0 30px 2%;
  padding: 30px 15px;
  background: #fff;
  box-shadow: 3px 6px 16px 0 rgba(115, 115, 115, 0.5);
  opacity: 0.9;
}

.property-card__image {
  flex: none;
  width: 25%;
  height: auto;
  margin-top: 5px;
  box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.28);
}

.property-card__body {
  flex: 1;
  min-width: 0;
  padding-left: 30px;
}

.property-card__name {
  margin: 0;
  padding: 0 0 5px;
  color: #333;
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1.1;
  text-transform: uppercase;
}

.property-card a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

.property-card__address {
  display: block;
  padding-bottom: 15px;
  font-size: 1rem;
}

.property-card a.property-card__address {
  color: #999;
}

.property-card__contact {
  margin: 0 0 15px;
  color: #222;
  font-size: 0.775rem;
  line-height: 1.5rem;
}

.property-card__divider {
  margin: 0 0.3em;
  font-size: 1rem;
}

.property-card a.property-card__button {
  display: block;
  width: 210px;
  max-width: 100%;
  height: 40px;
  border-radius: 5px;
  background-color: #364959;
  box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

/* Icons: the shape comes from the SVG, the colour from the surrounding text. */

.icon {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.35em;
  background-color: currentColor;
  vertical-align: -0.08em;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.icon--marker {
  -webkit-mask-image: url("../images/icons/marker.svg");
  mask-image: url("../images/icons/marker.svg");
}

.icon--phone {
  -webkit-mask-image: url("../images/icons/phone.svg");
  mask-image: url("../images/icons/phone.svg");
}

.icon--mail {
  -webkit-mask-image: url("../images/icons/mail.svg");
  mask-image: url("../images/icons/mail.svg");
}

/* Small screens
   ========================================================================== */

@media screen and (max-width: 768px) {
  .ma-container.property-browser {
    height: auto;
    overflow: visible;
  }

  .property-map {
    position: relative;
    width: 100%;
    height: 60vh;
  }

  .property-list {
    position: static;
    width: 100%;
    padding: 20px 0 1px;
    overflow: visible;
  }

  .property-card {
    padding: 20px 15px;
    margin-bottom: 20px;
  }

  .property-card__body {
    padding-left: 15px;
  }

  .property-card__name {
    font-size: 1.5rem;
  }

  .property-card__address {
    font-size: 0.9375rem;
  }

  .property-card__divider {
    display: none;
  }

  .property-card__contact a {
    display: block;
    overflow-wrap: anywhere;
  }
}
