* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #eeeeee;
    min-height: 100vh;
    padding: 20px;
}

.container-listar {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.header h1 {
    font-size: 32px;
    background: linear-gradient(135deg, #D37D00 0%, #447C37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    color: #718096;
    font-size: 15px;
}

.help-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #D37D00;
    color: #D37D00;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    text-decoration: none !important;
}

.help-button:hover {
    background: #D37D00;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 125, 0, 0.3);
}

.stats-bar {
    background: white;
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-candidato-agencia {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    gap: 20px;
    justify-content: start;
    margin-bottom: 20px;
}

.search-candidato-agencia .filtrar-oficina {
    margin-top: 5px;
    font-weight: 600;
}

.search-candidato-agencia select {
    width: 40%;
}

select:hover {
    border: 2px solid #D37D00;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(211, 125, 0, 0.1) 0%, rgba(68, 124, 55, 0.1) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-content strong {
    display: block;
    font-size: 18px;
    color: #2d3748;
}

.stat-content span {
    font-size: 12px;
    color: #718096;
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.candidate-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.candidate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-photo {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, rgba(211, 125, 0, 0.1) 0%, rgba(68, 124, 55, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 100px;
    color: #cbd5e0;
}

.card-number {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #D37D00 0%, #447C37 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 20px;
}

.candidate-name {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 44px;
}

.candidate-office {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 8px;
}

.candidate-office span {
    font-size: 16px;
}

.load-more-container {
    text-align: center;
    padding: 20px 0;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: white;
    color: #447C37;
    border: 3px solid #447C37;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-load-more:hover {
    background: linear-gradient(135deg, #D37D00 0%, #447C37 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 124, 55, 0.3);
}

.btn-load-more.loading {
    pointer-events: none;
    opacity: 0.7;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(68, 124, 55, 0.3);
    border-top-color: #447C37;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-load-more.loading .spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.no-more-message {
    display: none;
    /* color: white; */
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin: 20px auto;
    max-width: 400px;
}

.no-more-message.show {
    display: block;
}

@media (max-width: 1200px) {
    .candidates-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {

    body {
        padding: 0px;
    }

    .header {
        padding: 25px 20px;
    }

    .header h1 {
        font-size: 26px;
    }

    .candidates-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .card-photo {
        height: 200px;
    }

    .photo-placeholder {
        font-size: 70px;
    }

    .card-number {
        width: 45px;
        height: 45px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .card-body {
        padding: 15px;
    }

    .candidate-name {
        font-size: 14px;
        min-height: 40px;
    }

    .stats-bar {
        padding: 12px 15px;
    }

    .stat-content strong {
        font-size: 16px;
    }

    .search-candidato-agencia {
        display: block;
    }

    .search-candidato-agencia .filtrar-oficina {
        margin-top: 0px !important;
    }

    .search-candidato-agencia select {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .candidates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-load-more {
        padding: 14px 30px;
        font-size: 14px;
    }
}

.floating-buttons-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
}

.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 25px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  white-space: nowrap;
  gap: 10px;
}

.floating-btn-vote {
  background: linear-gradient(135deg, #D37D00 0%, #ff9500 100%);
  color: white;
}

.floating-btn-vote:hover {
  background: linear-gradient(135deg, #ff9500 0%, #D37D00 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(211, 125, 0, 0.4);
}


.floating-btn-up {
  background: linear-gradient(135deg, #447C37 0%, #569946 100%);
  color: white;
}

.floating-btn-up:hover {
  background: linear-gradient(135deg, #569946 0%, #447C37 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(68, 124, 55, 0.4);
}

.floating-btn svg,
.floating-btn i {
  font-size: 18px;
}

.floating-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.floating-btn {
  position: relative;
}

.floating-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-right: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.floating-btn::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-right: 4px;
}

.floating-btn:hover::before,
.floating-btn:hover::after {
  opacity: 1;
}

.floating-btn:hover::before {
  transform: translateY(-50%) translateX(-5px);
}


@media (max-width: 768px) {
  .floating-buttons-container {
    bottom: 20px;
    right: 20px;
    gap: 12px;
  }
  
  .floating-btn {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
  }
  
  .floating-btn-text {
    display: none;
  }
  
  .floating-btn svg,
  .floating-btn i {
    font-size: 24px;
  }
  

  .floating-btn::before,
  .floating-btn::after {
    display: block;
  }
}

@media (min-width: 769px) {
  .floating-btn::before,
  .floating-btn::after {
    display: none;
  }
}

.floating-buttons-horizontal {
  flex-direction: row-reverse;
  gap: 15px;
}

@media (max-width: 768px) {
  .floating-buttons-horizontal {
    flex-direction: column;
  }
}


.floating-buttons-container ~ * {
  margin-bottom: 120px; 
}

.show-more-button {
  margin-bottom: 150px !important;
}
