/* ===========================================
   🌍 ESTILOS GENERALES DEL SITIO
=========================================== */

html, body {
  background-color: #f8f9fa !important;
  color: #212529 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding-top: 70px !important;
  margin: 0;
}

/* --- Tarjetas y contenedores --- */
.card {
  background-color: #ffffff !important;
  color: #212529 !important;
  border: none !important;
  border-radius: 1rem !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.container, .row, .apartment-container {
  background-color: #ffffff !important;
  border-radius: 1rem;
   margin-top: -30px !important;
  padding-bottom: 60px !important;
  overflow: visible !important;
}

/* --- Fondo secciones claras --- */
.bg-light {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

/* --- Calendario --- */
.calendar {
  background: #fff !important;
  border-radius: 10px;
  padding: 1rem;
}

.calendar td {
  width: 36px;
  height: 36px;
  vertical-align: middle;
}

.calendar td.booked {
  background-color: #dc3545;
  color: white;
  border-radius: 4px;
}

.table-danger {
  background-color: #ffcccc !important;
}

.calendar-legend {
  font-size: 0.95rem;
  color: #555;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background-color: #dc3545; }

/* --- Botón Reservar --- */
.reserve-btn {
  background-color: #0d6efd;
  border: none;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  width: 100%;
  transition: all 0.3s;
}

.reserve-btn:hover {
  background-color: #0056b3;
}

/* --- Botones Bootstrap coherentes --- */
.btn-primary {
  background-color: #0d6efd;
  border: none;
}

.btn-primary:hover {
  background-color: #0b5ed7;
}

/* --- Galería de imágenes --- */
.gallery img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(5, 132, 16, 0.2);
}

/* ===========================================================
   🖼️ GALERÍA DE MINIATURAS (IMÁGENES Y VIDEO)
   =========================================================== */

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: start;
  align-items: center;
}

/* Todas las miniaturas (fotos, +X y video) */
.thumb-more,
.thumb-video {
  position: relative;
  width: 120px !important;
  height: 90px !important;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  cursor: pointer;
}

/* Imagen dentro de miniatura */
.thumb-more img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 8px;
  filter: brightness(80%);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.thumb-more:hover img {
  transform: scale(1.05);
  filter: brightness(100%);
}

/* 🔹 Overlay +X que cubre toda la imagen */
.more-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
  transition: background 0.3s ease;
}

.thumb-more:hover .more-overlay {
  background: rgba(0, 0, 0, 0.8);
}

/* 🔸 Miniatura de video: mismo tamaño */
.thumb-video {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-video i {
  color: #fff;
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.thumb-video:hover i {
  transform: scale(1.2);
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .thumb-more,
  .thumb-video {
    width: 90px !important;
    height: 70px !important;
  }
  .more-overlay {
    font-size: 1.1rem;
  }
}

/* ===========================================================
   💡 LIGHTBOX Y VIDEO OVERLAY
   =========================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 240, 240, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  padding: 40px;
  transition: all 0.3s ease-in-out;
}

.lightbox.open .lb-image {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  object-fit: contain;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.8);
  border: none;
  color: #333;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lb-close {
  top: 25px; right: 35px;
  font-size: 2rem;
  width: 40px; height: 40px;
}

.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  width: 45px; height: 45px;
  display: flex; align-items: center; justify-content: center;
}

.lb-prev:hover, .lb-next:hover, .lb-close:hover {
  background: rgba(33,74,115,0.8);
  color: #fff;
}

.lb-prev { left: 30px; }
.lb-next { right: 30px; }

/* ===========================================================
   💬 AJUSTES FINALES Y MODALES
   =========================================================== */

.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 99998 !important;
}

.modal-content {
  border: none;
  border-radius: 1rem;
  background-color: #fff !important;
  color: #000 !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

/* --- Botón flotante de WhatsApp --- */
.btn-whatsapp {
  position: fixed;
  bottom: 25px; right: 25px;
  background-color: #25d366;
  color: white;
  font-size: 1.9rem;
  width: 55px; height: 55px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 9999;
}

.btn-whatsapp:hover {
  background-color: #1ebe5d;
  transform: scale(1.1);
}

/* 🔹 Efecto de aparición suave para imágenes lazy */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

img.lazyloaded {
  opacity: 1;
}
