* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Archivo", sans-serif;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 10px;
  position: relative;
}

h1 {
  color: #ff0000;
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

.candidates-grid {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin: 0 auto;
  width: 100%;
}

.candidate-card {
  width: 150px;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.partido-libre {
  border: 1px solid rgba(139, 0, 0, 0.3);
}

.partido-nacional {
  border: 1px solid rgba(0, 0, 255, 0.3);
}

.partido-liberal {
  border: 1px solid rgba(255, 0, 0, 0.3);
}

.partido-libre:hover {
  border-color: rgba(139, 0, 0, 0.5);
  box-shadow: 0 4px 8px rgba(139, 0, 0, 0.1);
}

.partido-nacional:hover {
  border-color: rgba(0, 0, 255, 0.5);
  box-shadow: 0 4px 8px rgba(0, 0, 255, 0.1);
}

.partido-liberal:hover {
  border-color: rgba(255, 0, 0, 0.5);
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.1);
}

.top-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.left-column {
  position: relative;
  display: flex;
  align-items: center;
}

.candidate-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flag {
  width: 20px;
  height: 12px;
  display: flex;
  align-items: center;
}

.flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate-name {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  line-height: 1.2;
}

.bottom-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.percentage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.percentage {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.progress-value {
  height: 100%;
  transition: width 0.5s ease;
}

.partido-libre .progress-value {
  background: #8b0000;
}

.partido-nacional .progress-value {
  background: #0000ff;
}

.partido-liberal .progress-value {
  background: #ff0000;
}

.vote-count {
  font-size: 11px;
  color: #666;
}

.highlighted {
  animation: highlight 1s ease;
}

@keyframes highlight {
  0% {
    background-color: transparent;
  }

  50% {
    background-color: #ffeb3b;
  }

  100% {
    background-color: transparent;
  }
}

/* Estilos para el carrusel en móvil */
.carousel {
  position: relative;
  display: none;
  width: 100%;
  overflow-x: hidden;
}

.carousel-inner {
  display: flex;
  transition: transform 0.3s ease;
  -webkit-overflow-scrolling: touch;
}

.carousel-item {
  flex: 0 0 33.333%;
  padding: 0 5px;
  box-sizing: border-box;
}

.carousel-control {
  background: #f0f0f0;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;display:none;
}

#prev-btn {
  left: 5px;
}

#next-btn {
  right: 5px;
}

.carousel-control:hover {
  background: #e0e0e0;
}

.check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: #28a745;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  margin-left: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Estilos para los enlaces */
a.candidate-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  height: 100%;
}

/* Fuente y hora de actualización */
.footer-info {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
  font-size: 12px;
  color: #666;
  padding: 0 5px;
}

.source {
  font-weight: bold;
  margin-right: 15px;
}

.last-update {
  opacity: 1;
  transition: opacity 0.5s ease;
}

@media (max-width: 767px) {
  .candidates-grid {
    display: none;
  }

  .carousel {
    display: block;
  }

  .candidate-card {
    width: 100%;
    margin: 0;
  }
}
