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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 50%;
  padding: 10px;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

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

.election-info {
  background: #e8f4fd;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  color: #1e3c72;
}

.candidates-section {
  padding: 40px 20px;
}

.candidates-section h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #1e3c72;
  font-size: 2rem;
}

.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
}

.candidate-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.candidate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.candidate-photo-container {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.candidate-photo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.photo-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 300px;
  background: #f0f0f0;
  color: #999;
  text-align: center;
}

.photo-fallback span {
  font-size: 3rem;
  margin-bottom: 10px;
}

.photo-fallback p {
  font-size: 0.9rem;
  margin: 0;
}

.candidate-info {
  padding: 20px;
}

.candidate-name {
  font-size: 1.8rem;
  color: white;
  background-color: #ff9800;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 20px;
  margin-bottom: 0;
  display: block;
  text-align: center;
  line-height: 1.3;
}

.candidate-surname {
  font-size: 1.8rem;
  font-weight: bold;
}

.candidate-role {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.candidate-bio {
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.candidate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: #f0f4f8;
  color: #1e3c72;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.link-btn:hover {
  background: #1e3c72;
  color: white;
}

.footer {
  background: #f8f9fa;
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.error {
  text-align: center;
  padding: 40px;
  color: #d32f2f;
  background: #ffebee;
  border-radius: 8px;
  margin: 20px;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }
  
  .candidates-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px;
  }
  
  .candidate-photo {
    height: 250px;
  }
}
