:root {
  --primary-green: #2a6e3f;
  --light-green: #4a9e64;
  --dark-green: #1a4e2f;
  --accent-gold: #d4af37;
  --bright-gold: #ffd700;
  --bg-cream: #f5f3e6;
  --text-dark: #333;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --clickable-pulse: rgba(212, 175, 55, 0.7);
  --control-bg: rgba(255, 255, 255, 0.9);
  --control-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg_cream);
  color: var(--text-dark);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  background-image: linear-gradient(rgba(42, 110, 63, 0.05), rgba(42, 110, 63, 0.05)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232a6e3f' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Language Selector - Updated positioning */
.language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 5px;
  z-index: 10; /* Lower z-index */
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--primary-green);
}
.language-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: var(--primary-green);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.language-btn:hover {
  background-color: rgba(42, 110, 63, 0.1);
}

.language-btn.active {
  background-color: var(--primary-green);
  color: white;
}

/* Pantalla de carga mejorada */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-green);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  overflow: hidden;
}

.loader-container {
  text-align: center;
  position: relative;
  z-index: 2;
}

.loader {
  width: 80px;
  height: 80px;
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-gold);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-container p {
  color: white;
  font-size: 1.2rem;
  letter-spacing: 1px;
  max-width: 80%;
  margin: 0 auto;
}

/* Contenedor de hojas de selva mejorado */
#jungle-leaves-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Estilos mejorados para las hojas de selva */
.jungle-leaf {
  position: absolute;
  opacity: 0.7;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
  transform-origin: center;
  z-index: 1;
  will-change: transform;
}

/* Animación de caída de hojas mejorada */
@keyframes leafFall {
  0% {
    transform: translateY(-50px) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(calc(100vh + 50px)) rotate(360deg) scale(1.2);
    opacity: 0.2;
  }
}

/* Animación de balanceo mejorada */
@keyframes leafSway {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(15px) rotate(5deg);
  }
  50% {
    transform: translateX(0) rotate(0deg);
  }
  75% {
    transform: translateX(-15px) rotate(-5deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

/* Animación de balanceo alternativa */
@keyframes leafSwayAlt {
  0% {
    transform: translateX(0) rotate(0deg) scale(1);
  }
  33% {
    transform: translateX(20px) rotate(8deg) scale(1.05);
  }
  66% {
    transform: translateX(-20px) rotate(-8deg) scale(0.95);
  }
  100% {
    transform: translateX(0) rotate(0deg) scale(1);
  }
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Encabezado */
header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background-color: var(--primary-green);
  color: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo-container {
  margin-right: 20px;
  flex-shrink: 0;
}

#site-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  background-color: white;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-text {
  flex: 1;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Contenedor del mapa */
.map-container {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  min-height: 500px;
  will-change: transform; /* Optimización para animaciones */
}

#svgMap {
  width: 100%;
  height: 100%;
  min-height: 500px;
  will-change: transform; /* Optimización para animaciones */
  touch-action: none; /* Importante para gestos táctiles */
}

/* Indicador de elementos clickeables */
.click-indicator {
  position: relative;
  background-color: var(--primary-green);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.click-indicator::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--accent-gold);
  border-radius: 50%;
  margin-right: 10px;
  opacity: 0.8;
}

/* Modal para información - Rediseñado */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}


.modal .close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 200; /* Very high z-index */
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 80%;
  max-width: 800px;
  transform: translateY(-50px);
  transition: transform 0.3s ease;
  position: relative;
    z-index: 150; /* Higher than language selector */
  border-left: 5px solid var(--primary-green);
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal.show .modal-content {
  transform: translateY(0);
}


/* Modal - Ensure close button is above language selector */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 110; /* Higher z-index to ensure it's above language selector */
}

.close-btn:hover {
  color: var(--primary-green);
}

#modal-title {
  color: var(--primary-green);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-green);
}

/* Nuevo diseño del cuerpo del modal */
.modal-body {
  display: flex;
  flex-direction: column;
}

.modal-image {
  flex: 1;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.modal-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
  display: block;
}

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

.modal-description {
  flex: 2;
}

#modal-description {
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Nuevo diseño para los detalles del modal */
#modal-details {
  background-color: rgba(74, 158, 100, 0.1);
  padding: 15px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--primary-green);
  border-radius: 50%;
  color: white;
  flex-shrink: 0;
}

.detail-content {
  flex: 1;
}

/* Estilos para el botón de reserva */
.reservation-container {
  margin-top: 15px;
}

