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

html, body {
  background-color: #f8f9fa !important;
  color: #212529 !important;
  overflow-x: hidden !important;
  overflow-y: auto !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;
 
  padding-bottom: 60px !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;
}

/* 🔹 Logo dentro del lightbox */
.glightbox-container::after {
  content: "";
  position: absolute;
  bottom: 15px;       /* distancia desde abajo */
  right: 15px;        /* distancia desde la derecha */
  width: 70px;        /* tamaño del logo */
  height: 70px;
  background: url('assets/img/logo.svg') no-repeat center center;
  background-size: contain;
  opacity: 0.7;       /* transparencia del logo */
  pointer-events: none; /* no bloquea clics ni navegación */
  z-index: 9999;
}

/* ===========================================================
   🔹 LOGO DENTRO DEL LIGHTBOX (marca de agua)
   =========================================================== */

.glightbox-container .ginner-container::after {
  content: "";
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 70px;
  height: 70px;
  background: url('assets/img/logo.svg') no-repeat center center;
  background-size: contain;
  opacity: 0.7;
  pointer-events: none;
  z-index: 9999;
}

/* 🔹 Versión responsive para móviles */
@media (max-width: 576px) {
  .glightbox-container .ginner-container::after {
    width: 45px;
    height: 45px;
    bottom: 10px;
    right: 10px;
  }
}
/* ===========================================================
   🔹 LOGO SVG DENTRO DEL LIGHTBOX (garantizado)
   =========================================================== */

/* Detecta el contenedor global de Glightbox y añade el logo */
body .glightbox-container::after {
  content: "";
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 70px;
  height: 70px;
  background: url('assets/img/logo.svg') no-repeat center center;
  background-size: contain;
  opacity: 0.75;
  z-index: 999999;  /* por encima de cualquier imagen */
  pointer-events: none;
}

/* 🔹 Versión responsive para pantallas pequeñas */
@media (max-width: 576px) {
  body .glightbox-container::after {
    width: 50px;
    height: 50px;
    bottom: 10px;
    right: 10px;
  }
}

/* 🔹 Ajusta espacio superior del mapa */
.container-fluid.mt-5 {
  margin-top: 2rem !important;
}

/* 🔹 Elimina fondo blanco entre el contenido y el mapa */
body, .bg-light {
  background-color: #f8f9fa !important;
}

