/* Layout principal */
.masterplan-frontend {
  width: 100%;
  position: relative;
}

.masterplan-behind-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.mp-fe-tabs,
.mp-fe-view-masterplan {
  /* opacity: 0; */
}

.mp-fe-legend-list {
  opacity: 0;
}

/* Tabs Masterplan / Galeria */
.mp-fe-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  justify-content: center;
  width: fit-content;
  margin-inline: auto;
  border: 1px solid var(--dark-green);
  border-radius: 100px;
  padding: 7px;
  z-index: 2;
  position: relative;
}

.mp-fe-tab {
  border-radius: 100px;
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--dark-green);
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  background-color: unset;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-fe-tab:hover {
  border-color: var(--dark-green);
}

.mp-fe-tab.active {
  border: 1px solid var(--dark-green);

  background: var(--dark-green);
  color: var(--white);
}

.mp-fe-tab svg path {
  transition: all 0.2s;
}

.mp-fe-tab.active svg path {
  stroke: var(--white);
}

.mp-fe-gallery-layout {
  position: relative;
}

/* TÃ­tulos dos pins */
.mp-fe-gallery-titles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: var(--padding-inline);
  transform: translate(0%, -50%);
  mix-blend-mode: difference;

  z-index: 2;
}

.mp-fe-gallery-title-item {
  font-family: "Nyght Serif", sans-serif;
  font-size: clamp(18px, 3.5vw, 48px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 1.92px;
  text-transform: uppercase;
  color: var(--dark-green);
  cursor: pointer;
  transition: al 0.2s;
}

.mp-fe-gallery-title-item:hover {
  color: var(--brown);
}

.mp-fe-gallery-title-item.active {
  color: var(--black);
}

.mp-fe-view-galeria {
  margin-top: -100px;
}

/* Slider da galeria ativa */
.mp-fe-gallery-slider {
  max-width: 85vw;
  margin-left: auto;
  position: relative;
}

.arrows-wrapper {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  gap: 10px;
  z-index: 40;
}

.mp-fe-slider-img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}

.above-gallery-shape {
  position: absolute;
  top: -2px;
  right: 0px;
  width: 101vw;
  height: auto;

  overflow: visible;
  z-index: 50;
}

.mp-fe-slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-fe-slider-arrow {
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0dcd5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--dark-green);
  cursor: pointer;
  transition: all 0.15s;
}

.mp-fe-slider-arrow:hover {
  background: #8b7355;
  border-color: #8b7355;
  color: #fff;
}