.reservation-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-gold);
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.reservation-button:hover {
  background-color: var(--bright-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.reservation-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

/* Decoraciones de fondo (grecas) */
.background-decoration {
  position: fixed;
  width: 200px;
  height: 200px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.top-left {
  top: 0;
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath fill='%232a6e3f' d='M20,20 L40,20 L40,40 L20,40 Z M60,20 L80,20 L80,40 L60,40 Z M100,20 L120,20 L120,40 L100,40 Z M140,20 L160,20 L160,40 L140,40 Z M180,20 L180,40 L160,40 L160,60 L140,60 L140,80 L120,80 L120,100 L100,100 L100,120 L80,120 L80,140 L60,140 L60,160 L40,160 L40,180 L20,180 L20,160 L20,140 L20,120 L20,100 L20,80 L20,60 L20,40 Z'/%3E%3C/svg%3E");
}

.top-right {
  top: 0;
  right: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath fill='%232a6e3f' d='M180,20 L160,20 L160,40 L180,40 Z M140,20 L120,20 L120,40 L140,40 Z M100,20 L80,20 L80,40 L100,40 Z M60,20 L40,20 L40,40 L60,40 Z M20,20 L20,40 L40,40 L40,60 L60,60 L60,80 L80,80 L80,100 L100,100 L100,120 L120,120 L120,140 L140,140 L140,160 L160,160 L160,180 L180,180 L180,160 L180,140 L180,120 L180,100 L180,80 L180,60 L180,40 Z'/%3E%3C/svg%3E");
}

.bottom-left {
  bottom: 0;
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath fill='%232a6e3f' d='M20,180 L40,180 L40,160 L20,160 Z M60,180 L80,180 L80,160 L60,160 Z M100,180 L120,180 L120,160 L100,160 Z M140,180 L160,180 L160,160 L140,160 Z M180,180 L180,160 L160,160 L160,140 L140,140 L140,120 L120,120 L120,100 L100,100 L100,80 L80,80 L80,60 L60,60 L60,40 L40,40 L40,20 L20,20 L20,40 L20,60 L20,80 L20,100 L20,120 L20,140 L20,160 Z'/%3E%3C/svg%3E");
}

.bottom-right {
  bottom: 0;
  right: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath fill='%232a6e3f' d='M180,180 L160,180 L160,160 L180,160 Z M140,180 L120,180 L120,160 L140,160 Z M100,180 L80,180 L80,160 L100,160 Z M60,180 L40,180 L40,160 L60,160 Z M20,180 L20,160 L40,160 L40,140 L60,140 L60,120 L80,120 L80,100 L100,100 L100,80 L120,80 L120,60 L140,60 L140,40 L160,40 L160,20 L180,20 L180,40 L180,60 L180,80 L180,100 L180,120 L180,140 L180,160 Z'/%3E%3C/svg%3E");
}

/* Responsive */
@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
    gap: 20px;
  }

  .modal-image {
    margin-bottom: 0;
    max-width: 40%;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 10px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .header-content {
    flex-direction: column;
  }

  #logo-container {
    margin-right: 0;
    margin-bottom: 15px;
  }

  #site-logo {
    width: 60px;
    height: 60px;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 15px;
  }

  .background-decoration {
    width: 120px;
    height: 120px;
  }

  /* Ajustes para hacer el mapa más grande en móviles */
  .map-container {
    padding: 10px;
    height: 70vh; /* Usar altura relativa a la ventana */
    min-height: 70vh;
  }

  #svgMap {
    height: 100%;
    min-height: 100%;
  }

  /* Reducir otros elementos para dar más espacio al mapa */
  header {
    margin-bottom: 15px;
    padding: 15px 10px;
  }

  .click-indicator {
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
  }
  
  /* Adjust language selector for mobile */
  .language-selector {
    top: 10px;
    right: 10px;
  }
  
  .language-btn {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
}

/* Estilos para elementos clickeables en el SVG */
.clickable-highlight {
  animation: highlight-pulse 3s infinite;
}

@keyframes highlight-pulse {
  0% {
    stroke: var(--accent-gold);
    stroke-width: 1;
    stroke-opacity: 0.2;
  }
  50% {
    stroke: var(--accent-gold);
    stroke-width: 2;
    stroke-opacity: 0.8;
  }
  100% {
    stroke: var(--accent-gold);
    stroke-width: 1;
    stroke-opacity: 0.2;
  }
}

.mobile-highlight {
  animation: mobile-pulse 2s infinite;
  stroke: var(--accent-gold) !important;
  stroke-width: 2.5 !important;
  stroke-opacity: 0.9 !important;
  cursor: pointer;
}