.dia {
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

.dia.disponible:hover {
  background-color: #e9f2ff !important;
}

.dia.booked {
  background-color: #e60000 !important;
  color: #fff !important;
  border-radius: 6px;
}

.fecha-inicio {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.fecha-fin {
  background-color: #198754 !important;
  color: #fff !important;
}

.bg-info {
  background-color: #0dcaf0 !important;
  color: #fff !important;
}
.dia {
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

.dia.disponible:hover {
  background-color: #e9f2ff !important;
}

.dia.booked {
  background-color: #dc3545 !important;
  color: #fff !important;
  border-radius: 6px;
  cursor: not-allowed;
}

.fecha-inicio {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.fecha-fin {
  background-color: #198754 !important;
  color: #fff !important;
}

.bg-info {
  background-color: #0dcaf0 !important;
  color: #fff !important;
}

.dia.booked {
  background-color: #b30000 !important;
  color: #fff !important;
  border-radius: 6px;
  cursor: not-allowed;
  box-shadow: 0 0 6px rgba(179, 0, 0, 0.6);
}

.opiniones-container::-webkit-scrollbar {
  width: 6px;
}
.opiniones-container::-webkit-scrollbar-thumb {
  background-color: #007bff;
  border-radius: 3px;
}
.opiniones-container {
  scrollbar-width: thin;
}
@media (max-width: 768px) {
  #modalVerMas .modal-dialog {
    margin: 0 10px;
  }
  #modalVerMas .modal-body {
    padding: 1rem;
  }
}

/* 🔹 Ajuste responsive del calendario en móviles */
@media (max-width: 768px) {
  .calendar {
    padding: 0.5rem !important;
    overflow-x: auto !important;
    width: 100% !important;
  }

  .calendar table {
    min-width: 320px; /* Evita que se comprima demasiado */
    width: 100%;
  }

  .calendar td {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
  }

  .calendar th {
    font-size: 0.85rem !important;
  }

  .calendar-legend {
    font-size: 0.8rem !important;
    text-align: center;
  }
}

/* Días ocupados (rojos) */
.dia.booked {
  background-color: #f8d7da;
  color: #b02a37;
  border-radius: 6px;
}

/* Días pasados (grises y tachados) */
.dia.pasado {
  color: #aaa;
  text-decoration: line-through;
  background-color: #f2f2f2;
  border-radius: 6px;
}

/* Días disponibles (azul claro al pasar el mouse) */
.dia.disponible:hover {
  background-color: #e7f1ff;
  cursor: pointer;
}

/* 🔹 Quitar el bloqueo invisible del fondo */
.modal-backdrop.show {
  background-color: transparent !important;
  opacity: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important; /* ✅ permite interactuar con el modal */
}

/* 🔹 Mantener el modal sólido y visible */
#adminLoginModal .modal-content {
  background-color: #fff !important;
  color: #000;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  position: relative;
  z-index: 99999 !important;
}

#adminLoginModal .modal-header {
  background-color: #0d6efd !important;
  color: #fff !important;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

/* ===== Galería principal (modo escritorio) ===== */
/* ===== ESCRITORIO: Tamaño fijo ===== */
.gallery img.main-image {
  width: 100%;
  max-width: 780px;      /* 🔹 Ancho máximo fijo */
  height: 500px;         /* 🔹 Altura fija en desktop */
  object-fit: cover;     /* 🔹 Recorta imagen para llenar el espacio */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;        /* 🔹 Centra la imagen */
}

.gallery img.main-image:hover {
  transform: scale(1.02);
}

/* ===== TABLETS: Altura media ===== */
@media (max-width: 1200px) {
  .gallery img.main-image {
    height: 450px;       /* 🔹 Un poco más pequeña en tablets grandes */
  }
}

@media (max-width: 992px) {
  .gallery img.main-image {
    height: 400px;       /* 🔹 Altura media en tablets */
    max-width: 100%;     /* 🔹 Ocupa todo el ancho disponible */
  }
}

/* ===== MÓVILES: Altura reducida y completamente responsive ===== */
@media (max-width: 768px) {
  .gallery img.main-image {
    height: 350px;       /* 🔹 Más compacta en móviles grandes */
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .gallery img.main-image {
    height: 280px;       /* 🔹 Compacta en móviles pequeños */
    max-width: 100%;
  }
}

/* Para móviles muy pequeños */
@media (max-width: 400px) {
  .gallery img.main-image {
    height: 220px;       /* 🔹 Muy compacta */
  }
}
/* ===== Miniaturas (thumbnails debajo) ===== */
.thumbnails {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: start;
}

.thumbnails img {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnails img:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
 

/* ===========================================================
   🔹 MARCA DE AGUA INYECTADA POR JS
   =========================================================== */

/* Necesario para posicionar el logo ABSOLUTAMENTE dentro de la diapositiva */
.ginner-container {
    position: relative; 
}

/* Estilo para la imagen que inyecta el JS */
.watermark-logo {
    position: absolute;
    bottom: 20px;        /* 20px desde el borde inferior */
    right: 20px;         /* 20px desde el borde derecho */
    z-index: 10000;      /* Por encima de la imagen, debajo del modal */
    opacity: 0.75;       /* Semi-transparente */
    max-width: 70px;     /* Tamaño de la imagen (ajustar si es necesario) */
    height: auto;
    pointer-events: none; /* Crucial: permite al usuario hacer clic en la imagen y no en el logo */
}

/* Opcional: Ajuste para móviles */
@media (max-width: 576px) {
  .watermark-logo {
    max-width: 50px;
    bottom: 10px;
    right: 10px;
  }
}/* ===========================================================
   🔹 MARCA DE AGUA (Corrección para GLightbox)
   =========================================================== */

/* 1. CRÍTICO: Asegura que el contenedor de la imagen dentro del lightbox sea el punto de referencia (relative) */
.ginner-container {
    position: relative; 
}

/* 2. Estilo y posición del logo (absolute respecto al ginner-container) */
.watermark-logo {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10000;      /* Alto para estar SOBRE la imagen */
    opacity: 0.75;       /* Semi-transparente */
    max-width: 70px;     /* Ajusta este tamaño */
    height: auto;
    pointer-events: none; /* Permite clics "a través" del logo */
}

/* Ajuste para móviles */
@media (max-width: 576px) {
  .watermark-logo {
    max-width: 50px;
    bottom: 10px;
    right: 10px;
  }
}
/* ==========================================================
   💬 BOTÓN WHATSAPP - VISIBILIDAD CORRECTA CON MODALES
   ========================================================== */

/* Estado normal */
.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.25);
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 3000; /* 🔹 debajo del modal, encima del contenido */
}

/* Hover */
.btn-whatsapp:hover {
  background-color: #1ebe5d;
  transform: scale(1.08);
}

/* Cuando hay un modal abierto (Bootstrap añade .modal-open al <body>) */
body.modal-open .btn-whatsapp {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

/* 📱 Ajuste móvil */
@media (max-width: 768px) {
  .btn-whatsapp {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
  }
}

/* Modal de video siempre encima */
#videoModal.modal {
  z-index: 99999 !important;
}

#videoModal .modal-dialog {
  z-index: 100000 !important;
  margin-top: 80px !important; /* Compensa header */
}

