* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: auto;
  min-height: 100%;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
  position: relative;
}

.landing {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* centra verticalmente todo el conjunto */
  align-items: center;
  position: relative;
  width: 100%;
  padding-top: 4rem;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

.bg-interior {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}

.fachada {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
}

.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.8); /* centrado y grande al inicio */
  width: clamp(120px, 22vw, 220px);
  height: auto;
  z-index: 5;
  transition: filter 0.3s ease;
}

.welcome-text {
  position: relative; /* ahora fluye bajo el logo */
  margin-top: calc(220px * 0.6 + 2rem); /* espacio suficiente sobre el texto */
  max-width: 700px;
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.5;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.5s, top 0.5s;
  color: #fff;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  z-index: 3;
}

.cards {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columnas */
  grid-auto-rows: minmax(80px, auto); /* filas automáticas */
  gap: 0.5rem;
  color: white;
  width: 100%;
  max-width: 600px;
  margin: 2rem auto; /* separación desde texto */
  transform: none;
}

.card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  text-align: center;
  width: 100%; /* ocupa todo el ancho de la celda */
}

.card:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  position: relative;
  background: rgba(82, 82, 82, 0.6);
  color: #fff;
  backdrop-filter: blur(5px);
  border-radius: 18px;
  max-width: 480px;
  width: 90%;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Banner fijo arriba */
.modal-banner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  flex-shrink: 0;
}

.banner-slider {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 1s ease-in-out;
}

.banner-slider img {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Botón close arriba a la derecha */
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

/* Cuerpo con scroll */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px 18px;
  text-align: center;
}

.modal-body h2 {
  letter-spacing: 0.7px;
  margin-bottom: 20px;
}

.modal-body p {
  text-align: start;
  margin-bottom: 14px;
  color: #fff;
}

/* Botón WhatsApp fijo debajo del contenido */
.btn-fechas,
.btn-apartment {
  display: block;
  margin: 12px auto 12px auto; /* centrado horizontal y margen inferior */
  padding: 12px 24px;
  background: #0f305b;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 400;
  animation: pulse 2s infinite;
  letter-spacing: 0.8px;
}

/* Pulse suave */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.modal-content::-webkit-scrollbar {
  width: 5px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00c6ff, #0072ff); /* Colores scroll */
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    #009739,
    #ffdf00
  ); /* hover con brasil vibes */
}

.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #0f305b rgba(255, 255, 255, 0.2);
}

/* FOOTER */

.site-footer {
  position: relative; /* ya no fijo */
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #0000006b;
  font-size: 14px;
  color: #fff;
  text-align: center;
  padding: 6px 0px;
  opacity: 0; /* animación gsap intacta */
  transform: translateY(0);
  margin-top: 2rem;
  z-index: 11;
}

.site-footer a {
  color: #4e84a7; /* color dorado para los enlaces */
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: #00e5ff; /* cambio de color al pasar el mouse */
}

@media (min-width: 768px) and (max-width: 1024px) {
  .landing {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding-top: 3rem;
    overflow-y: auto;
  }

  .logo {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    width: clamp(280px, 30vw, 340px);
  }

  .welcome-text {
    position: relative;
    margin-top: 35%;
    font-size: 1.1rem;
    padding: 0 1.5rem;
    text-align: center;
    line-height: 1.6;
    max-width: 80%;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 90%;
    max-width: 700px;
    margin: 2.5rem auto;
  }

  .card {
    font-size: 1.05rem;
    min-height: 80px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
  }

  .modal-content {
    height: 75vh;
  }

  .site-footer {
    margin-top: auto;
    width: 100%;
    bottom: 0;
    opacity: 0;
    z-index: 5;
  }
}

/* ===================== AJUSTES MOBILE (hasta 768px) ===================== */
@media (max-width: 767px) {
  .landing {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    overflow-y: auto; /* sin scroll durante la animación */
    padding-top: 0;
  }

  .logo {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.4); /* centrado grande */
    width: clamp(160px, 40vw, 260px);
  }

  .welcome-text {
    position: relative;
    top: 0;
    left: auto;
    right: auto;
    transform: none;
    opacity: 0; /* se muestra con gsap */
    font-size: 1rem;
    padding: 0 1rem;
    max-width: 90%;
    text-align: center;
    line-height: 1.4;
    z-index: 10;
  }

  .cards {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* mantiene 2 columnas */
    gap: 0.6rem;
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
    transform: none;
    top: 0;
  }

  .card {
    min-height: 70px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .modal-content {
    height: 73vh;
  }

  .site-footer {
    position: relative;
    margin-top: auto;
    width: 100%;
    bottom: 0;
    opacity: 0;
    z-index: 5;
  }
}

/* ===================== AJUSTES MOBILE PEQUEÑO (hasta 400px) ===================== */
@media (max-width: 400px) {
  .landing {
    min-height: 100vh; /* asegura cubrir toda la pantalla */
    overflow-y: auto; /* permite scroll solo si el contenido lo necesita */
    padding-top: 0;
  }

  .logo {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.3);
    width: clamp(140px, 45vw, 220px);
  }

  .welcome-text {
    margin-top: 40%;
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin: 2rem auto;
  }

  .card {
    font-size: 0.95rem;
    min-height: 65px;
  }
  .modal-content {
    height: 90vh;
  }
}