@media only screen and (max-width: 600px) {
  .mp-fe-slider-arrow {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

/* Lightbox */
.mp-fe-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 16, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-fe-lightbox-img {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
}

.mp-fe-lightbox-close,
.mp-fe-lightbox-prev,
.mp-fe-lightbox-next {
  position: absolute;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.mp-fe-lightbox-close {
  top: 24px;
  right: 32px;
  font-size: 32px;
  line-height: 1;
}

.mp-fe-lightbox-prev,
.mp-fe-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  width: 60px;
  height: 60px;
}

.mp-fe-lightbox-prev {
  left: 10px;
}

.mp-fe-lightbox-next {
  right: 10px;
}

.mp-fe-lightbox-close:hover,
.mp-fe-lightbox-prev:hover,
.mp-fe-lightbox-next:hover {
  opacity: 0.7;
}

@media only screen and (max-width: 600px) {
  .mp-fe-lightbox-prev,
  .mp-fe-lightbox-next {
    font-size: 32px;
    width: 44px;
    height: 44px;
  }
}

.mp-fe-view-masterplan {
  display: flex;
  flex-direction: column;
}

/* Mapa */
.mp-fe-map-col {
  position: relative;
}

/* Modo "mapa mais largo em mobile" (toggle no admin) — só se aplica
   com a classe .mp-mobile-scroll e abaixo de 600px; a barra/arrasto
   em si é gerido pelo assets/js/frontend.js. */
@media only screen and (max-width: 600px) {
  .masterplan-frontend.mp-mobile-scroll {
    overflow: visible;
    border-radius: 15px;
    touch-action: pan-y;
  }

  .masterplan-frontend.mp-mobile-scroll .mp-fe-layout {
    width: 200vw;
  }
}

.wrap-svl-scrollbar {
  position: relative;
  width: 70vw;
  height: 1px;
  margin: 30px auto 0;
  background-color: var(--light-blue);
  border-radius: 10px;
}

.wrap-svl-scrollbar-thumb {
  position: absolute;
  top: -2.5px;
  left: 0;
  width: 60px;
  height: 6px;
  background-color: var(--light-blue);
  border-radius: 10px;
  cursor: grab;
  touch-action: none;
}

.wrap-svl-scrollbar-thumb:active {
  cursor: grabbing;
  background-color: var(--dark-blue);
}

.mp-fe-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.mp-fe-wrap::after {
  content: "";
  width: 100vw;
  height: 13vw;
  background-image: url(/wp-content/uploads/long-line.png);
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: contain;
  position: absolute;
  bottom: 0px;
  left: 0px;
  z-index: 2;
  transform: translateY(50%) translateX(-10%);
  display: none;
}

.mp-fe-img {
  width: 100%;
  display: block;
  border-radius: 25px;
}

.mp-fe-pins {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Pin */
.mp-fe-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
  z-index: 5;
}

/* Enquanto a tooltip estÃ¡ aberta (hover), o pin inteiro sobe acima
           dos restantes â€” sem isto, a tooltip pode ficar tapada por pins
           vizinhos com maior z-index de origem (ex.: pontos "destaque"). */
.mp-fe-pin:hover,
.mp-fe-pin.active {
  z-index: 50;
}

.mp-fe-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #8b7355;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.mp-fe-pin:hover .mp-fe-dot,
.mp-fe-pin.active .mp-fe-dot {
  transform: scale(1.2);
  /* background: #2c2b27; */
}

.mp-fe-dot.has-icon {
  background: transparent;
  border: none;
  box-shadow: none;
  width: auto;
  height: auto;
}

.mp-fe-dot.has-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s;
}

.mp-fe-pin:hover .mp-fe-dot.has-icon img {
  transform: scale(1.15);
}

/* Pontos "destaque" — ícone maior, na percentagem definida no admin
   (--mp-icon-scale, em vez de fixa). Usa px reais em vez de scale()
   para evitar pixelização no Safari mobile. Sem hover — pins destaque
   não têm a animação de hover. */
.mp-fe-pin.is-destaque .mp-fe-dot {
  width: calc(30px * var(--mp-icon-scale, 1.3));
  height: calc(30px * var(--mp-icon-scale, 1.3));
}

.mp-fe-pin.is-destaque .mp-fe-dot.has-icon img {
  width: calc(34px * var(--mp-icon-scale, 1.3));
  height: auto;
}

.mp-fe-pin.is-destaque:hover .mp-fe-dot,
.mp-fe-pin.is-destaque.active .mp-fe-dot,
.mp-fe-pin.is-destaque:hover .mp-fe-dot.has-icon img {
  transform: none;
}
/* Tooltip no mapa */
.mp-fe-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #2c2b27;
  color: #fff;
  padding: 8px 14px;
  font-size: 12px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 3px;
  z-index: 10;
  line-height: 1.5;
  width: 300px;
  text-align: left;
}
.mp-fe-pin-align-start .mp-fe-tooltip {
  left: 0;
  transform: translateX(0);
}
.mp-fe-pin-align-start .mp-fe-tooltip::after {
  left: 20px;
  transform: none;
}

.mp-fe-pin-align-end .mp-fe-tooltip {
  left: auto;
  right: 0;
  transform: translateX(0);
}
.mp-fe-pin-align-end .mp-fe-tooltip::after {
  left: auto;
  right: 20px;
  transform: none;
}

.mp-fe-tooltip.has-image {
  white-space: normal;
}

.mp-fe-tooltip-img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 3px;
  margin-top: 8px;
}