@keyframes mobile-pulse {
  0% {
    stroke: var(--accent-gold);
    stroke-width: 2.5;
    stroke-opacity: 0.8;
  }
  50% {
    stroke: var(--bright-gold);
    stroke-width: 4;
    stroke-opacity: 1;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.9));
  }
  100% {
    stroke: var(--accent-gold);
    stroke-width: 2.5;
    stroke-opacity: 0.8;
  }
}

.control-button-wrapper {
  display: contents;
}

.nav-center {
  grid-area: 2 / 2;
  pointer-events: none;
}

.map-controls-container {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: none; /* Hide by default */
  flex-direction: column;
  align-items: center;
  z-index: 50;
  pointer-events: none;
}

/* Show controls only on mobile devices */
@media (max-width: 767px) {
  .map-controls-container {
    display: flex; /* Show on mobile */
  }
}

.map-controls {
  display: flex;
  flex-direction: row;
  gap: 20px;
  pointer-events: auto;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.zoom-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.zoom-controls button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, background-color 0.2s;
  -webkit-tap-highlight-color: transparent; /* Eliminar resaltado en toque */
}

.zoom-controls button:hover {
  background-color: var(--light-green);
  transform: scale(1.05);
}

.zoom-controls button:active {
  transform: scale(0.95);
  background-color: var(--dark-green);
}

#zoom-reset {
  width: 36px;
  height: 36px;
  font-size: 14px;
  background-color: var(--accent-gold);
}

#zoom-reset:hover {
  background-color: var(--bright-gold);
}

/* Indicador de zoom */
.zoom-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: bold;
  color: var(--primary-green);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.zoom-indicator.active {
  opacity: 1;
}

.navigation-controls {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  grid-template-rows: repeat(3, 36px);
  gap: 3px;
  place-items: center;
  width: 114px; /* 36*3 + 3*2 */
  height: 114px;
}

/* Todos los botones heredan estos estilos */
.navigation-controls button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: white;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.navigation-controls button:hover {
  background-color: var(--light-green);
  transform: scale(1.05);
}

.navigation-controls button:active {
  transform: scale(0.95);
  background-color: var(--dark-green);
}

.navigation-controls button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

/* Posicionamiento */
#nav-up {
  grid-area: 1 / 2;
}
#nav-left {
  grid-area: 2 / 1;
}
#nav-right {
  grid-area: 2 / 3;
}
#nav-down {
  grid-area: 3 / 2;
}

.nav-center {
  grid-area: 2 / 2;
  pointer-events: none; /* Opcional */
}
/* Separador vertical para los controles */
.controls-separator {
  width: 1px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  margin: 0 10px; /* Aumentado para más separación */
}

/* Indicador de movimiento */
.move-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 15;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.move-indicator.active {
  opacity: 0.8;
}

.move-indicator svg {
  color: var(--primary-green);
  width: 40px;
  height: 40px;
}

/* Puntos de interés */
.poi-container,
.poi-toggle {
  display: none;
}

/* Tutorial modal */
#tutorial-modal .modal-content {
  max-width: 500px;
  text-align: center;
}

#tutorial-modal h2 {
  color: var(--primary-green);
  margin-bottom: 15px;
}

#tutorial-modal p {
  margin-bottom: 15px;
  line-height: 1.6;
}

#tutorial-modal .tutorial-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
  text-align: left;
}

#tutorial-modal .tutorial-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(74, 158, 100, 0.1);
  padding: 10px;
  border-radius: 8px;
}

#tutorial-modal .tutorial-tip svg {
  color: var(--primary-green);
  flex-shrink: 0;
}