#videoModal .modal-content {
  z-index: 100001 !important;
  background: #000 !important;
}

#videoModal ~ .modal-backdrop {
  z-index: 99998 !important;
  background: rgba(0, 0, 0, 0.9) !important;
}
@media (max-width: 768px) {
  #videoModal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    height: 100vh !important;
    display: flex;
    align-items: center;
  }
  
  #videoModal .modal-content {
    border-radius: 0 !important;
    height: 100% !important;
  }
  
  #videoModal video {
    height: 100% !important;
    object-fit: contain !important;
  }
}

/* ===========================================================
   🎬 MODAL DE VIDEO - TAMAÑO FIJO Y CIERRE FUNCIONAL
   =========================================================== */

#videoModal.modal {
  z-index: 99999 !important;
  padding-top: 80px !important;
}

#videoModal .modal-dialog {
  z-index: 100000 !important;
  margin: 0 auto !important;
  max-width: 800px !important; /* Tamaño fijo máximo */
  width: 90vw !important;      /* Responsive pero controlado */
  max-height: 80vh !important; /* Altura máxima */
  top: 50% !important;
  transform: translateY(-50%) !important;
}

#videoModal .modal-content {
  z-index: 100001 !important;
  background: #000 !important;
  border: none !important;
  border-radius: 12px !important;
  height: auto !important;
  min-height: 300px !important;
  position: relative;
}

/* Botón de cierre MÁS visible y funcional */
#videoModal .btn-close {
  position: absolute !important;
  top: 15px !important;
  right: 15px !important;
  z-index: 100002 !important; /* Encima del video */
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 50% !important;
  width: 35px !important;
  height: 35px !important;
  opacity: 1 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
  transition: all 0.3s ease !important;
}

#videoModal .btn-close:hover {
  background: rgba(255, 255, 255, 1) !important;
  transform: scale(1.1) !important;
}

/* Video responsive dentro del contenedor */
#videoModal video {
  width: 100% !important;
  height: auto !important;
  max-height: 70vh !important;
  border-radius: 8px !important;
  display: block !important;
}