.mp-fe-tooltip strong {
  display: block;
  font-family: "Nyght Serif", sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 2px;
  font-weight: 600;
  color: var(--white);
}

.mp-fe-tooltip span {
  font-size: 11px;
  white-space: normal;
  color: var(--white);
  line-height: 1;
}

.mp-fe-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2c2b27;
}

.mp-fe-pin:hover .mp-fe-tooltip {
  opacity: 1;
}

/* Legenda */
.mp-fe-legend-col {
  padding-top: 8px;
  margin-bottom: 65px !important;
}

.mp-fe-legend-title {
  color: #505143;
  margin-bottom: 45px;
}

.mp-fe-legend-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  justify-content: space-around;
  margin-top: 30px;
}

.mp-fe-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.mp-fe-legend-item:last-child {
  border-bottom: none;
}

.mp-fe-legend-item:hover {
  opacity: 0.7;
}

/* NÃºmero na legenda */
.mp-fe-legend-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #8b7355;
  border: 2px solid #fff;
  outline: 1px solid #e0dcd5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Ãcone na legenda */
.mp-fe-legend-icon {
  flex-shrink: 0;
  flex-shrink: 0;
  height: auto;
  display: flex;
}

.mp-fe-legend-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Texto da legenda */
.mp-fe-legend-text strong {
  display: block;
  color: var(--dark-green);

  font-family: "Nyght Serif", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.56px;
  text-transform: uppercase;
}

.mp-fe-legend-text span {
  font-size: 12px;
  color: #8a8880;
  line-height: 1.4;
}

.mp-fe-legend-item.highlighted .mp-fe-legend-num,
.mp-fe-legend-item.highlighted .mp-fe-legend-icon img {
  transform: scale(1.1);
}

/* TOOLTIP com classe sideInfo */
/* Pins com a classe "sideInfo" — a tooltip nasce a partir do centro
   do próprio ponto (não acima dele) e expande para a direita, como
   um círculo que se transforma numa cápsula. Mostra só o título. */
.mp-fe-pin.sideInfo .mp-fe-tooltip {
  bottom: auto;
  top: 50%;
  left: 50%;
  transform: translate(
    -17px,
    -50%
  ); /* -17px = metade dos 34px do estado fechado, para ficar centrado no ícone e crescer só para a direita */
  transform-origin: left center;
  background: #dbeaef;
  box-shadow: 0 2.8px 2.8px 0 rgba(0, 0, 0, 0.25);
  border-radius: 30px;
  max-width: 34px;
  height: 34px;
  width: auto;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  transition:
    max-width 0.35s ease,
    padding 0.35s ease,
    opacity 0.2s;
}

.mp-fe-pin.sideInfo:hover .mp-fe-tooltip {
  max-width: 320px;
  padding: 0 24px;
}
.mp-fe-pin.sideInfo .mp-fe-dot {
  transition: opacity 0.2s;
}

.mp-fe-pin.sideInfo:hover .mp-fe-dot {
  opacity: 0;
}
/* Sem seta nesta variante */
.mp-fe-pin.sideInfo .mp-fe-tooltip::after {
  display: none;
}

