/* Ajustes para o template legado (scroll horizontal) */

/* mmenu.js: menu lateral e blocker acima do #wrapper (header .head-tr = 99999; mapas/modais também altos) */
#mm-blocker {
  z-index: 100010 !important;
}

.mm-menu.mm-offcanvas {
  z-index: 100021 !important;
}

.mmenu-trigger {
  position: relative;
  z-index: 100030 !important;
}

.mm-menu.mm-offcanvas .mm-navbar .mm-btn {
  position: relative;
  z-index: 100040 !important;
}

.aluguel-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 18px;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

/* Home search: manter visual legado nos selects controlados */
.trip-search .form-group.home-filter-select {
  position: relative;
}

.trip-search .form-group.home-filter-select .home-filter-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #19b45a;
  z-index: 3;
  pointer-events: none;
}

.trip-search .form-group.home-filter-select .nice-select,
.trip-search .form-group.home-filter-select > select {
  padding-left: 44px !important;
  padding-right: 34px !important;
}

.trip-search .form-group.home-filter-select .nice-select:after {
  right: 14px;
}

.trip-search .form-group.home-filter-select + .form-group.home-filter-select {
  margin-left: 8px;
}

.aluguel-grid .item.card-imovel-aluguel {
  flex: 0 0 360px;
  width: auto !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  .aluguel-grid .item.card-imovel-aluguel {
    flex-basis: 300px;
  }
}

/* Home: skeleton enquanto carrega listagens de imóveis */
.home-imoveis-skeleton-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 8px 0 24px;
}

@media (max-width: 1292px) {
  .home-imoveis-skeleton-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 769px) {
  .home-imoveis-skeleton-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.home-imovel-skeleton-card .project-single {
  pointer-events: none;
}

.home-imovel-skeleton-block {
  background: linear-gradient(90deg, #e4e4e4 0%, #f4f4f4 45%, #e4e4e4 90%);
  background-size: 220% 100%;
  animation: home-skeleton-shimmer 1.25s ease-in-out infinite;
}

.home-imovel-skeleton-img {
  width: 100%;
  height: 240px;
  min-height: 240px;
  border-radius: 6px;
}

.home-imovel-skeleton-line {
  height: 14px;
  border-radius: 4px;
  margin-top: 14px;
}

.home-imovel-skeleton-line--title {
  height: 18px;
  width: 88%;
}

.home-imovel-skeleton-line--short {
  width: 58%;
}

.home-imovel-skeleton-line--meta {
  width: 72%;
}

@keyframes home-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* Imovel page: galeria abaixo da navbar fixa e sem "quebrar" proporção */
.single-property-4 {
  margin-top: 92px;
}

.single-property-4 .container-fluid.p0 {
  /* Limita o bloco geral da galeria para não vazar */
  max-height: calc(100vh - 92px);
  overflow: hidden;
}

.single-property-4 .container-fluid.p0 > .row {
  height: min(78vh, 760px);
  overflow: hidden;
}

.single-property-4 .container-fluid.p0 > .row > [class*='col-'] {
  height: 100%;
}

.single-property-4 .container-fluid.p0 > .row > .col-sm-6.col-lg-6.p0 > .row.m0 {
  height: 100%;
}

.single-property-4 .container-fluid.p0 > .row > .col-sm-6.col-lg-6.p0 > .row.m0 > [class*='col-'] {
  height: 50%;
}

.single-property-4 .popup-images {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.single-property-4 .popup-img {
  display: block;
  width: 100%;
  height: 100%;
}

.single-property-4 .popup-images img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}

.single-property-4 .gallery-main .popup-images {
  height: min(72vh, 640px);
}

.single-property-4 .gallery-thumbs .popup-images {
  position: relative;
  height: min(36vh, 320px);
}

.single-property-4 .gallery-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.single-property-4 .gallery-more-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 18px;
  padding: 5px 10px;
  font-size: 12px;
}

@media (max-width: 991px) {
  .single-property-4 {
    margin-top: 78px;
  }

  .single-property-4 .container-fluid.p0 {
    max-height: none;
  }

  .single-property-4 .container-fluid.p0 > .row {
    height: auto;
  }

  .single-property-4 .container-fluid.p0 > .row > [class*='col-'],
  .single-property-4 .container-fluid.p0 > .row > .col-sm-6.col-lg-6.p0 > .row.m0,
  .single-property-4 .container-fluid.p0 > .row > .col-sm-6.col-lg-6.p0 > .row.m0 > [class*='col-'],
  .single-property-4 .popup-images,
  .single-property-4 .popup-img {
    height: auto;
  }

  .single-property-4 .gallery-main .popup-images {
    height: auto;
  }

  .single-property-4 .gallery-thumbs .popup-images {
    height: auto;
  }

  .single-property-4 .gallery-main .popup-img,
  .single-property-4 .gallery-thumbs .popup-img {
    height: auto;
  }
}

/* Imovel page: bloco de titulo/preco mais responsivo */
.single-proper .headings-2 .pro-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.single-proper .headings-2 .pro-wrapper .detail-wrapper-body {
  flex: 1 1 50px;
  min-width: 0;
}

.single-proper .headings-2 .pro-wrapper .single.detail-wrapper {
  margin-left: 0 !important;
  flex: 0 1 auto;
}

.single-proper .headings-2 .listing-title-bar h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  word-break: break-word;
}

