.kapi-pestanas {
  display: flex;
  box-sizing: border-box;
  --n: 4;
  --ancho-pestana: 23%;
  --minimo-pestana: 7rem;
  width: max(
    calc(var(--n) * var(--ancho-pestana) + (var(--n) - 1) * 0.25rem + 0.5rem),
    calc(var(--n) * var(--minimo-pestana) + (var(--n) - 1) * 0.25rem + 0.5rem)
  );
  max-width: 100%;
  overflow-x: auto;
  margin: 0 auto 1.5rem;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  background: #f1f5f9;
}

.kapi-pestana {
  flex: 1 1 0;
  min-width: var(--minimo-pestana);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 21px;
  text-align: center;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.kapi-pestana:hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.55);
}

.kapi-pestana.activa {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.kapi-pestana.hidden {
  display: none;
}

.kapi-pestana .material-symbols-outlined {
  font-size: 18px;
}

.kapi-pestanas:has(> :nth-child(1):last-child) { --n: 1; }
.kapi-pestanas:has(> :nth-child(2):last-child) { --n: 2; }
.kapi-pestanas:has(> :nth-child(3):last-child) { --n: 3; }
.kapi-pestanas:has(> :nth-child(5):last-child) { --n: 5; }
.kapi-pestanas:has(> :nth-child(6):last-child) { --n: 6; }