/* Só o título, com o estilo definido */
.mp-fe-pin.sideInfo .mp-fe-tooltip strong {
  margin: 0;
  opacity: 1;
  color: #182837;
  font-family: "Beiruti", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Esconde descrição e imagem — mostra mesmo só o título */
.mp-fe-pin.sideInfo .mp-fe-tooltip span,
.mp-fe-pin.sideInfo .mp-fe-tooltip-img {
  display: none;
}

/* Sem animação de scale no hover para pins sideInfo — o "crescimento"
   é a própria tooltip a abrir, não o ícone a aumentar. */
.mp-fe-pin.sideInfo:hover .mp-fe-dot,
.mp-fe-pin.sideInfo.active .mp-fe-dot,
.mp-fe-pin.sideInfo:hover .mp-fe-dot.has-icon img {
  transform: none;
}

@media (min-width: 2100px) {
  .mp-fe-gallery-titles {
    left: 10vw;
  }
}

@media only screen and (max-width: 1550px) {
  .masterplan-behind-img {
    width: 450px;
    height: auto;
  }

  .mp-fe-tabs {
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px;
  }

  .mp-fe-tab {
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 2.2px;
    gap: 8px;
  }

  .mp-fe-tab svg {
    width: 20px;
    height: 20px;
  }

  .mp-fe-legend-item {
    gap: 10px;
  }

  .mp-fe-legend-title {
    margin-bottom: 20px;
  }

  .mp-fe-legend-list {
    margin-top: 20px;
  }

  .mp-fe-legend-text strong {
    color: var(--dark-green);
    font-size: 11px;
    letter-spacing: 0.4px;
  }
}

@media only screen and (max-width: 1024px) {
  .mp-fe-legend-col {
    padding-top: 0px;
    margin-bottom: 00px !important;
  }

  .mp-fe-legend-list {
    display: flex;
  }

  .mp-fe-legend-title {
    grid-column: 1 / -1;
  }

  .mp-fe-wrap::after {
    transform: translateY(50%) translateX(0%);
  }

  .masterplan-behind-img {
    width: 50vw;
    height: auto;
  }

  .mp-fe-view-galeria {
    margin-top: -50px;
  }
}

@media only screen and (max-width: 768px) {
  .mp-fe-legend-list {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    margin-inline: auto;
  }

  .mp-fe-tabs {
    gap: 6px;
    margin-bottom: 18px;
    padding: 5px;
  }

  .mp-fe-tab {
    padding: 6px 12px;
    font-size: 9px;
    letter-spacing: 2px;
    gap: 6px;
  }

  .mp-fe-tab.active svg {
    width: 20px;
    height: 20px;
  }
}

@media only screen and (max-width: 600px) {
  .masterplan-frontend.mp-mobile-scroll {
    overflow: visible;
    border-radius: 15px;
    touch-action: pan-y;
  }

  .masterplan-frontend.mp-mobile-scroll .mp-fe-layout {
    width: 200vw;
  }
  .mp-fe-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .masterplan-behind-img {
    width: 300px;
    height: auto;
  }

  .mp-fe-legend-list {
    gap: 15px;
    grid-template-rows: repeat(3, auto);
    max-width: 350px;
  }

  .mp-fe-legend-item {
    gap: 8px;
    padding: 0px 0;
  }

  .mp-fe-legend-num {
    width: 24px;
    height: 24px;
    font-size: 10px;
    flex-shrink: 0;
  }

  .mp-fe-legend-icon img {
    width: 24px;
    height: 24px;
  }

  .mp-fe-legend-text span {
    font-size: 10px;
  }

  .mp-fe-dot.has-icon img {
    width: 26px;
    height: auto;
  }

  /* Tooltip sideInfo acompanha o ícone reduzido (34px → 26px) —
     mesma lógica: max-width/height iguais ao ícone, e o deslocamento
     passa a -13px (metade de 26px) para continuar centrada nele. */
  .mp-fe-pin.sideInfo .mp-fe-tooltip {
    max-width: 26px;
    height: 26px;
    transform: translate(-13px, -50%);
  }

  .mp-fe-pin.sideInfo .mp-fe-tooltip strong {
    font-size: 12px;
  }

  .mp-fe-view-galeria {
    margin-top: -20px;
  }

  .mp-fe-gallery-slider {
    max-width: 100%;
    margin-left: auto;
    position: relative;
  }

  .mp-fe-slider-img-wrap {
    aspect-ratio: 16 / 16;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
  }

  .mp-fe-gallery-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 30px;
  }

  .mp-fe-gallery-titles {
    display: flex;
    flex-direction: column;
    position: relative;
    top: unset;
    left: unset;
    transform: unset;
    padding-inline: var(--padding-inline);
    mix-blend-mode: unset;
    gap: 5px;
    align-items: center;
  }

  .mp-fe-legend-col {
    padding-inline: var(--padding-inline);
  }

  .mp-fe-tooltip-img {
    height: 120px;
  }
}

@media only screen and (max-width: 400px) {
}
