/* básico */
.masterplan-shortcode-wrapper {
  display: flex;
  flex-direction: column-reverse;
  gap: 0px;
  align-items: center;
  /* margin-top: -150px; */
}

/* secao com cartoes */
.masterplan-text-section {
  display: flex;
  gap: 4px;
  z-index: 2;
  margin-top: -70px;
}

.masterplan-image-section {
  margin-bottom: 50px;
  z-index: 1;
}

/* cartao */
.masterplan-card {
  cursor: pointer;
  min-width: 300px;
}

/* "Edificio" */
.masterplan-subt {
  margin: 0px;
  color: #000;
  text-align: center;
  font-size: 18px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: 1.44px;
  margin-bottom: 5px;
}

/* nome do edificio */
.masterplan-title {
  color: #1a1a3c;
  text-align: center;
  font-family: "Modny", sans-serif;
  font-size: 64px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  letter-spacing: 2.13px;
  margin: 0px;
  text-transform: capitalize;
}

/* (em comercialização) */
.masterplan-content p {
  color: #1a1a3c;
  text-align: center;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 162.5%;
  margin: 0px;
  margin-bottom: 0px;
}

.masterplan-card.sold p,
.masterplan-card.sold .masterplan-title {
  /* color: #a7d0ec; */
  color: #989898;
}

/* .masterplan-card.sold {
  cursor: auto;
} */

/* botão */
.masterplan-button {
  display: inline-block;
  padding: 12px 10px;
  color: #1a1a3c;
  text-decoration: none;
  border: 1px solid #1a1a3c;
  text-align: center;
  margin-inline: auto !important;
  display: block;
  transition: all 300ms linear;
}

/* cartao */
.masterplan-card:hover .masterplan-button {
  color: white;
  background-color: #1a1a3c;
  transition: all 300ms linear;
}

/* imagens */
/* .masterplan-image {
  display: none;
} */

/* .masterplan-image.is-active {
  display: block;
} */

.masterplan-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.masterplan-icon img {
  width: auto !important;
  height: 118px !important;
}

.swiper-pagination-bullet-active {
  background: #0a2240;
}
.masterplan-image svg {
  display: none;
  max-width: unset;
  width: 100%;
  height: auto;
  display: block;
}

/* svg #hover:hover {
  fill-opacity: 1;
  transition: all 300ms linear;
} */

/* Estado Inicial do Masterplan SVG */

/* 1. O que deve estar visível */
#default {
  fill-opacity: 1;
  transition: fill-opacity 0.4s ease-in-out;
  pointer-events: none; /* Geralmente o default é apenas visual */
}
#hover_base {
  pointer-events: none !important; /* O rato ignora este element o */
  transition: fill-opacity 0.3s ease;
}

/* 2. O que deve estar escondido (Base e Retângulos de Hover) */
#hover_base,
rect[id^="hover"],
rect[id^="hover_"],
path[id^="hover"],
path[id^="hover_"] {
  fill-opacity: 0;
  transition: fill-opacity 0.3s ease-in-out;
}

/* TESTE POSITION ABSOLUTE */

/* Container Pai - Responsivo e Fluido */
.masterplan-image-section {
  position: relative;
  width: 100%;
  margin-bottom: 50px;
  z-index: 1;
  /* ZERO min-height aqui. A altura será ditada pela imagem .is-default */
}
/* Apenas a default dita a altura do container */
.masterplan-image.is-default {
  position: relative; /* Mantém-se no fluxo natural */
  display: block;
}
/* AS SOBREPOSTAS: Ficam por cima da default */
.masterplan-image:not(.is-default) {
  position: absolute;
  top: 0;
  left: 0;
}
/* Regras para todas as imagens de Masterplan */
.masterplan-image {
  width: 100%;
  height: auto;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* ESTADO ATIVO: Faz o fade-in */
.masterplan-image.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
/* Garante que o SVG dentro da div também se ajusta */
.masterplan-image svg,
.masterplan-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* "Se o ecrã for até 1920px de largura E tiver menos de 900px de altura" */
@media only screen and (max-width: 1920px) and (max-height: 1000px) {
  .masterplan-image-section {
    max-width: 1000px;
  }
  /* "Edificio" */
  .masterplan-subt {
    font-size: 16px;
  }

  /* nome do edificio */
  .masterplan-title {
    font-size: 56px;
    line-height: 1 !important;
  }

  /* (em comercialização) */
  .masterplan-content p {
    font-size: 15px;
  }
  /* secao com cartoes */
  .masterplan-text-section {
    gap: 30px;
  }

  .masterplan-card {
    cursor: pointer;
    min-width: 200px;
  }
}

/* 1440px */

@media only screen and (max-width: 1750px) {
  /* "Edificio" */
  .masterplan-subt {
    font-size: 15px;
  }

  /* nome do edificio */
  .masterplan-title {
    font-size: 50px;
    line-height: 1 !important;
  }

  /* (em comercialização) */
  .masterplan-content p {
    font-size: 14px;
  }

  /* botão */
  .masterplan-button {
    padding: 10px 8px;
    font-size: 14px;
  }

  .masterplan-icon img {
    width: auto !important;
    height: 90px !important;
  }

  .masterplan-image-section {
    margin-bottom: 0px;
    z-index: 1;
  }

  /* secao com cartoes */
  .masterplan-text-section {
    gap: 70px;
  }

  .masterplan-card {
    cursor: pointer;
    min-width: unset;
  }

  .masterplan-content {
    width: 100%;
  }

  .masterplan-image-section {
    max-width: 991px;
  }
}

/* 1440px */
@media only screen and (max-width: 991px) {
  /* "Edificio" */
  .masterplan-subt {
    font-size: 14px;
  }

  /* nome do edificio */
  .masterplan-title {
    font-size: 40px;
  }

  /* (em comercialização) */
  .masterplan-content p {
    font-size: 12px;
  }

  /* botão */
  .masterplan-button {
    padding: 10px 8px;
    font-size: 14px;
  }

  .masterplan-icon img {
    width: auto !important;
    height: 90px !important;
  }

  .masterplan-image-section {
    margin-bottom: 0px;
    z-index: 1;
  }

  /* secao com cartoes */
  .masterplan-text-section {
    gap: 35px;
  }
}

/* 600px - MOBILE SLIDER STYLES (Overrides Grid) */
@media only screen and (max-width: 768px) {
  /* When the Swiper classes are applied, this overrides the grid */
  .masterplan-text-section {
    display: block;
    /* Disable Grid */
    padding-bottom: 40px;
    width: 100%;
    z-index: 2 !important;
  }

  .masterplan-card {
    cursor: auto;
  }

  /* Ensure the wrapper respects the Swiper container */
  .masterplan-text-section .swiper-wrapper {
    display: flex;
  }

  .masterplan-text-section .swiper-slide {
    width: auto;
    /* Deixa o Swiper controlar a largura */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .masterplan-shortcode-wrapper {
    gap: 20px;
  }

  /* Ajusta o tamanho do ícone no mobile para caberem 2 lado a lado */
  .masterplan-icon img {
    width: auto !important;
    height: 70px !important;
  }

  .masterplan-title {
    font-size: 24px;
  }
  .masterplan-subt {
    font-size: 11px;
  }
  .masterplan-text-section {
    display: flex;
    gap: 4px;
    z-index: 2;
    margin-top: 0px;
  }
}
