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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.logo i {
  font-size: 1.8rem;
  color: #e74c3c;
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 600;
}

.logo h1 span {
  color: #e74c3c;
  font-weight: 300;
}

.header-badge {
  display: flex;
  gap: 1rem;
}

.badge-certified,
.badge-verified {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge-certified {
  background: #f1c40f;
  color: #1a1a2e;
}

.badge-verified {
  background: #2ecc71;
  color: white;
}

/* ===== BARRA DE BÚSQUEDA ===== */
.search-bar {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  background: #f5f5f5;
  border-radius: 50px;
  padding: 0.3rem 0.3rem 0.3rem 1rem;
  border: 1px solid #ddd;
}

.search-container i {
  align-self: center;
  color: #999;
}

.search-container input {
  flex: 1;
  padding: 0.8rem 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
}

.btn-search {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-search:hover {
  background: #c0392b;
}

/* ===== FILTROS ===== */
.filters {
  background: white;
  padding: 1rem 2rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
  border-bottom: 1px solid #eee;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-group label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
}

.filter-group select {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  min-width: 150px;
}

.btn-reset {
  background: #ecf0f1;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-reset:hover {
  background: #bdc3c7;
}

/* ===== MAIN (MAP + LISTA) ===== */
main {
  display: flex;
  height: calc(100vh - 220px);
  gap: 1rem;
  padding: 1rem;
}

#mapContainer {
  flex: 2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#map {
  width: 100%;
  height: 100%;
}

#resultsPanel {
  flex: 1;
  background: white;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.panel-header {
  background: #1a1a2e;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h3 {
  font-size: 1rem;
}

#resultsCount {
  background: #e74c3c;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.places-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.place-card {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.place-card:hover {
  background: #fff;
  border-color: #e74c3c;
  transform: translateX(4px);
}

.place-card h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: #1a1a2e;
}

.place-card .category {
  font-size: 0.7rem;
  color: #e74c3c;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.place-card .address {
  font-size: 0.75rem;
  color: #666;
}

.place-card .status-badge {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.status-certified {
  background: #f1c40f;
  color: #1a1a2e;
}

.status-verified {
  background: #2ecc71;
  color: white;
}

.status-semi_verified {
  background: #f39c12;
  color: white;
}

.status-pending {
  background: #95a5a6;
  color: white;
}

.loading-spinner {
  text-align: center;
  padding: 2rem;
  color: #999;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  position: relative;
  animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  color: #999;
}

.close:hover {
  color: #e74c3c;
}

#modalBody {
  padding: 1.5rem;
}

.modal-place-name {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.modal-category {
  display: inline-block;
  background: #ecf0f1;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.modal-address {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.btn-directions {
  background: #3498db;
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.review-form {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.review-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 0.5rem 0;
}

.review-form select {
  padding: 0.5rem;
  border-radius: 8px;
}

/* ===== FOOTER ===== */
footer {
  background: #1a1a2e;
  color: #888;
  text-align: center;
  padding: 0.8rem;
  font-size: 0.7rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  main {
    flex-direction: column;
    height: auto;
  }

  #mapContainer {
    height: 300px;
  }

  #resultsPanel {
    height: 400px;
  }

  .filters {
    flex-direction: column;
  }

  .filter-group select {
    width: 100%;
  }

  .modal-content {
    margin: 20% auto;
    width: 95%;
  }
}

/* POI Markers */
.poi-marker {
  cursor: pointer;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.security-pulse div {
  animation: pulse 1.5s infinite ease-in-out;
}

.leaflet-control-layers {
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
  border: none !important;
}

.leaflet-control-layers-expanded {
  padding: 10px !important;
  background: white !important;
  color: #1a1a2e !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

/* Resultados contador - color blanco */
#resultsCount {
    color: white !important;
}

/* Contadores principales - fondo claro y texto oscuro */
.stats-mini-item {
    background: #f4f4f4;
    padding: 0.3rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a2e;
}

.stats-mini-item span {
    font-weight: bold;
    margin-right: 0.3rem;
}

.stats-mini-item.total span { color: #e74c3c; }
.stats-mini-item.pending span { color: #95a5a6; }
.stats-mini-item.verified span { color: #2ecc71; }
.stats-mini-item.certified span { color: #f1c40f; }