/* Backdrop */
#videoModal ~ .modal-backdrop {
  z-index: 99998 !important;
  background: rgba(0, 0, 0, 0.85) !important;
}
@media (max-width: 768px) {
  #videoModal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    display: flex;
    align-items: center;
    transform: none !important;
    top: 0 !important;
  }
  
  #videoModal .modal-content {
    border-radius: 0 !important;
    height: 100% !important;
    max-height: 100vh !important;
  }
  
  #videoModal video {
    height: 100% !important;
    max-height: 100vh !important;
    object-fit: contain !important;
  }
  
  #videoModal .btn-close {
    top: 10px !important;
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
  }
}

/* ===========================================================
   📱 MODAL DE VIDEO - PANTALLA COMPLETA EN MÓVIL
   (Agregar al final del archivo)
=========================================================== */

@media (max-width: 768px) {
  /* Modal ocupa toda la pantalla */
  #videoModal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    display: flex;
    align-items: stretch !important;
    transform: none !important;
    top: 0 !important;
  }
  
  /* Contenido ocupa toda la pantalla */
  #videoModal .modal-content {
    border-radius: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
  }
  
  /* Video ocupa máximo espacio disponible */
  #videoModal video {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    flex-grow: 1;
  }
  
  /* Botón de cierre más grande y visible */
  #videoModal .btn-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 100002 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    opacity: 1 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
    background-size: 20px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
  }
  
  #videoModal .btn-close:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.1) !important;
  }
  
  /* Asegurar que el modal esté encima de todo */
  #videoModal.modal {
    padding-top: 0 !important;
  }
}

/* Para tablets más pequeñas */
@media (max-width: 576px) {
  #videoModal .btn-close {
    top: 10px !important;
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
    background-size: 18px !important;
  }
}


/* ==========================================================
   🚨 SOLUCIÓN PARA MODAL VER MÁS OPINIONES (z-index fix)
   ========================================================== */

/* 1. CRÍTICO: Define un z-index extremadamente alto para el modal */
#modalVerMas.modal {
    /* Usamos un valor muy alto (por encima de 99999) para asegurar que el modal
       siempre se muestre por encima de cualquier otro elemento fijo (header, navbar, etc.) */
    z-index: 150000 !important;
}

/* 2. Asegura que el fondo del modal (backdrop) esté justo debajo del modal */
#modalVerMas ~ .modal-backdrop.show {
    /* Un poco menos que el modal */
    z-index: 149999 !important;
}

/* =================================================== */
/* === AJUSTES DE GALERÍA RESPONSIVA (PC y MÓVIL) === */
/* =================================================== */

.main-gallery-container {
     width: 100%;
    max-width: 1400px;   /* 🔥 más ancho todavía si quieres */
    margin: 0 auto;
}

/* --------------------------------------------------- */
/* --- VISTA MÓVIL (por defecto, < 992px) --- */
/* --------------------------------------------------- */

.mobile-img-hero {
    height: 40vh; /* Altura visible para la imagen en móvil */
    object-fit: cover;
}

.carousel-item {
    position: relative;
}

.btn-ver-mas-movil {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 10;
}

.btn-ver-mas-movil:hover {
    background-color: rgba(0, 0, 0, 0.8);
}


/* --------------------------------------------------- */
/* --- VISTA PC (min-width: 992px) --- */
/* --------------------------------------------------- */

