.cargos-wrapper {
  max-width: 1400px;
  margin: 3rem auto;
  font-family: 'Poltawski Nowy', serif;
  color: #eaeaea;
}

.cargos-filtros {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cargos-radio-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}

.cargos-radio-group label {
  position: relative;
}

.cargos-radio-group input[type="radio"] {
  display: none;
}

.cargos-radio-group span {
  font-size: 1.1rem;
  text-transform: uppercase;
  color: #111;
  cursor: pointer;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.cargos-radio-group input[type="radio"]:checked + span {
  color: #111;
  border-color: #b80000;
  font-weight: 700;
}

.cargos-radio-group span:hover {
  color: #302f2f;
}

#cargos-buscador {
  padding: 0.7rem 1.2rem;
  border: 1px solid #444;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 400px;
  background: #111;
  color: #eee;
  outline: none;
  transition: border 0.2s;
}

#cargos-buscador:focus {
  border-color: #b80000;
}

/* Tabla */
.cargos-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #111;
  border-radius: 10px;
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

.cargos-table th {
  text-align: left;
  background: #1a1a1a;
  padding: 1rem;
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
  border-bottom: 2px solid #b80000;
}

.cargos-table td {
  padding: 1rem;
  border-bottom: 1px solid #333;
  color: #ddd;
  font-size: 1rem;
    vertical-align: middle;
}

.cargos-table tr:hover {
  background: #1c1c1c;
  transition: background 0.2s;
}


.cargos-table td img.cargos-foto:last-child {
    margin-right: 0;
}


.cargos-foto {
    display: inline-block;
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-right: 8px;
}
.cargos-foto:hover {
    transform: scale(1.02);
}

/* Animación de carga */
@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.cargos-loading {
  animation: pulse 1s infinite;
  text-align: center;
  color: #ccc;
  padding: 2rem;
  font-size: 1.1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Contenedor de carga dentro de la tabla */
.cargos-loading-overlay {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 17, 17, 0.95);
    border-radius: 10px;
    animation: fadeIn 0.2s ease;
}

/* Spinner centrado */
.cargos-spinner {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #b80000;
    animation: pulseSpinner 1.2s infinite;
}

.cargos-noresultados {
    background: #111;
    color: #ccc;
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    animation: fadeIn 0.3s ease;
}

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

/* Ajuste para el wrapper de tabla */
.cargos-table-wrapper {
  position: relative;
}

.cargos-table tbody.loading td {
  opacity: 0.2;
  transition: opacity 0.2s;
}

/* === Modal de imagen ampliada === */
/* === Modal de imagen ampliada (versión que respeta proporciones) === */
.cargos-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 9999;
    padding: 20px; /* espacio para que la imagen no pegue en los bordes */
    box-sizing: border-box;
}

.cargos-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Contenedor centrado que no fuerza dimensiones a la imagen */
.cargos-modal-content {
    position: relative;
    max-width: calc(100vw - 40px);   /* deja margen lateral por el padding */
    max-height: calc(100vh - 40px);  /* deja margen vertical por el padding */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    animation: fadeIn 0.25s ease;
    background: transparent; /* o rgba(0,0,0,0.0) si quieres totalmente transparente */
}

/* La imagen se mostrará en su proporción real y solo se limitará por la ventana */
.cargos-modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain; /* asegúrate que no recorte ni deforme */
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Botón de cierre del modal */
.cargos-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #111 !important; /* X blanca */
    width: 0px !important;
    height: 0px !important;
    padding: 0 !important;
    border: none !important;
    font-size: 1.4rem !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    line-height: 1;
    z-index: 2;
}

.cargos-modal-close:hover {
    transform: scale(1.1);
    background-color: transparent !important;
}