html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: #333333;
  color: #98dccb;
  font-family: "Open Sans", sans-serif;
}

/* ====== LAYOUT PRINCIPAL ====== */
.disponibilidad-layout {
  padding-top: 3vw;
  padding-bottom: 7vw;
  display: grid;
  grid-template-columns: 1fr 7fr 2fr;
  align-items: normal;
  box-sizing: border-box;
  gap: 1vw;
}

/* ====== COLUMNA IZQUIERDA ====== */
.col-izquierda {
  padding: 2vh 1vw;
  text-align: center;
}

.col-izquierda h3 {
  font-weight: 300;
  font-size: clamp(12px, 1.2vw, 16px);
  color: #fff;
}

#lista-pisos {
  list-style: none;
  padding: 0;
  margin: 0;
}

#lista-pisos li {
  border: 1px solid #98dccb;
  border-radius: 50%;
  width: clamp(28px, 2vw, 35px);
  height: clamp(28px, 2vw, 35px);
  line-height: clamp(28px, 2vw, 35px);
  margin: 8px auto;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: clamp(12px, 1vw, 14px);
}

#lista-pisos li:hover {
  background-color: rgba(152, 220, 203, 0.3);
}

#lista-pisos li.activo {
  background-color: #98dccb;
  color: #333333;
  font-weight: 700;
}

/* ====== COLUMNA CENTRAL ====== */
.col-centro {
  display: flex;
  justify-content: center;
  align-items: center;
}

#imagen-piso {
  width: 90%;
  height: auto;
  object-fit: contain;
}


/* ====== COLUMNA DERECHA ====== */
.col-derecha {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  padding: 0 2vw;
  gap: 1vh;
}

.fila-superior {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1vw;
  width: 100%;
}

#titulo-piso {
  font-size: clamp(36px, 6vw, 100px);
  font-family: 'Bebas Neue', sans-serif;
  color: #fff;
  opacity: 0.2;
  font-weight: 300;
  margin: 0;
  line-height: 1em;
  text-align: right;
}

.btn-volver {
  background-color: #98dccb;
  color: #333333;
  border: none;
  padding: clamp(6px, 1vw, 10px) clamp(16px, 2vw, 25px);
  border-radius: 100px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
  font-size: clamp(10px, 0.8vw, 14px);
  transition: background-color 0.3s;
}

.btn-volver:hover {
  background-color: #7ecdbb;
}

/* ====== RESPONSIVE: MÓVIL ====== */
@media (max-width: 768px) {
  .disponibilidad-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5vw 3vw;
  }

  /* 🔹 Reorganizamos la fila del título y el botón */
  .fila-superior {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 4vw;
  }

  .col-derecha {
    order: 1;
    width: 100%;
    align-items: center;
    padding: 0;
  }

  #titulo-piso {
    font-size: clamp(40px, 10vw, 60px);
    text-align: left;
    opacity: 0.3;
  }

  .btn-volver {
    font-size: clamp(10px, 3vw, 12px);
    padding: 8px 18px;
  }

  /* 🔹 Imagen al centro */
 .col-centro {
    /* Crear un entorno que preserve el aspecto */
    aspect-ratio: 1 / 1; /* ajusta si tu imagen no es cuadrada */
    transform: rotate(90deg);
    transform-origin: center center;
    width: 130vw;
    height: auto;
    order: 2;
  }

  .col-centro img,
  .col-centro > * {
    transform-origin: center center;
    width: 100%;
    height: auto;
  }

  /* 🔹 Selector en 2 filas de 5 columnas */
.col-izquierda {
  order: 3;
  margin-top: 0vw;
  padding: 0 1vw;
}

#lista-pisos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3vw;
  justify-items: center;
  align-items: center;
  padding: 0;
  margin: 0 auto;
}

#lista-pisos li {
  width: clamp(28px, 10vw, 45px);
  height: clamp(28px, 10vw, 45px);
  line-height: clamp(28px, 10vw, 45px);
  font-size: clamp(12px, 4vw, 16px);
  flex: none;
  margin: 0;
}

}

/* ====== Animación de aparición de los pisos ====== */
@keyframes aparecerPiso {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#lista-pisos li {
  animation: aparecerPiso 0.4s ease forwards;
  opacity: 0; /* Inicialmente oculto */
}