@media (min-width: 992px) {
    
    .gallery-grid-pc {
        display: grid;
        /* Definición de la cuadrícula: 2 columnas, la primera es más grande */
        grid-template-columns: 2fr 1fr;
        /* Definición de las filas: 2 filas iguales */
        grid-template-rows: 1fr 1fr;
        gap: 8px; /* Espacio entre las imágenes */
        height: 60vh; /* Altura total del contenedor grande en PC */
    }

    /* 1. Imagen Principal (Ocupa 2x2) */
    .grid-main-photo {
        grid-column: 1 / 2; /* Inicia en col 1, termina en col 2 */
        grid-row: 1 / 3;    /* Inicia en row 1, termina en row 3 (ocupa ambas filas) */
        overflow: hidden;
    }

    .hero-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* 2. Miniaturas Laterales (2a, 3a, 4a foto) */
    .grid-thumb {
        overflow: hidden;
    }
    
    .grid-thumb-1 {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    /* ESTE ES EL CAMBIO CLAVE: Posicionamiento relativo para el botón */
    .grid-thumb-2, 
    .grid-thumb-3 {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        position: relative; /* 👈 Permitirá que el botón .btn-ver-mas-pc se posicione sobre este */
    }

    .thumb-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Redondeado de esquinas */
    .hero-img {
        border-top-left-radius: 0.5rem !important;
        border-bottom-left-radius: 0.5rem !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    
    .grid-thumb-1 .thumb-img {
        border-top-right-radius: 0.5rem !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    .grid-thumb-3 .thumb-img {
        border-bottom-right-radius: 0.5rem !important;
    }
    
    /* 4. Botón 'Ver Más Fotos' (en PC) */
    .btn-ver-mas-pc {
        position: absolute;
        bottom: 8px;
        right: 8px;
        z-index: 10;
        /* Estilos de apariencia */
        background-color: white;
        color: var(--bs-primary);
        border: 1px solid var(--bs-primary);
        padding: 5px 10px;
        font-size: 0.9rem;
        font-weight: bold;
        border-radius: 6px;
        transition: background-color 0.2s, color 0.2s;
    }
    
    .btn-ver-mas-pc:hover {
        background-color: var(--bs-primary);
        color: white;
    }
}

/* ==========================================================
   🚨 SOLUCIÓN PARA MODAL GALERÍA (z-index fix)
   ========================================================== */

/* 1. CRÍTICO: Define un z-index extremadamente alto para el modal en sí.
   (Usamos un valor por encima del z-index predeterminado de los modales de Bootstrap, que es 1055, y también por encima del z-index de cualquier posible encabezado fijo en la página). */
#galleryModal.modal {
    z-index: 106000 !important; /* Valor muy alto para asegurar la visibilidad */
}

/* 2. Asegura que el fondo del modal (backdrop) esté justo debajo del modal. */
/* El backdrop utiliza la clase general .modal-backdrop */
#galleryModal ~ .modal-backdrop.show {
    /* Un poco menos que el modal */
    z-index: 105999 !important;
}

/* ==========================================================
   📸 ESTILOS PARA LA GALERÍA (Tamaño Uniforme de Imágenes)
   ========================================================== */

/* 1. Contenedor de cada imagen en la galería */
/* Asumo que las imágenes están dentro de una estructura como esta:
   <div class="col-md-3">
       <div class="gallery-image-wrapper">
           <img src="..." class="img-fluid" alt="...">
       </div>
   </div>
   Si no usas 'gallery-image-wrapper', puedes aplicar estos estilos directamente
   a la etiqueta 'img' o a su contenedor más directo.
*/
.gallery-image-wrapper {
    width: 100%; /* Ocupa todo el ancho de su columna */
    height: 250px; /* **Altura fija para todas las imágenes** */
    overflow: hidden; /* Oculta cualquier parte de la imagen que se desborde */
    position: relative; /* Necesario para posicionar la imagen dentro */
    margin-bottom: 15px; /* Espacio entre las imágenes */
    border-radius: 5px; /* Bordes ligeramente redondeados (opcional) */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Sombra suave (opcional) */
}

/* 2. Estilos para la imagen dentro del contenedor */
.gallery-image-wrapper img {
    width: 100%; /* Asegura que la imagen intente llenar el ancho */
    height: 100%; /* Asegura que la imagen intente llenar la altura */
    object-fit: cover; /* **CRÍTICO: Escala la imagen para llenar el contenedor, recortando los bordes si es necesario** */
    object-position: center; /* Centra la imagen dentro de su contenedor */
    display: block; /* Elimina el espacio extra que algunos navegadores añaden a las imágenes */
}

/* Opcional: Efecto hover para las imágenes */
.gallery-image-wrapper:hover {
    transform: scale(1.02); /* Ligeramente más grande al pasar el ratón */
    transition: transform 0.3s ease;
}

/* --- 1. Contenedor Principal de la Cuadrícula (Vista PC) --- */
.gallery-grid-pc {
     display: grid;
    width: 100%;                 /* 🔥 Ocupa todo el ancho */
    max-width: 1200px;           /* 🔥 Más ancha */
    margin: 0 auto;              /* Centrada */
    height: 550px;               /* 🔥 Más alta */
    grid-template-columns: 2.2fr 1fr; /* La foto principal más grande */
    grid-template-rows: 1fr 1fr 1fr;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

/* --- 2. Foto Principal (Ocupa dos filas) --- */
.grid-main-photo {
    /* Ocupa la primera columna y las dos filas */
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

/* --- 3. Posicionamiento de Miniaturas (La imagen que estaba en grid-thumb-1 no se está usando) --- */

/* Miniatura Superior Derecha (grid-thumb-1 en el HTML corregido) */
.grid-thumb-1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

/* Miniatura Inferior Derecha (Donde irá el botón "Ver más") */
.grid-thumb-3 { 
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    position: relative; /* Necesario para que el botón "Ver más" se posicione correctamente */
}

/* Estilo general para todas las imágenes dentro de la cuadrícula */
.grid-main-photo img,
.grid-thumb-1 img,
.grid-thumb-2 img,
.grid-thumb-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- 4. Redondeo de Esquinas con Bootstrap 4/5 --- */

/* La foto principal solo se redondea a la izquierda */
.grid-main-photo img {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

/* La miniatura superior se redondea arriba a la derecha */
.grid-thumb-1 img {
    border-top-right-radius: 0.5rem;
}

/* La miniatura inferior se redondea abajo a la derecha */
.grid-thumb-3 img {
    border-bottom-right-radius: 0.5rem;
}

/* Eliminar redondeos por defecto en otras esquinas */
.grid-main-photo img {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.grid-thumb-1 img,
.grid-thumb-3 img {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}


/* --- 5. Botón 'Ver Más Fotos' (en PC) --- */
.btn-ver-mas-pc {
    position: absolute;
    /* Ajusta estos valores si el botón no está donde quieres */
    bottom: 16px; 
    right: 16px;
    z-index: 10; 
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.btn-ver-mas-pc:hover {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
}




/* --- Contenedor de la Galería Principal (PC) --- */
.gallery-grid-pc {
    display: grid;
    /* ALTURA AUMENTADA A 600px */
    height: 600px; 
    
    /* 2fr para principal (2/3 de ancho) y 1fr para miniaturas (1/3 de ancho) */
    grid-template-columns: 2fr 1fr; 
    
    /* Tres filas de igual altura para las 3 miniaturas */
    grid-template-rows: 1fr 1fr 1fr; 
    
    gap: 8px; 
    position: relative; 
    overflow: hidden;
}

/* --- Foto Principal (Lado Izquierdo) --- */
.gallery-grid-pc .grid-main-photo {
    /* Ocupa la primera columna y las TRES filas completas */
    grid-column: 1 / 2;
    grid-row: 1 / 4; 
}

/* --- Miniaturas (Lado Derecho) --- */

/* Miniatura 1 (Superior Derecha) */
.gallery-grid-pc .grid-thumb-1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2; 
}

/* Miniatura 2 (Media Derecha) */
.gallery-grid-pc .grid-thumb-2 { 
    grid-column: 2 / 3;
    grid-row: 2 / 3; 
}

/* Miniatura 3 (Inferior Derecha) - Contiene el botón "Ver Más" */
.gallery-grid-pc .grid-thumb-3 { 
    grid-column: 2 / 3;
    grid-row: 3 / 4; 
    position: relative; 
}

/* Estilos generales de las imágenes dentro de la cuadrícula */
.gallery-grid-pc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Redondeado de esquinas: La foto principal */
.gallery-grid-pc .grid-main-photo .hero-img {
    border-top-left-radius: 0.5rem !important;
    border-bottom-left-radius: 0.5rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Redondeado de esquinas: Miniatura superior derecha */
.gallery-grid-pc .grid-thumb-1 .thumb-img {
    border-top-right-radius: 0.5rem !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Redondeado de esquinas: Miniatura del medio (sin redondeo) */
.gallery-grid-pc .grid-thumb-2 .thumb-img {
    border-radius: 0 !important;
}

/* Redondeado de esquinas: Miniatura inferior derecha */
.gallery-grid-pc .grid-thumb-3 .thumb-img {
    border-bottom-right-radius: 0.5rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* 4. Botón 'Ver Más Fotos' (en PC) - Posicionado dentro de grid-thumb-3 */
.gallery-grid-pc .btn-ver-mas-pc {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7); 
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.gallery-grid-pc .btn-ver-mas-pc:hover {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
}

/* ===========================================================
   🖼️ GALERÍA MEJORADA - 1 GRANDE + 3 PEQUEÑAS
   =========================================================== */

/* Contenedor principal de la galería en PC */
.gallery-grid-pc {
    display: grid;
    height: 500px; /* Altura fija para mantener proporción */
    grid-template-columns: 2fr 1fr; /* Imagen principal ocupa 2/3, miniaturas 1/3 */
    grid-template-rows: 1fr 1fr 1fr; /* 3 filas para las miniaturas */
    gap: 8px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

/* Imagen Principal (Grande - Lado Izquierdo) */
.grid-main-photo {
    grid-column: 1 / 2;
    grid-row: 1 / 4; /* Ocupa las 3 filas */
    overflow: hidden;
}

.grid-main-photo .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* Miniaturas (Lado Derecho) */
.grid-thumb {
    overflow: hidden;
    position: relative;
}

/* Posicionamiento de cada miniatura */
.grid-thumb-1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.grid-thumb-2 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.grid-thumb-3 {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    position: relative; /* Para el botón Ver Más */
}

.grid-thumb .thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-thumb:hover .thumb-img {
    transform: scale(1.05);
}

/* Redondeado de esquinas para miniaturas */
.grid-thumb-1 .thumb-img {
    border-top-right-radius: 12px;
}

.grid-thumb-3 .thumb-img {
    border-bottom-right-radius: 12px;
}

/* Botón Ver Más Fotos */
.btn-ver-mas-pc {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    color: #0d6efd;
    border: 2px solid #0d6efd;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-ver-mas-pc:hover {
    background-color: #0d6efd;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Vista Móvil */
.mobile-img-hero {
    height: 300px;
    object-fit: cover;
    width: 100%;
}

.btn-ver-mas-movil {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.btn-ver-mas-movil:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Responsive para tablets */
@media (max-width: 1200px) and (min-width: 992px) {
    .gallery-grid-pc {
        height: 450px;
    }
}

/* Para pantallas muy grandes */
@media (min-width: 1400px) {
    .gallery-grid-pc {
        height: 550px;
    }
}


/* ================================================
   🔥 AJUSTE DEFINITIVO - GALERÍA MÁS ANCHA EN PC
   ================================================ */

@media (min-width: 992px) {

    .main-gallery-container {
        width: 100% !important;
        max-width: 1400px !important;   /* 🔥 más ancha */
        margin: 0 auto !important;
    }

    .gallery-grid-pc {
        width: 100% !important;
        max-width: 1400px !important;   /* 🔥 ancho total */
        height: 600px !important;       /* 🔥 más alta */
        grid-template-columns: 2.5fr 1fr !important; /* Foto principal más grande */
        grid-template-rows: 1fr 1fr 1fr !important;
        gap: 12px !important;
    }

    .grid-main-photo img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

.gallery-grid-pc {
    height: 500px;
    grid-template-columns: 2fr 1fr;
    max-width: 1140px;   /* ESTA LÍNEA ES LA QUE TE ESTÁ LIMITANDO */
    margin: 0 auto;
}


/* ============================================
   🔥 Galería full-width (solo la galería)
   ============================================ */
@media (min-width: 992px) {

    /* Contenedor de la galería ANCHO */
    .main-gallery-container {
        width: 100% !important;
        max-width: 1500px !important;   /* Full ancho elegante */
        margin: 0 auto !important;
    }

    /* GALLERY GRID en PC */
    .gallery-grid-pc {
        width: 100% !important;
        max-width: 1500px !important;   /* Limite real */
        height: 600px !important;
        grid-template-columns: 2.5fr 1fr !important; /* Foto grande + miniaturas */
        grid-template-rows: 1fr 1fr 1fr !important;
        gap: 12px !important;
    }

    .grid-main-photo img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* ============================================
   📌 Contenido debajo organizado en 7 / 5
   ============================================ */

/* Contenedor de descripción y calendario (después de galería) */
.contenedor-informacion {
    width: 100%;
    max-width: 1200px;        /* descripción centrada y elegante */
    margin: 0 auto;
    padding: 0 15px;
}

/* Descripción a la izquierda (7 columnas) */
@media (min-width: 992px) {
    .descripcion-col {
        width: 58%;
        float: left;
        padding-right: 20px;
    }

    /* Calendario + Reservar a la derecha (5 columnas) */
    .calendario-col {
        width: 42%;
        float: left;
        padding-left: 20px;
    }
}

/* Móviles: stack normal */
@media (max-width: 991px) {
    .descripcion-col, 
    .calendario-col {
        width: 100%;
        float: none;
        padding: 0;
    }
}


.slider-contenedor {
  width: 100%;
  height: 430px;
  overflow: hidden;
  border-radius: 18px;
  position: relative;
}

.slider-imagenes {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Flechas */
.flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  padding: 10px 16px;
  font-size: 28px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.flecha:hover {
  background: rgba(0,0,0,0.65);
}

.flecha-izq { left: 10px; }
.flecha-der { right: 10px; }

/* Móvil */
@media (max-width: 768px) {
  .slider-contenedor {
    height: 300px;
  }
  .flecha {
    font-size: 22px;
    padding: 8px 12px;
  }
}
.btn-ver-mas-foto {
  position: absolute;
  bottom: 18px;
  right: 18px;
  background-color: rgba(0,0,0,0.55);
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
}
.btn-ver-mas-foto:hover {
  background-color: rgba(0,0,0,0.75);
}


/* 🔹 Asegurar que el modal de video de galería esté POR ENCIMA de todo */
.gallery-video-modal.modal {
  z-index: 99999 !important;
}

.gallery-video-modal .modal-dialog {
  z-index: 100000 !important;
}

.gallery-video-modal .modal-backdrop {
  z-index: 99998 !important;
}

/* 🔹 Asegurar que el modal de galería no interfiera */
#galleryModal.modal {
  z-index: 99990 !important;
}

#galleryModal .modal-backdrop {
  z-index: 99989 !important;
}

/* 🔹 Ajustar backdrop del modal de video */
.gallery-video-modal.modal.show .modal-backdrop {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

/* 🔹 Asegurar que el video ocupe bien el espacio */
#galleryVideoPlayer {
  min-height: 400px;
  max-height: 80vh;
  object-fit: contain;
  background-color: #000;
}

/* 🔹 Estilo para thumbnails de video en galería */
.thumb-video-full {
  transition: transform 0.2s ease;
  overflow: hidden;
  border-radius: 8px;
}

.thumb-video-full:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.thumb-video-full video {
  transition: transform 0.3s ease;
}

.thumb-video-full:hover video {
  transform: scale(1.05);
}