/* Reset y estilos base */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
}

/* === Sección Chile en el mundo === */
#chile-en-el-mundo {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
}

.section-title {
  color: #07617D;
  font-weight: 700;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
}

.section-title i, .section-title .icon {
  font-size: 1.4em;
  color: #07617D;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #07617D;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 12px;
  font-family: 'Montserrat', sans-serif;
}

.section-text {
  color: #4B6854;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 24px;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* === Mapa === */
/* Contenedor principal del mapa */
.theme-map-container {
  width: 100%;
  height: 600px; /* Altura fija para evitar scroll */
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
}

/* Mapa de Leaflet */
#world-map {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
}

/* Asegura que Leaflet no cause scroll */
.leaflet-container {
  background: #f8f8f8;
  height: 100% !important;
  width: 100% !important;
  overflow: hidden;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
  .theme-map-container {
    height: 500px;
  }
}

/* === Contador de souvenirs === */
#souvenir-count {
  display: inline-block;
  background: rgba(7, 97, 125, 0.1);
  color: #07617D;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(7, 97, 125, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.6s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#souvenir-count:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(7, 97, 125, 0.15);
}

/* === Mensaje de ayuda === */
.map-help {
  text-align: center;
  margin-top: 12px;
  color: #4B6854;
  font-size: 0.95rem;
  font-style: italic;
}

.map-help .icon-help {
  color: #07617D;
  margin-right: 6px;
}

/* === Animaciones === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Leaflet personalizado - Popup limpio sin wrapper visible === */
.leaflet-popup-content-wrapper {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 12px !important;
}

.leaflet-popup-tip {
  border: none !important;
  background: #07617D !important;
  width: 20px !important;
  height: 12px !important;
  box-shadow: none !important;
}

.leaflet-popup-content {
  background: #07617D !important;
  color: #FFFCF2 !important;
  border-radius: 12px !important;
  font-weight: 500;
  padding: 12px 16px;
  max-width: 240px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(7, 97, 125, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content strong {
  color: #FFFCF2;
}

.leaflet-popup-close-button {
  color: #FFFCF2 !important;
  font-weight: bold;
  font-size: 1.2em;
}

.leaflet-container {
  font-family: 'Segoe UI', sans-serif;
}

/* Clase utilitaria */
.text-center {
  text-align: center;
}

/* === Botón de eliminar souvenir en el popup === */
/* === Popup y botón de eliminación === */
.popup-content {
  text-align: center;
  line-height: 1.5;
}

.popup-content strong {
  display: block;
  margin-bottom: 4px;
}

.popup-content small {
  display: block;
  margin: 4px 0;
}

.delete-button-container {
  margin-top: 8px;
  display: block;
  width: 100%;
  text-align: center;
}

.btn-delete {
  background: #d9534f;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  font-weight: 500;
  display: inline-block;
  width: auto;
  min-width: 180px;
}

.btn-delete:hover {
  background: #c9302c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(217, 83, 79, 0.2);
}

.btn-delete:active {
  transform: translateY(0);
}

/* Estilo personalizado para SweetAlert2 */
.swal-popup-rounded {
  border-radius: 16px !important;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 10px 30px rgba(7, 97, 125, 0.3) !important;
}

.swal2-title {
  color: #07617D !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.8rem !important;
}

.swal2-content {
  color: #4B6854 !important;
  font-size: 1.1em;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* botones */
.swal2-confirm {
  border-radius: 50px !important;
  padding: 8px 24px !important;
  font-weight: 600 !important;
  background-color: #07617D !important;
  border: none !important;
  color: white !important;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.swal2-cancel {
  border-radius: 50px !important;
  padding: 8px 24px !important;
  font-weight: 600 !important;
  background-color: #6c757d !important;
  border: none !important;
  color: white !important;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* === Marcador de souvenir con efectos visuales === */
.souvenir-div-icon {
  display: block;
  pointer-events: none;
}

.souvenir-marker {
  position: relative;
  width: 28px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.souvenir-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  animation: pulse 2s infinite ease-in-out;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); /* Sombra suave */
}

/* Efecto de calor (ondas de fuego) */
/* Efecto de calor (ondas de fuego) */
.heat-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 100, 0, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  animation: heatWave 1.5s infinite ease-out;
  z-index: 1;
}

/* Reflejo en el suelo */
.reflection {
  position: absolute;
  width: 70%;
  height: 10px;
  background: radial-gradient(ellipse at center, rgba(255, 100, 0, 0.5) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -10px;
  transform: scaleX(1.2);
  opacity: 0.6;
  filter: blur(2px);
  z-index: 0;
  animation: reflectionFade 1.5s infinite alternate ease-in-out;
}

/* Animaciones */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes heatWave {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.6); /* Mayor escala */
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

@keyframes reflectionFade {
  0% {
    opacity: 0.4;
    transform: scaleX(1.2) scaleY(1);
  }
  50% {
    opacity: 0.8;
    transform: scaleX(1.4) scaleY(1.1);
  }
  100% {
    opacity: 0.4;
    transform: scaleX(1.2) scaleY(1);
  }
}

/* === Botón de modo oscuro === */
.theme-toggle-container {
  text-align: center;
  margin: 16px 0;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
  transform: rotate(30deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* === Modo oscuro === */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

#chile-en-el-mundo.dark-mode {
  background: #1e1e1e;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dark-mode .section-title,
.dark-mode .section-subtitle {
  color: #bbdefb;
}

.dark-mode .section-text,
.dark-mode .map-help {
  color: #a5d6a7;
}

.dark-mode .map-help .icon-help {
  color: #bbdefb;
}

.dark-mode .theme-map-container {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.dark-mode #souvenir-count {
  background: rgba(7, 97, 125, 0.2);
  color: #81d4fa;
  border-color: rgba(7, 97, 125, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.dark-mode .leaflet-popup-content {
  background: #2c3e50 !important;
  color: #ecf0f1 !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.dark-mode .leaflet-popup-tip {
  background: #2c3e50 !important;
}

.dark-mode .btn-delete {
  background: #c62828;
}

.dark-mode .btn-delete:hover {
  background: #b71c1c;
}

/* Transición suave */
body,
#chile-en-el-mundo,
.section-title,
.theme-map-container,
#souvenir-count,
.leaflet-popup-content {
  transition: all 0.4s ease;
}








/* const firebaseConfig = {
  apiKey: "AIzaSyCoGrG6EkmDtP1SuIzaGIpuLcBbh6zJifk",
  authDomain: "mapamundi-422a7.firebaseapp.com",
  projectId: "mapamundi-422a7",
  storageBucket: "mapamundi-422a7.firebasestorage.app",
  messagingSenderId: "501062798814",
  appId: "1:501062798814:web:6234cb8368d50f618f214f"
}; */