/* Delay progresivo para efecto de cascada */
#lista-pisos li:nth-child(1)  { animation-delay: 0.05s; }
#lista-pisos li:nth-child(2)  { animation-delay: 0.1s; }
#lista-pisos li:nth-child(3)  { animation-delay: 0.15s; }
#lista-pisos li:nth-child(4)  { animation-delay: 0.2s; }
#lista-pisos li:nth-child(5)  { animation-delay: 0.25s; }
#lista-pisos li:nth-child(6)  { animation-delay: 0.3s; }
#lista-pisos li:nth-child(7)  { animation-delay: 0.35s; }
#lista-pisos li:nth-child(8)  { animation-delay: 0.4s; }
#lista-pisos li:nth-child(9)  { animation-delay: 0.45s; }
#lista-pisos li:nth-child(10) { animation-delay: 0.5s; }


/* === Overlay SVG sobre la imagen === */
.planta-wrapper {
  position: relative;
  display: inline-block;
  width: 90%;
  height: auto;
}

#imagen-piso {
  display: block;
  width: 100%;
  height: auto;
}

#svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* para evitar que bloquee la imagen antes del SVG cargado */
}

#svg-overlay svg {
  width: 100%;
  height: 100%;
}

#svg-overlay .apto {
  pointer-events: auto;
  fill: transparent !important;
  stroke: transparent !important;
  cursor: pointer;
  transition: fill 0.25s ease, stroke 0.25s ease;
}

/* hover - disponible */
#svg-overlay .apto[data-estado="Disponible"]:hover,
#svg-overlay .apto.disponible:hover {
  fill: rgba(152, 220, 203, 0.4) !important;
  stroke: #98dccb !important;
}

/* hover - vendido / no disponible */
#svg-overlay .apto[data-estado="Vendido"]:hover,
#svg-overlay .apto.vendido:hover {
  fill: rgba(51, 51, 51, 0.4) !important;
  stroke: #333333 !important;
}

/* estado activo en móvil (clase .active) */
#svg-overlay .apto.active.disponible,
#svg-overlay .apto.active[data-estado="Disponible"] {
  fill: rgba(152, 220, 203, 0.4) !important;
  stroke: #98dccb !important;
}

#svg-overlay .apto.active.vendido,
#svg-overlay .apto.active[data-estado="Vendido"] {
  fill: rgba(51, 51, 51, 0.4) !important;
  stroke: #333333 !important;
}

/* === Marcadores de apartamentos === */
.marker-circle,
.marker-icon,
.apto-text {
  pointer-events: none; /* no bloquean clics sobre los polígonos */
}

.marker-circle {
  transition: transform 0.2s ease;
}

#svg-overlay svg {
  width: 100%;
  height: 100%;
}

#svg-overlay text {
  user-select: none;
  font-family: 'Open Sans', sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  font-weight: 600;
  font-size: 27px;
}


@media (max-width: 768px) {
#svg-overlay text {
  font-size: clamp(12px, 7vw, 28px);
}

}


/* === Tooltip de apartamento === */
.tooltip-apto {
  position: absolute;
  z-index: 20;
  background: #242424;
  color: white;
  padding: 45px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0);
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 140px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  text-align: left!important;
}

.tooltip-apto.show {
  opacity: 1;
  transform: translate(-50%, 10px);
}

.tooltip-apto .tooltip-content {
  text-align: left;
}

.tooltip-apto .tooltip-content p {
  margin: 2px 0;
}

.tooltip-apto.hide {
  opacity: 0;
}

.tooltip-apto .tooltip-titulo {
  margin: 0;
  padding-bottom: 5vh;
}

.tooltip-apto .tooltip-label {
  font-weight: 400;
  color: #ffffff;
  font-size: 12px;
  line-height: 1; /* Para que no haya diferencia vertical */
  font-family: 'Open Sans', sans-serif;
  text-transform: uppercase;
}

.tooltip-apto .tooltip-id {
  font-weight: 300;
  color: #98DCCB;
  font-size: clamp(30px, 10vw, 50px);
  font-family: 'Bebas Neue', sans-serif;
  line-height: 0.9; /* Para que no haya diferencia vertical */
}

.tooltip-apto .tooltip-area {
  margin: 4px 0 0;
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
}

.tooltip-apto button {
  background: #98DCCB;
  color: #333333;
  border: none;
  border-radius: 100px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 6px;
  width: 100%;
  font-family: 'Open Sans', sans-serif;
}

.tooltip-apto .tooltip-arrow {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #242424;
}