/* Ajustes para móviles */
@media (max-width: 767px) {
  /* Asegurar que las capas de interacción no bloqueen los clics */
  .touch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background-color: transparent;
    touch-action: none;
    pointer-events: none !important; /* Importante: asegurar que pasan los eventos */
  }

  /* Ajustar el SVG para asegurarse de que reciba los eventos */
  #svgMap {
    pointer-events: auto !important;
    z-index: 2;
  }

  /* Asegurarse de que el mapa sea interactivo */
  .map-container {
    touch-action: none !important;
    overflow: hidden !important;
    position: relative;
  }

  /* Optimizar el SVG para transformaciones */
  #svgMap {
    transform-origin: center center;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 1; /* Asegurarse de que esté debajo de la capa táctil */
    width: 100%;
    height: 100%;
  }

  /* Mejorar el feedback visual al tocar */
  .touch-feedback {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.7);
    pointer-events: none;
    z-index: 25;
    animation: touch-ripple 0.7s ease-out;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  }

  @keyframes touch-ripple {
    0% {
      transform: scale(0.5);
      opacity: 1;
    }
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }

  /* Remove pinch hint styles */
  .pinch-hint,
  .pinch-hint.show,
  .pinch-hint-inner,
  .pinch-finger,
  .pinch-finger.left,
  .pinch-finger.right {
    display: none;
  }

  @keyframes pinch-left {
    0%,
    100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(30px);
    }
  }

  @keyframes pinch-right {
    0%,
    100% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(-30px);
    }
  }

  .pinch-text {
    display: none;
  }

  /* Ajustes específicos para controles en móvil */
  .map-controls-container {
    bottom: 15px;
  }

  /* Make sure controls are always visible on mobile */
  @media (max-width: 767px) {
    .map-controls-container {
      display: flex !important; /* Force display */
      bottom: 15px;
      opacity: 1 !important;
    }

    .map-controls {
      opacity: 1 !important;
      background-color: rgba(255, 255, 255, 0.9); /* More opaque for better visibility */
    }

    /* Make buttons larger and more tappable on mobile */
    .zoom-controls button,
    .navigation-controls button {
      width: 44px !important;
      height: 44px !important;
      font-size: 18px !important;
    }

    /* Ensure SVG receives click events */
    #svgMap {
      pointer-events: auto !important;
    }
  }

  /* Tooltips para botones */
  .control-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
  }

  .control-button-wrapper {
    position: relative;
  }

  .control-button-wrapper:hover .control-tooltip {
    opacity: 1;
  }

  /* Ocultar controles de escritorio en móvil */
  .desktop-gallery-controls {
    display: none;
  }
}

/* Estilos para pantallas muy pequeñas */
@media (max-width: 380px) {
  .map-controls {
    transform: scale(0.9);
    transform-origin: center bottom;
  }

  .poi-toggle {
    transform: scale(0.9);
    transform-origin: top left;
  }
}

/* Animación de fondo de la selva */
.jungle-background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.jungle-particle {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(100px, 50px) rotate(90deg);
  }
  50% {
    transform: translate(50px, 100px) rotate(180deg);
  }
  75% {
    transform: translate(-50px, 50px) rotate(270deg);
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
  }
}

/* Estilos para la galería de imágenes - Completamente rediseñados */
.gallery-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-main {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.05);
  aspect-ratio: 16 / 9;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.5s ease;
  object-fit: cover;
  cursor: pointer;
}

/* Indicador de carga de imagen */
.image-loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.image-loading-indicator.active {
  opacity: 1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(42, 110, 63, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-green);
  animation: spin 1s linear infinite;
}

/* Controles de galería para móvil */
.gallery-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 0 0 8px 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-container:hover .gallery-controls {
  opacity: 1;
}

.gallery-nav-btn {
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-nav-btn:hover {
  background-color: white;
  transform: scale(1.1);
}

.gallery-nav-btn:active {
  transform: scale(0.95);
}

.gallery-nav-btn svg {
  width: 20px;
  height: 20px;
  color: var(--primary-green);
}

.gallery-indicators {
  display: flex;
  gap: 8px;
}

.gallery-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.3s, transform 0.3s;
  cursor: pointer;
}

.gallery-indicator.active {
  background-color: var(--accent-gold);
  transform: scale(1.2);
}

/* Controles laterales para escritorio */
.desktop-gallery-controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  z-index: 10;
  pointer-events: none;
}

@media (min-width: 768px) {
  .desktop-gallery-controls {
    display: flex;
  }

  /* Ocultar controles de móvil en escritorio */
  .gallery-controls {
    display: none;
  }
}

.desktop-gallery-nav-btn {
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  opacity: 0.7;
}

.desktop-gallery-nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
  opacity: 1;
}

.desktop-gallery-nav-btn svg {
  width: 24px;
  height: 24px;
  color: white;
}

/* Miniaturas para escritorio */
.gallery-thumbnails {
  display: none;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0 0 8px 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-green) rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .gallery-thumbnails {
    display: flex;
    gap: 8px;
  }
}

.gallery-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.gallery-thumbnail.active {
  border-color: var(--accent-gold);
  transform: scale(1.05);
}

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

/* Visor de pantalla completa */
.fullscreen-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-viewer.active {
  display: flex;
  opacity: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.fullscreen-controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 210;
}

.fullscreen-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  color: white;
}

.fullscreen-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.fullscreen-btn svg {
  width: 24px;
  height: 24px;
}

.fullscreen-counter {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 14px;
}

.fullscreen-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.fullscreen-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 205;
  display: none;
}

.fullscreen-loading.active {
  display: block;
}

.fullscreen-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-gold);
  animation: spin 1s linear infinite;
}

#fullscreen-image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  transition: opacity 0.3s ease;
  opacity: 1;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

#fullscreen-image.loading {
  opacity: 0.3;
}