/* Exclude phones and tablets */

  @media (min-width: 992px) {
    .vertical-center {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      -webkit-transform: translateY(-50%);
      -ms-transform:translateY(-50%);
    }
    .affix-elements {
      padding-top: 20px;
    }
    .affix {
      width: 360px;
      position: fixed!important;
    }
    .affix-top {
      position: absolute;
    }
    .affix-bottom {
      width: 360px;
      position: absolute;
      top: auto;
    }
    .thumbnail .title-image a:hover:before, #mg_property_listings .property-listing .photo a:hover:before {
      content: ' ';
      width: 100%;
      height: 100%;
      display: block;
      z-index: 1;
      position: absolute;
      top: 0;
      opacity: .6;
    }
    .thumbnail .title-image a:hover:after, #mg_property_listings .property-listing .photo a:hover:after {
      width: 50px;
      height: 50px;
      padding: 0;
      opacity: .9;
      font-size: 50px;
      color: #ffffff;
      display: inline-block;
      vertical-align: middle;
      background-size: cover;
      position: absolute;
      z-index: 2;
      font-family: "Font Awesome 6 Pro";
      font-weight: 900;
      content: "\f00e";
      top: 0;
      left: 0;
      bottom: 0;
      right: 0;
      margin: auto;
    }
    .thumbnail {
      min-height: 351px;
    }
  }

/* Medium devices */

  @media (min-width: 992px) and (max-width: 1199px) {
    .affix, .affix-bottom {
      width: 293px;
    }
    .galleria-container, #map, .map-container {
      width: 625px!important;
      height: 500px!important;
      padding: 0;
    }
    #video {
      width: 625px;
    }
    #property .property-4 {
      display: none;
    }
    .thumbnail .caption h3 .listing-type-price {
      font-size: 16px;
    }
    .thumbnail {
      min-height: 306px;
    }
  }

/* Tablets */
  @media (min-width: 768px) and (max-width: 991px) {

    .galleria-container, #map, .map-container {
      width: 720px;
      height: 600px!important;
      padding: 0;
    }
    #main_menu .navbar-nav>.active>a, #main_menu .navbar-nav>.active>a:hover, #main_menu .navbar-nav>.active>a:focus, #main_menu .nav>li>a:hover, .nav>li>a:focus {
      border-bottom: 0;
    }
    .navbar-nav > li > a {
      padding: 15px;
    }
    .container {
      width: 90%;
      min-width: 750px;
    }
    .thumbnail {
      min-height: 257px;
    }
    .thumbnail .caption h3 .listing-type-price {
      font-size: 15px;
    }
    .property-4 {
      display: none;
    }

  }

/* Tablets and phones */

  @media (max-width: 991px) {

    #property .contact {
      margin-top: 15px;
    }
    .affix-elements {
      width: 100%!important;
    }

    .navbar-brand .user-content img {
      width: auto;
      height: auto;
      max-width: 90%;
      max-height: 150px;
      display: block;
    }

    .aside {
      padding-inline: 1rem;
      margin-bottom: 1rem;
      box-shadow: unset;
      background-color: unset;
    }

    .aside .separator {
      padding-block: 0;
    }

    .aside .separator h3 {
      margin-bottom: 0;
    }

    .properties-header .sort-by-container {
      width: 100%;
    }

    .property-actions-mobile .toggle-map,
    .property-actions-mobile .toggle-filters {
      border-radius: 0;
    }

    #main_menu {
      z-index: 5;
    }

    #main_menu .navbar-header {
      min-height: 76px;
    }
  }

