/* === RESET Y ESTILOS BASE === */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 20px;
  color: #333;
  box-sizing: border-box; /* Asegura que padding y border se incluyan en el ancho total */
}

h1, h2 {
  margin: 0;
  font-weight: 700;
  text-align: center;
}

h1 {
  margin-bottom: 1rem;
  color: #b71c1c; /* Color rojo oscuro para títulos principales */
}

h2 {
  font-size: 1.4rem;
}

/* === CONTENEDOR GENERAL === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Espacio vertical entre hijos */
}

/* === MAPA === */
#map {
  height: 500px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* === HEADER: LOGO + SLOGAN === */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.logo-slogan {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.titulo-slogan h1 {
  font-family: 'Pacifico', cursive;
  font-size: 1.6rem;
  color: #b71c1c;
  margin: 0;
}

.titulo-slogan .slogan {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}

/* === TÍTULO + BUSCADOR EN FILA === */
.titulo-mapa-buscador {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.titulo-mapa-buscador h2 {
  font-size: 1.4rem;
}

/* === BUSCADOR === */
.buscador {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.buscador input {
  width: 300px;
  max-width: 90%;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 2px solid #e53935;
  border-radius: 25px;
  outline: none;
  transition: 0.3s;
}

.buscador input:focus {
  border-color: #b71c1c;
  box-shadow: 0 0 8px #b71c1c;
}

/* === PANEL DE ESTADÍSTICAS MODERNO Y DINÁMICO === */
.panel-estadisticas {
  margin-top: 1rem;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

/* Título principal del panel */
.panel-estadisticas h2 {
  margin-bottom: 1rem;
  color: #e53935;
  font-size: 1.5rem;
}

/* Layout en dos columnas para estadísticas generales */
.estadisticas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Cada caja de estadística */
.stat-box {
  flex: 1;
  min-width: 200px;
  background: #fbe9e7;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-3px); /* Efecto hover sutil */
}

/* Número destacado en las estadísticas */
.stat-num {
  font-size: 2rem;
  font-weight: bold;
  color: #b71c1c;
  margin: 0.2rem 0;
}

/* Nombre de ciudad destacado */
.stat-city {
  font-size: 1.2rem;
  font-weight: 600;
  color: #b71c1c;
  margin: 0.2rem 0;
}

/* Título de la lista top ciudades */
.top-ciudades h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #333;
}

/* Lista limpia para top ciudades */
.top-ciudades-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Items de la lista con separación y hover */
.top-ciudades-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
  cursor: default;
}

.top-ciudades-list li:hover {
  background: #fff3f3;
}

/* === FOOTER === */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  padding: 1rem 0;
  margin-top: 3rem;
  border-top: 1px solid #ddd;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  #map {
    height: 350px;
  }

  .titulo-mapa-buscador {
    flex-direction: column;
    align-items: center;
  }

  .buscador input {
    width: 100%;
    max-width: 100%;
  }

  /* Ajuste de estadisticas-grid a columna para móviles */
  .estadisticas-grid {
    flex-direction: column;
  }
}

/* top ciudades en las estadísticas del mapa emocional */
/* === CONTENEDOR PARA DOS COLUMNAS DE CIUDADES === */
.top-ciudades-container {
  display: flex;
  gap: 2rem; /* espacio entre columnas */
  margin-top: 1rem;
  flex-wrap: wrap; /* para que en pantallas pequeñas bajen */
}

/* Cada columna de ciudades al 50% */
.top-ciudades {
  flex: 1 1 50%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.25rem;
  box-sizing: border-box;
  min-width: 280px; /* para que no se reduzca demasiado en móviles */
}

/* Títulos de cada lista */
.top-ciudades h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #b71c1c; /* color rojo oscuro para destacar */
  font-family: 'Pacifico', cursive;
  font-size: 1.4rem;
}

/* Lista limpia para top ciudades */
.top-ciudades-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Items de la lista con separación y hover */
.top-ciudades-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
  cursor: default;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 600;
  color: #333;
}

.top-ciudades-list li:hover {
  background: #fff3f3;
}

/* Ciudad nombre */
.top-ciudades-list span {
  text-transform: capitalize;
}

/* Cantidad en rojo */
.top-ciudades-list strong {
  color: #e53935;
}