.single-proper .headings-2 .listing-title-bar .category-tag {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.single-proper .headings-2 .single.detail-wrapper .listing-title-bar h4 {
  margin: 0;
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 991px) {
  .single-proper .headings-2 .pro-wrapper .single.detail-wrapper {
    width: 100%;
  }

  .single-proper .headings-2 .single.detail-wrapper .listing-title-bar h4 {
    text-align: left;
  }
}

/* Imovel page: blocos adicionais (video, mapa, ofertas) */
.single-proper .property-location .contact-map iframe {
  border: 0;
  border-radius: 6px;
  display: block;
  width: 100%;
  height: 100%;
}

.single-proper .property.wprt-image-video img {
  width: 100%;
  border-radius: 6px;
}

.single-proper .widget-boxed.popular .banner img {
  width: 100%;
  display: block;
  border-radius: 6px;
}

.single-proper .property-location .contact-map {
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: 6px;
}

/* Imoveis similares: 3 cards por linha e tamanho menor */
.similar-property .portfolio-items {
  display: flex;
  flex-wrap: wrap;
}

.similar-property .portfolio-items > .item {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  padding-right: 12px;
  padding-left: 12px;
  margin-bottom: 22px;
}

.similar-property .project-single .homes-content {
  padding: 18px 16px;
}

.similar-property .project-single .homes-content h3 {
  font-size: 18px;
  line-height: 24px;
}

.similar-property .project-single .homes-list li {
  font-size: 13px;
}

@media (max-width: 991px) {
  .similar-property .portfolio-items > .item {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767px) {
  .single-proper .property-location .contact-map {
    height: 280px;
  }

  .similar-property .portfolio-items > .item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Fullscreen gallery modal */
.imovel-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imovel-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.imovel-gallery-content {
  position: relative;
  z-index: 2;
  width: min(95vw, 1200px);
  height: min(90vh, 860px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.imovel-gallery-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.imovel-gallery-content img.is-loading {
  opacity: 0;
}

.imovel-gallery-loading {
  position: absolute;
  z-index: 3;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13px;
}

.imovel-gallery-close,
.imovel-gallery-nav {
  position: absolute;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.imovel-gallery-close {
  top: 10px;
  right: 10px;
}

.imovel-gallery-nav.prev {
  left: 12px;
}

.imovel-gallery-nav.next {
  right: 12px;
}

.imovel-gallery-counter {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 13px;
}

section.single-proper.details{
  padding: 2rem 0 !important;
}

/* Busca map popup: impedir imagem de vazar da caixa */
.google-map-right .leaflet-popup-content-wrapper {
  overflow: hidden;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-content {
  margin: 10px 12px !important;
  width: 214px !important;
  min-width: 214px !important;
  max-width: 214px !important;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-content .imovel-map-popup {
  width: 100%;
  max-width: 214px;
  overflow: hidden;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-content .imovel-map-popup strong {
  font-size: 14px;
  line-height: 1.35;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-content .imovel-map-popup span {
  font-size: 18px;
  line-height: 1.35;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-content .imovel-map-popup img {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 120px;
  object-fit: cover;
  display: block;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-content .imovel-map-popup .imovel-map-popup-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 14px;
  background: #f5275f;
  color: #fff !important;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-content .imovel-map-popup .imovel-map-popup-btn:hover {
  background: #e0194d;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-close-button {
  top: 6px !important;
  right: 6px !important;
  width: 28px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  padding: 0 !important;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.google-map-right .imovel-map-popup-leaflet .leaflet-popup-close-button:hover {
  background: rgba(0, 0, 0, 0.62);
  transform: scale(1.04);
}

/* Home partners: evitar dependência do Owl no React */
.partner-marquee {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.partner-marquee-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: partner-marquee-scroll 35s linear infinite;
  padding: 6px 0 4px;
}

.partner-marquee:hover .partner-marquee-track {
  animation-play-state: paused;
}

.partner-logo-item {
  flex: 0 0 230px;
  width: 230px;
  display: block;
  text-decoration: none;
}

.partner-logo-item img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  display: block;
  filter: grayscale(100%);
  opacity: 0.9;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.partner-logo-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes partner-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Contact page adjustments */
.contact-headings {
  margin-top: 92px;
}

.contact-page-section #map-contact.contact-map {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
}

.contact-page-section #map-contact.contact-map iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

@media (max-width: 991px) {
  .contact-headings {
    margin-top: 78px;
  }
}

.inner-pages .contact-us{
  padding: 2rem 0;
}