/* Phones */

  @media (max-width: 767px) {
    .user-content img {
      max-width: 100%;
      height: auto;
    }

    .container>.navbar-header, .container-fluid>.navbar-header, .container>.navbar-collapse, .container-fluid>.navbar-collapse {
      margin: 0;
    }

    #main_menu .navbar-header .user-content {
      word-break: break-word;
      white-space: normal;
    }

    #main_menu .navbar-brand .user-content,
    #main_menu .navbar-brand .user-content span,
    #main_menu .navbar-brand .user-content p,
    #main_menu .navbar-brand .user-content h1,
    #main_menu .navbar-brand .user-content h2,
    #main_menu .navbar-brand .user-content a {
      font-size: 1.8rem;
      line-height: 1.2;
      font-weight: bold;
    }

    /* General Styles */

    body {
      text-align: center;
    }
    .pre-footer .col-sm-4 {
      margin-bottom: 20px;
    }
    .body-footer .text-right {
      text-align: center;
      margin-top: 10px;
    }
    .content {
      margin: 15px 0;
    }
    .content .main {
      margin-bottom: 15px;
    }
    .filter-action .input-button {
      width: 100%;
    }

    /* Main Menu */

      .top-head {
        display: none;
      }
      .navbar-brand {
        width: auto;
        height: auto;
      }
      .navbar-toggle {
        border: 0;
        margin-top: 0;
      }
      .navbar-toggle:hover {
        background: none;
      }

      #main_menu .navbar-header {
        width: 100%;
        display: grid;
        grid-template-columns: 50px 1fr;
        padding-right: 50px;
        justify-content: center;
        align-items: center;
      }

      #main_menu .navbar-header::before {
        display: none;
      }

      #main_menu .navbar-brand {
        width: 100%;
        max-width: unset;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 0;
        padding: 15px 20px;
      }

      #main_menu .navbar-brand img {
        align-self: center;
        width: 100%;
        max-width: 250px;
        max-height: 100px;
        object-position: center top;
        object-fit: contain;
        vertical-align: unset;
        margin: 0 auto;
      }

      #main_menu .navbar-brand p {
        margin: 0;
      }

      #main_menu .navbar-toggle {
        position: relative;
        width: 100%;
        height: 50px;
        padding: 0;
        margin: 0;
      }

      #main_menu .navbar-toggle .icon-bar {
        margin-left: auto;
        margin-right: auto;
      }

      #main_menu .navbar-collapse, #main_menu ul li {
        padding: 0 15px;
      }
      #main_menu .navbar-nav a {
        border-bottom: 0!important;
        font-size: 1.3em;
        text-shadow: 1px 1px 2px rgba(0,0,0,.15);
        padding: 15px 5px;
      }
      #main_menu .dropdown-menu {
        display: block;
        position: relative;
        width: 100%;
        background: none;
        border: 0;
        box-shadow: none;
        margin: 10px 0 20px;
        border-top: 1px solid rgba(0,0,0,.1);
        border-bottom: 1px solid rgba(0,0,0,.1);
      }
      #main_menu .dropdown-menu li a {
        text-align: center;
        padding: 5px;
        font-size: 1.2em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #main_menu .dropdown-menu li a:focus, #main_menu .dropdown-menu li a:active {
        background: none;
      }
      .navbar-toggle .icon-bar {
        height: 3px;
      }
      .code-search-form {
        position: relative;
        margin: 15px;
      }
      .code-search-form input.input-button {
        margin-top: 2px;
      }
      .hero-search form select.operation, .hero-search form select.listing-type, .hero-search input {
        width: 100%;
        margin-bottom: 5px;
      }

    /* Homepage */

      #hero {
        height: auto;
        padding: 30px 15px 50px;
      }
      #hero .user-content h1, #hero h1, #hero h1 p {
        font-size: 44px;
        position: relative;
        margin: 0;
      }
      #hero .hero-search {
        width: 100%;
      }
      .welcome h2 {
        font-size: 24px;
      }
      #hero .hero-search select {
        margin-bottom: 10px;
      }

    /* Listings Page */

      #property_search .aside .panel-heading {
        padding: 0;
        text-align: left;
      }
      #property_search .aside .panel-heading a {
        display: block;
        padding: 15px;
        font-weight: bold;
      }
      #property_search .aside .panel-heading a:hover {
        text-decoration: none;
      }
      #property_search .aside .panel-group {
        margin-bottom: 0;
      }
      #mg_property_listings .property-listing .photo {
        width: 100%;
        float: none;
        margin: 0 0 15px;
      }
      #mg_property_listings .property-listing .photo img {
        width: 100%;
        max-height: 400px;
      }
      #mg_property_listings .property-listing .description {
        margin-left: 0;
        padding: 15px;
      }
      #mg_property_listings .property-listing .price .listing-type {
        position: relative;
      }

      .sort-by {
        float: none;
      }
      #content .mg_filter-bar {
        padding: 0;
      }
      #mg_property_listings .property-listing {
        text-align: center;
      }
      #mg_property_listings .box {
        padding: 0;
      }

      /* Show page */

      .galleria-container, #map, .map-container {
        width: 100%!important;
        height: 350px!important;
        margin-bottom: 15px;
      }
      #property .property-info #summary, #property .property-info > div {
        text-align: center;
      }
      #prices .property-status-badge {
        text-align: center;
        float: none;
      }

      /* Filters Mobile */
      .filter .panel-heading {
        border-bottom: 1px solid #f2f5f8;
      }
      .no-filters.toggle-filters {
        display: none!important;
      }
      .mg_filter-bar {
        padding: 0;
      }
      .filter-mobile-content {
        text-align: left;
      }
      .filter-link {
        padding: .7rem;
        font-size: 17px;
      }
      .filters-container .drop-custom-content {
        height: 100%;
        overflow: scroll;
        -webkit-overflow-scrolling: touch;
      }
      .btn-contact {
        display: block;
        width: 300px;
        margin: 0 auto 2rem auto;
      }

  }

  @media (min-width: 767px) {
    .btn-contact {
      display: none;
    }
  }

  @media (min-width: 576px) and (max-width: 767px) {
    .btn-contact {
      position: relative !important;
    }
  }

  @media (max-width: 576px) {
    .btn-contact {
      position: fixed;
      bottom: 10px;
      z-index: 999;
      box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
      left: 50%;
      transform: translateX(-50%);
      margin: 0 0 .66rem 0;
    }

  }