/* --- En móvil: tooltip fijo inferior --- */
@media (max-width: 768px) {
  .tooltip-apto {
    position: fixed;
    box-sizing: border-box;
    left: 50%;
    bottom: 0px !important;
    transform: translateX(-50%);
    width: 100vw;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    margin: 0;
    padding: 8vw;
    top: auto;
    margin-bottom: 0 !important;
  }

  .contenido-cel{
    display: flex;
    flex-direction: row;
    justify-content:space-between;
    align-items: end;
    padding-bottom: 4vw;
  }

  .tooltip-apto.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
  }

  .tooltip-apto .tooltip-titulo {
  margin: 0;
  padding-bottom: 0;
}


  .tooltip-apto .tooltip-arrow {
    display: none;
  }
}

/* --- Botón solo visible en móvil --- */
@media (min-width: 769px) {
  .tooltip-apto #btn-apto-info {
    display: none;
  }
}




/* === Overlay de fondo === */
.overlay-apto {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: flex-end;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay-apto.show {
  opacity: 1;
  pointer-events: all;
}




/* === BLOQUEAR SCROLL DEL BODY CUANDO HAY PANEL === */
body.no-scroll {
  overflow:hidden;
  height: 100svh;
  touch-action: none; /* Evita desplazamientos en móvil */
}

/* Panel lateral (desktop) */
#panel-apto {
  overflow-y: auto;
  max-height: 100svh;
}

/* Panel móvil */
.panel-apto-movil {
  overflow-y: auto;
}

/* === PANEL COMPUTADOR === */


.panel-apto {
  background: #98dccb;
  color: #fff;
  width: 60%;
  box-sizing: border-box;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}

.overlay-apto.show .panel-apto {
  transform: translateX(0);
}

/* === FRANJA DE CIERRE PANEL ESCRITORIO === */
.panel-franja-cerrar {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100% !important;
  background: #98dccb;
  display: flex;
  justify-content: center;
  align-items:start;
  cursor: pointer;
  z-index: 1002;
  transition: background 0.3s;
  box-sizing: border-box;
}

/* Asegura que el contenido del panel comience después de la franja */
#panel-apto {
  position: relative;
  padding-left: 60px; /* espacio para la franja */
}

.panel-franja-cerrar img {
  padding-top: 20px;
  width: 40px;
  height: 40px;
}


.franja-superior {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: #333333;
  color: #fff;
  padding: 2vw 5vw; 
  align-items:start;
  gap: 1vw;
}

.apto-label {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  font-size: 13px;
}

.apto-numero {
  font-family: 'Bebas Neue', sans-serif;
  color: #98DCCB;
  font-size: 90px !important;
  line-height: 1em;
  margin: 0;
}

.Titulo-area{

  text-transform: uppercase;
  font-size: 14px !important;
}

.metros-cuadrados{
color: #98DCCB;
font-weight: 500;

}

.valor {
  color: #98DCCB;
  font-weight: 500;
}

.col3{

  display: flex;
  gap: 0.5vw;
  flex-direction: column;
}

.icon-row {
  display: flex;
  align-items: center;
  justify-content:start;
  gap: 1vw;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  margin: 4px 0;
  text-transform: uppercase;
}

.icon-row img {
  width: 40px;
  height: 40px;
}

.franja-media {
  background: #fff;
  color: #333;
}

.franja-media .fila-controles {
  display: flex;
  justify-content: space-between;
  align-items:center;
  padding: 2vw 5vw 1vw 5vw; 
}

.col-toggle{
display: flex;
  align-items: center;
  width: 50%;
  justify-content:start;
}

.col-botones{

  border: solid #98DCCB 2px;
  padding: 0;
  margin: 0;
  border-radius: 100px;
}

.btn-toggle{

   background-color: #fff;
  color: #333333;
  text-transform: uppercase;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
  border-radius: 100px;
  font-size: 14px;
  line-height: 1em;
  padding: 13px 40px;
  border: none;
}


button.btn-toggle.active{

   background-color: #333333 !important;
  color: #fff;
}

.col-links{

  display: flex;
  align-items: center;
  gap: 1vw;
  width: 50%;
  justify-content: end;
}

.btn-tour{
  background-color: #333;
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
  border-radius: 100px;
  font-size: 14px;
  line-height: 1em;
  padding: 13px 60px;

}

.btn-whatsapp img{
  width: 50px;
  height: 50px;
}

