@font-face {
  font-family: 'Touche';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/touche.otf') format('opentype');
}

@font-face {
  font-family: 'Touche';
  font-style: normal;
  font-weight: 600;
  src: url('fonts/touche-semibold.otf') format('opentype');
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Touche', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #fff;
  min-height: 100vh;
}

header {
  padding: 1.5rem 2rem;
  background: #0a0a0a;
  position: relative;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.logo {
  display: block;
  flex-shrink: 0;
  color: #fff;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo svg {
  width: 80px;
  height: auto;
  display: block;
}

.header-text {
  flex: 1;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  font-family: 'Touche', sans-serif;
  color: #fff;
  line-height: 1.2;
}

header p {
  margin: 0.25rem 0 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

.header-right {
  flex-shrink: 0;
}

#search {
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 320px;
  font-family: 'Touche', sans-serif;
  font-size: 1rem;
  transition: all 0.2s ease;
}

#search:focus {
  outline: none;
  border-color: #0073CF;
  background: rgba(255, 255, 255, 0.15);
}

#search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#map {
  height: calc(100vh - 140px);
  width: 100%;
  position: relative;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .header-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .header-right {
    width: 100%;
  }
  
  #search {
    width: 100%;
  }
  
  header h1 {
    font-size: 1.2rem;
  }
  
  .logo svg {
    width: 60px;
  }
  
  #map {
    height: calc(100vh - 220px);
  }
}

footer {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  opacity: 0.85;
  text-align: center;
  max-width: 90%;
  z-index: 1000; /* Ensure it stays on top of map controls */
}

footer a {
  color: #0073CF;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #0090ff;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-tip {
  background: #1a1a1a;
}

.leaflet-popup-content {
  margin: 14px 18px;
  min-width: 280px;
}

.candidate {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.candidate-photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover; /* 1:1 crop from center */
  flex-shrink: 0;
  background-color: #1e3c72; /* Placeholder color while loading */
}

.candidate small {
  opacity: 0.8;
}
