/* 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 {
      content: ' ';
      width: 50px;
      height: 50px;
      background: url('../images/view-more.png') no-repeat;
      position: absolute;
      z-index: 2;
      display: block;
      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;
    }
    .logo img, .navbar-brand img {
      height: auto;
      width: auto;
      max-height: 100px;
    }
  }

/* 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;
    }

    /* 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 */

      #index #main_menu, #main_menu {
        background-color: #fff;
      }
      .navbar-toggle .icon-bar {
        background-color: #000;
      }
      .top-head {
        display: none;
      }
      .navbar-brand {
        width: auto;
        height: auto;
        margin-left: 5rem;
      }
      .navbar-toggle {
        border: 0;
        position: absolute;
        left: 0;
        padding: 1.5rem;
        margin-top: 0;
      }
      .navbar-toggle:hover {
        background: none;
      }
      #main_menu .navbar-collapse, #main_menu ul li {
        padding: 0 15px;
      }
      #main_menu .navbar-nav a {
        color: #fff;
        border-bottom: 0!important;
        font-size: 1.3em;
        text-shadow: 1px 1px 2px rgba(0,0,0,.15);
        padding: 15px 0 5px;
      }
      #main_menu .dropdown-menu {
        margin: 0;
        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;
      }
      #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 */

      .full #property_search .row {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -moz-box-orient: vertical;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
      }
      .full #property_search .row .col-sm-9 {
        -webkit-box-ordinal-group: 2;
        -moz-box-ordinal-group: 2;
        -ms-flex-order: 2;
        -webkit-order: 2;
        order: 2;
      }
      .full #property_search .row .col-sm-3 {
        -webkit-box-ordinal-group: 1;
        -moz-box-ordinal-group: 1;
        -ms-flex-order: 1;
        -webkit-order: 1;
        order: 1;
        margin: 15px;
      }
      #property_search .aside .panel-heading {
        padding: 0;
      }
      #property_search .aside .panel-heading a {
        display: block;
        padding: 15px 0;
        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;
      }
      #property_search .aside {
        padding: 0;
      }
      .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 */

      .has-filters .filters-container {
        display: flex;
      }
      .filters-container {
        position: fixed;
        z-index: 10;
        width: 100%;
        height: 100% !important;
        left: 0;
        top: 0;
        display: none;
        flex-direction: column;
        background: #fff;
      }
      .filters-container .separator {
        display: flex;
        background: #fff;
        border-bottom: 1px solid #dbe4ea;
      }
      .filters-container .separator h4 {
        flex: 1;
        padding: 2rem;
        margin-bottom: 0;
        font-size: 18px;
      }
      .filters-container .separator .close-filters {
        padding: 2rem;
        color: gray;
        position: absolute;
        right: 0;
        font-weight: bold;
      }
      .filters-container .close-filters:hover, .filters-container .close-filters:focus, .filters-container .close-filters:active {
        text-decoration: none;
      }
      .filters-container .filter-mobile-content {
        overflow: scroll;
        -webkit-overflow-scrolling: touch;
        padding: 2rem;
        flex: 1;
      }
      .filters-container .filter-mobile-footer {
        background: #fff;
        border-top: 1px solid #dbe4ea;
        padding: 1rem 2rem;
      }

      .no-filters.toggle-filters {
        display: none!important;
      }
      .toggle-filters {
        padding: 1.5rem;
        font-size: 20px;
        right: 0px;
        position: absolute;
        top: 0px;
        color: #000;
      }
      .mg_filter-bar {
        padding: 0;
      }
      .filter-mobile-content {
        text-align: left;
      }
      .filter-link {
        padding: .7rem;
        font-size: 17px;
      }

  }