.franja-media .fila-imagen{
 padding: 1vw 5vw;
 box-sizing: border-box;
}

.franja-media .fila-imagen img {
  width: 100%;
  height: auto;
  border-radius: 0px;
}

.fila-ubicacion{
 padding: 1vw 3vw 2vw 3vw;
 box-sizing: border-box;
 display: flex;
 justify-content: space-between;
}

.planta-ubicacion{

  width: 30%;
  max-width: 250px;
  min-width: 150px;

}

.rosa-vientos{
  width: 10%;
  max-width: 60px;
  min-width: 45px;
}


.franja-inferior img {
  width: 100%;
  height: auto;
  display: block;
}


@media (max-width: 1372px) {

  .panel-apto {
  width: 80%;
}
}

@media (max-width: 982px) {

  .panel-apto {
  width: 90%;
}

.panel-franja-cerrar {
  width: 40px;
}


.panel-franja-cerrar img {
  width: 30px;
  height: 30px;
}

#panel-apto {
  padding-left: 40px; /* espacio para la franja */
}

.col-toggle{
  width: 60%;
}

.col-links{
  width: 40%;
}

.btn-tour{
  padding: 13px 22px;

}

.btn-whatsapp img{
  width: 50px;
  height: 50px;
}
}

@media (max-width: 768px) {
  .franja-superior {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .icon-row {
    justify-content: center;
  }
}


/* === PANEL MÓVIL === */

.panel-apto-movil {
  position: fixed;
  top: 0;
  left: 0;
  width: 100svw;
  height: 100svh;
  background: #1c1c1c;
  color: #fff;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transform: translateY(150%);
  transition: transform 0.4s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.panel-apto-movil.show {
  transform: translateY(0);
}

.panel-movil-contenido {
  padding: 6%;
  overflow-y: auto;
}

#panel-movil-media img,
#panel-movil-media iframe {
  width: 100%;
  max-width: 100%;
  margin-top: 1.5rem;
  border-radius: 10px;
}

.panel-movil-header {
  position: sticky;
  top: 0;
  z-index: 10001;
  width: 100svw;
  height: 80px;
  background: #98dccb;
  display: flex;
  align-items: center;
  justify-content: start;
  padding: 0 16px;
}

.btn-cerrar-panel-movil {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1c1c1c;
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
}

.btn-cerrar-panel-movil img.icono-regresar {
  width: 35px;
  height: 35px;
}

.btn-cerrar-panel-movil span {
  user-select: none;
  font-family: 'Open Sans', sans-serif;
  padding-right: 20px;
}

.panel-movil-contenido {
    padding:0;
    overflow-y: auto;
    background-color: #333333;
}



@media (max-width: 769px) {


.franja-superior {
  display: flex;
  flex-direction: column;
  background: #333333;
  color: #fff;
  padding: 7%; 
  align-items:center;
  gap: 1vw;
}

.apto-label {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  font-size: 13px;
}

.apto-numero {
  font-family: 'Bebas Neue', sans-serif;
  color: #98DCCB;
  font-size: 90px !important;
  line-height: 1em;
  margin: 0;
}

.col2{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 2vh;
line-height: 1em !important;
}

.col2 p{
padding: 0;
margin: 0;
}


.col3{

  display: flex;
  gap: 0.5vw;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 2vh 5vw;
}


.franja-media {
  background: #fff;
  color: #333;
}

.franja-media .fila-controles {
  padding: 7vw 5vw 1vw 7vw; 
  flex-direction:column-reverse;
}


.franja-media .fila-imagen{
 padding: 7%;
 box-sizing: border-box;
}

.fila-ubicacion{
 padding: 0 7% 7% 7%;
 box-sizing: border-box;
 display: flex;
 flex-direction: row;
 justify-content: space-between;
}

.planta-ubicacion{
  width: 40% !important;
  max-width: 250px;
  min-width: 15px;
 box-sizing: border-box;
}

.rosa-vientos{
  width: 15% !important;
  max-width: 60px;
  min-width: 4px;
  box-sizing: border-box;
}


.col-links{
  background-color: #333;
  padding: 7%;
  width: 100%;
  justify-content: space-around;
  box-sizing: border-box;
}

.btn-tour{
  background-color: #98DCCB;
  color: #333333;
 font-weight: 500;

}

.btn-whatsapp img{
  width: 50px;
  height: 50px;
}


.franja-inferior img {
  width: 100%;
  height: auto;
  display: block;
}

}